From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maxime.coquelin@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id D7DBB591F
 for <dev@dpdk.org>; Thu, 25 Aug 2016 11:10:11 +0200 (CEST)
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 0C81761E7E;
 Thu, 25 Aug 2016 09:10:11 +0000 (UTC)
Received: from [10.36.6.175] (vpn1-6-175.ams2.redhat.com [10.36.6.175])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 u7P9A8UR001841
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Thu, 25 Aug 2016 05:10:09 -0400
To: "Xu, Qian Q" <qian.q.xu@intel.com>,
 Yuanhan Liu <yuanhan.liu@linux.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>
 <d410f5d6-f22e-e371-4fea-b19db9fcb426@redhat.com>
 <82F45D86ADE5454A95A89742C8D1410E03324D73@shsmsx102.ccr.corp.intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <8f261029-cedb-d894-45a5-fde7880d2f40@redhat.com>
Date: Thu, 25 Aug 2016 11:10:08 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E03324D73@shsmsx102.ccr.corp.intel.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.39]); Thu, 25 Aug 2016 09:10:11 +0000 (UTC)
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Aug 2016 09:10:12 -0000



On 08/25/2016 10:36 AM, Xu, Qian Q wrote:
>
>
> -----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 <yuanhan.liu@linux.intel.com>
> 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 <yuanhan.liu@linux.intel.com>
>>>> ---
>>>> 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.
>
> 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 port and we can launch both vhost/virtio on the host, but we
> Can't set the mergeable in the command line, we may need add some feature settings for virtio-user interface. It will be much easier to
> Run tests or application.

I never tried virtio-user PMD on host, but my proposal should be
applicable there too.

Regards,
Maxime