From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id D15E42BA5 for ; Wed, 28 Mar 2018 10:53:48 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5663784222; Wed, 28 Mar 2018 08:53:48 +0000 (UTC) Received: from [10.36.112.44] (ovpn-112-44.ams2.redhat.com [10.36.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 725512026E0E; Wed, 28 Mar 2018 08:53:47 +0000 (UTC) To: Tomasz Kulasek , yliu@fridaylinux.org Cc: dev@dpdk.org, Dariusz Stojaczyk References: <20180305154909.216-1-tomaszx.kulasek@intel.com> From: Maxime Coquelin Message-ID: <4959889e-28ab-8cdd-c97f-a24689c1d400@redhat.com> Date: Wed, 28 Mar 2018 10:53:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180305154909.216-1-tomaszx.kulasek@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 28 Mar 2018 08:53:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 28 Mar 2018 08:53:48 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH] vhost: maintain separate virtio features field 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: Wed, 28 Mar 2018 08:53:49 -0000 Hi Tomasz, On 03/05/2018 04:49 PM, Tomasz Kulasek wrote: > There are two separate abstraction layers: > * vsocket - which represents a unix domain socket > * virtio_net - which represents a vsocket connection > > There can be many connections on the same socket. vsocket provides an > API to enable/disable particular virtio features on the fly, but it's > the virtio_net that uses these features. > > virtio_net used to rely on vsocket->features during feature negotiation, > breaking the layer encapsulation (and yet causing a deadlock - two locks > were being locked in a separate order). Now each virtio_net device has > it's own copy of vsocket features, created at the time of virtio_net > creation. > > vsocket->features have to be still present, as features can be > enabled/disabled while no virtio_net device has been created yet. > > Signed-off-by: Dariusz Stojaczyk > Signed-off-by: Tomasz Kulasek > --- > lib/librte_vhost/socket.c | 2 +- > lib/librte_vhost/vhost.c | 9 +++++---- > lib/librte_vhost/vhost.h | 8 +++++--- > lib/librte_vhost/vhost_user.c | 33 +++++++++++++++++---------------- > 4 files changed, 28 insertions(+), 24 deletions(-) Thanks for the patch. I think it is valid, but I would prefer we create a .backend_features field to represent the features that the backend supports, and keep .features for the negotiated features. Do you agree to re-post with this change? Thanks, Maxime