From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 439101075 for ; Thu, 16 Mar 2017 08:09:50 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 16 Mar 2017 00:09:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="61053473" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 16 Mar 2017 00:09:48 -0700 Date: Thu, 16 Mar 2017 15:08:07 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: dev@dpdk.org, Harris James R , Liu Changpeng Message-ID: <20170316070807.GO18844@yliu-dev.sh.intel.com> References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> <1488534682-3494-2-git-send-email-yuanhan.liu@linux.intel.com> <337dbdcd-0913-dd1f-5cba-15844a7380b1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <337dbdcd-0913-dd1f-5cba-15844a7380b1@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 01/17] vhost: introduce driver features related APIs 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: Thu, 16 Mar 2017 07:09:51 -0000 On Tue, Mar 14, 2017 at 10:53:23AM +0100, Maxime Coquelin wrote: > > > On 03/14/2017 10:46 AM, Maxime Coquelin wrote: > > > > > >On 03/03/2017 10:51 AM, Yuanhan Liu wrote: > >>Introduce few APIs to set/get/enable/disable driver features. > >> > >>Signed-off-by: Yuanhan Liu > >>--- > >> lib/librte_vhost/rte_vhost_version.map | 10 ++++ > >> lib/librte_vhost/rte_virtio_net.h | 9 ++++ > >> lib/librte_vhost/socket.c | 90 > >>++++++++++++++++++++++++++++++++++ > >> 3 files changed, 109 insertions(+) > > > >Nice! > >Reviewed-by: Maxime Coquelin > > > >I wonder whether we could protect from setting/enabling/disabling > >features once negotiation is done? Those APIs won't be able to change the negotiated features. They are just some interfaces before the vhost-user connection is established. Ideally, we could/should get rid of the enabling/disabling functions: let the vhost-user driver to handle the features directly (say, for vhost-user pmd, we could use vdev options to disable/enable few specific features). Once that is done, use the rte_vhost_driver_set_features() set the features once. The reason I introduced the enable/disable_features() is to keep the compatability with the builtin vhost-user net driver (virtio_net.c). If there is a plan to move it into vhost-pmd, they won't be needed. And I don't think that will happen soon. > Oh, I forgot one comment on this patch. > Since these new functions are part to the API, shouldn't them be > documented? Yes, indeed, it's also noted in my cover letter. --yliu