From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <huawei.xie@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id BE1E1592B
 for <dev@dpdk.org>; Thu, 21 May 2015 10:51:24 +0200 (CEST)
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by orsmga102.jf.intel.com with ESMTP; 21 May 2015 01:51:23 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.13,467,1427785200"; d="scan'208";a="729496501"
Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91])
 by fmsmga002.fm.intel.com with ESMTP; 21 May 2015 01:51:22 -0700
Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by
 PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS)
 id 14.3.224.2; Thu, 21 May 2015 16:49:18 +0800
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.120]) by
 SHSMSX103.ccr.corp.intel.com ([169.254.4.23]) with mapi id 14.03.0224.002;
 Thu, 21 May 2015 16:49:17 +0800
From: "Xie, Huawei" <huawei.xie@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>, Panu Matilainen
 <pmatilai@redhat.com>
Thread-Topic: [dpdk-dev] [PATCH] vhost: make vhost lockless enqueue
 configurable
Thread-Index: AdCTowUd/MyamPsMRIuwf6UIGmdFTw==
Date: Thu, 21 May 2015 08:49:17 +0000
Message-ID: <C37D651A908B024F974696C65296B57B0F4AF96A@SHSMSX101.ccr.corp.intel.com>
References: <1430306974-9618-1-git-send-email-huawei.xie@intel.com>
 <5540C29A.9010708@redhat.com>
 <CA+PrjLE9FqCR558ZPvk2fwJbmncMfDfTOFaSQYg93VK4wfQuQA@mail.gmail.com>
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
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] vhost: make vhost lockless
	enqueue	configurable
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, 21 May 2015 08:51:25 -0000

On 4/29/2015 7:57 PM, Thomas Monjalon wrote:=0A=
> 2015-04-29 13:38 GMT+02:00 Panu Matilainen <pmatilai@redhat.com>:=0A=
>> On 04/29/2015 02:29 PM, Huawei Xie wrote:=0A=
>>> vhost enabled vSwitch could have their own thread-safe vring enqueue=0A=
>>> policy.=0A=
>>> Add the RTE_LIBRTE_VHOST_LOCKLESS_ENQ macro for vhost lockless enqueue.=
=0A=
>>> Turn it off by default.=0A=
>>>=0A=
>>> Signed-off-by: Huawei Xie <huawei.xie@intel.com>=0A=
>>> ---=0A=
>>>   config/common_linuxapp        |  1 +=0A=
>>>   lib/librte_vhost/vhost_rxtx.c | 24 +++++++++++++++++++++++-=0A=
>>>   2 files changed, 24 insertions(+), 1 deletion(-)=0A=
>>>=0A=
>>> diff --git a/config/common_linuxapp b/config/common_linuxapp=0A=
>>> index 0078dc9..7f59499 100644=0A=
>>> --- a/config/common_linuxapp=0A=
>>> +++ b/config/common_linuxapp=0A=
>>> @@ -421,6 +421,7 @@ CONFIG_RTE_KNI_VHOST_DEBUG_TX=3Dn=0A=
>>>   #=0A=
>>>   CONFIG_RTE_LIBRTE_VHOST=3Dn=0A=
>>>   CONFIG_RTE_LIBRTE_VHOST_USER=3Dy=0A=
>>> +CONFIG_RTE_LIBRTE_VHOST_LOCKLESS_ENQ=3Dn=0A=
>>>   CONFIG_RTE_LIBRTE_VHOST_DEBUG=3Dn=0A=
> [...]=0A=
>> These things should be runtime configurable, not build options. Please d=
o=0A=
>> not assume everybody builds DPDK separately for each and every applicati=
on=0A=
>> that might ever be.=0A=
> +1=0A=
> Adding new build options must be exceptions and very well justified.=0A=
=0A=
Thomas:=0A=
Though we could make per queue/device run time configurable, i feel it=0A=
might not make sense that per queue/device has different behavior.=0A=
 To ease the implementation, i would provide an API to configure the=0A=
global lock less behavior, and by default, lockess enqueue will be disabled=
.=0A=
Thoughts?=0A=
=0A=
>=0A=
>=0A=
=0A=