From patchwork Mon Oct 26 16:39:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Moreno X-Patchwork-Id: 82211 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A7E5A04DD; Mon, 26 Oct 2020 17:41:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F03892B9D; Mon, 26 Oct 2020 17:39:53 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 1C11A100C for ; Mon, 26 Oct 2020 17:39:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603730389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYlIpoKphSNxuUgQbMywah+eApiyWYhIUweFPSO/HI0=; b=gf7fEsGJN2SJkQwiqVC9u7joP24yeuRObqkk84vVrIfeCq0A4MD6r8DmdXTUwEh3lnaYO2 DLZ/WNvYknPtHRUSEjWhzG+6TZKcl9EB+/uZhh8LsBAOCa74PhrHByAcvfqda6zjLbmKmz W0Ygnw0e4au/lofrP1x8WuuiBuIx2AI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-jPebk4-BP3ubjwwb_wCfqw-1; Mon, 26 Oct 2020 12:39:45 -0400 X-MC-Unique: jPebk4-BP3ubjwwb_wCfqw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CEB7A0BDC; Mon, 26 Oct 2020 16:39:44 +0000 (UTC) Received: from amorenoz.users.ipa.redhat.com (ovpn-114-135.ams2.redhat.com [10.36.114.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id C20275576E; Mon, 26 Oct 2020 16:39:39 +0000 (UTC) From: Adrian Moreno To: dev@dpdk.org Cc: yinan.wang@intel.com, patrick.fu@intel.com, chenbo.xia@intel.com, zhihong.wang@intel.com, maxime.coquelin@redhat.com, Adrian Moreno Date: Mon, 26 Oct 2020 17:39:24 +0100 Message-Id: <20201026163930.94032-1-amorenoz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=amorenoz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v3 0/6] net/virtio-user: fix server mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" A number of issues have been detected that currently break virtio-user server mode. This series addresses such issues. Note that virtio-user server mode is broken by design and many of the problems that it currently has should be fixed by a bigger rework. Tested-by: JiangYuX --- v2->v3: Fix potential concurrency problem on get/set state Handle STATUS protocol feature flag Fix undefined behaviour if STATUS feature is not supported Ensure packed virtqueues are reset on reconnection v1->v2: Added patch 2 and 3 addressing additional issues Check errno to select vhost-user backend and log the detected backend type Adrian Moreno (6): net/virtio-user: fix backend selection if stat fails net/virtio-user: don't set/get_status until FEATURES_OK net/virtio-user: ignore result if STATUS is unsupported net/virtio-user: lock-protect status updates net/virtio-user: don't assume vhost status feature net/virtio-user: set status on socket reconnect drivers/net/virtio/virtio_user/vhost_user.c | 14 ++--- .../net/virtio/virtio_user/virtio_user_dev.c | 53 +++++++++++++------ .../net/virtio/virtio_user/virtio_user_dev.h | 5 +- drivers/net/virtio/virtio_user_ethdev.c | 40 ++++++++++---- 4 files changed, 78 insertions(+), 34 deletions(-)