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 752FD592A for ; Thu, 25 Aug 2016 10:36:57 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 25 Aug 2016 01:36:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,575,1464678000"; d="scan'208";a="1046962454" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 25 Aug 2016 01:36:56 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Aug 2016 01:36:55 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Aug 2016 01:36:55 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0248.002; Thu, 25 Aug 2016 16:36:53 +0800 From: "Xu, Qian Q" To: Maxime Coquelin , Yuanhan Liu CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 7/7] vhost: simplify features set/get Thread-Index: AQHR+Sxu7LBO7yOd4UysqlVg8KFou6BXReeAgAE8GoCAAEdMAIAAm0cw Date: Thu, 25 Aug 2016 08:36:52 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E03324D73@shsmsx102.ccr.corp.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> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Thu, 25 Aug 2016 08:36:57 -0000 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maxime Coquelin Sent: Thursday, August 25, 2016 3:19 PM To: Yuanhan Liu Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 7/7] vhost: simplify features set/get 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=20 >>> 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 =3D VHOST_FEATURES; >>> - return 0; >>> + return VHOST_FEATURES; >>> } >> >> This is not the topic of this series, but I wonder if it could make=20 >> sense to be able to override supported features at device init time. > > Not quite sure I understood it correctly: is=20 > 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 v= ia the vhost PMD options, without needing to recompile. But maybe it would make more sense to do it a guest level? Maxime -------Agreed, as you know we have the vhost PMD port and virtio-user PMD p= ort and we can launch both vhost/virtio on the host, but we=20 Can't set the mergeable in the command line, we may need add some feature s= ettings for virtio-user interface. It will be much easier to=20 Run tests or application.=20 Qian