From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 84B74282 for ; Tue, 3 Jan 2017 09:20:30 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 03 Jan 2017 00:20:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="48697479" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga005.jf.intel.com with ESMTP; 03 Jan 2017 00:20:28 -0800 Date: Tue, 3 Jan 2017 16:22:15 +0800 From: Yuanhan Liu To: "Charles (Chas) Williams" Cc: dev@dpdk.org, mtetsuyah@gmail.com Message-ID: <20170103082215.GC21228@yliu-dev.sh.intel.com> References: <1483297317-20315-1-git-send-email-ciwillia@brocade.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483297317-20315-1-git-send-email-ciwillia@brocade.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/vhost: create datagram sockets immediately 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: , X-List-Received-Date: Tue, 03 Jan 2017 08:20:30 -0000 On Sun, Jan 01, 2017 at 02:01:56PM -0500, Charles (Chas) Williams wrote: > If you create a vhost server device, it doesn't create the actual datagram > socket until you call .dev_start(). If you call .dev_stop() is also > deletes those sockets. For QEMU clients, this is a problem since QEMU > doesn't know how to re-attach to datagram sockets that have gone away. > > To work around this, register and unregister the datagram sockets during I will not call it's a "workaround", instead, it's a "fix" to me. > device creation and removal. > > Fixes: ee584e9710b9 ("vhost: add driver on top of the library") > > Signed-off-by: Chas Williams > --- > drivers/net/vhost/rte_eth_vhost.c | 43 ++++++++++++++++----------------------- > 1 file changed, 17 insertions(+), 26 deletions(-) > > diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c > index 60b0f51..6b11e40 100644 > --- a/drivers/net/vhost/rte_eth_vhost.c > +++ b/drivers/net/vhost/rte_eth_vhost.c > @@ -114,8 +114,6 @@ struct pmd_internal { > char *iface_name; > uint16_t max_queues; > uint64_t flags; I think the "flags" could also be dropped in this patch: no user any more. --yliu