From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D60C42B9C for ; Fri, 26 Aug 2016 06:05:20 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 25 Aug 2016 21:05:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,579,1464678000"; d="scan'208";a="161135904" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 25 Aug 2016 21:05:19 -0700 Date: Fri, 26 Aug 2016 12:15:32 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: dev@dpdk.org Message-ID: <20160826041532.GY30752@yliu-dev.sh.intel.com> References: <1471510123-4984-1-git-send-email-yuanhan.liu@linux.intel.com> <1471510123-4984-8-git-send-email-yuanhan.liu@linux.intel.com> <33936312-b630-1a4e-e478-b028dc264962@redhat.com> <20160825030319.GV30752@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 7/7] vhost: simplify features set/get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 04:05:21 -0000 On Thu, Aug 25, 2016 at 09:18:30AM +0200, Maxime Coquelin wrote: > > > On 08/25/2016 05:03 AM, Yuanhan Liu wrote: > >On Wed, Aug 24, 2016 at 10:11:57AM +0200, Maxime Coquelin wrote: > >> > >> > >>On 08/18/2016 10:48 AM, Yuanhan Liu wrote: > >>>No need to use a pointer to store/retrieve features. > >>> > >>>Signed-off-by: Yuanhan Liu > >>>--- > >>>lib/librte_vhost/vhost_user.c | 20 ++++++++------------ > >>>1 file changed, 8 insertions(+), 12 deletions(-) > >>> > >>>diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > >>>index ef4a0c1..eee99e9 100644 > >>>--- a/lib/librte_vhost/vhost_user.c > >>>+++ b/lib/librte_vhost/vhost_user.c > >>>@@ -155,23 +155,22 @@ vhost_user_reset_owner(struct virtio_net *dev) > >>>/* > >>> * The features that we support are requested. > >>> */ > >>>-static int > >>>-vhost_user_get_features(uint64_t *pu) > >>>+static uint64_t > >>>+vhost_user_get_features(void) > >>>{ > >>>- *pu = VHOST_FEATURES; > >>>- return 0; > >>>+ return VHOST_FEATURES; > >>>} > >> > >>This is not the topic of this series, but I wonder if it > >>could make sense to be able to override supported features > >>at device init time. > > > >Not quite sure I understood it correctly: is rte_vhost_feature_disable() > >the answer you are looking for? > Not really. > > I meant a per-device supported features, and something you could set > also via the vhost PMD options, without needing to recompile. I see. I think my following proposal would fix it then. http://dpdk.org/ml/archives/dev/2016-June/040021.html Note you might want to follow the discussion, as it mentioned per-device config later. Another note, it lacked a fancy name at last discussion. For now, I think I come up with a better one: --dpdk-env :) --yliu > > But maybe it would make more sense to do it a guest level? > > Maxime