From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4B983C3BC for ; Fri, 19 Feb 2016 09:36:32 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 19 Feb 2016 00:36:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,469,1449561600"; d="scan'208";a="919163134" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 19 Feb 2016 00:36:22 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 19 Feb 2016 00:36:22 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 19 Feb 2016 00:36:21 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.249]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.112]) with mapi id 14.03.0248.002; Fri, 19 Feb 2016 16:36:13 +0800 From: "Xie, Huawei" To: Yuanhan Liu , Ilya Maximets Thread-Topic: [PATCH RFC 4/4] doc: add note about rte_vhost_enqueue_burst thread safety. Thread-Index: AdFq8Jaz1/1ngahpRXGW43kFOae+SQ== Date: Fri, 19 Feb 2016 08:36:12 +0000 Message-ID: References: <1455863563-15751-1-git-send-email-i.maximets@samsung.com> <1455863563-15751-5-git-send-email-i.maximets@samsung.com> <20160219071046.GT21426@yliu-dev.sh.intel.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" , Dyasly Sergey Subject: Re: [dpdk-dev] [PATCH RFC 4/4] doc: add note about rte_vhost_enqueue_burst thread safety. 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, 19 Feb 2016 08:36:32 -0000 On 2/19/2016 3:10 PM, Yuanhan Liu wrote:=0A= > On Fri, Feb 19, 2016 at 09:32:43AM +0300, Ilya Maximets wrote:=0A= >> Signed-off-by: Ilya Maximets =0A= >> ---=0A= >> doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 1 +=0A= >> 1 file changed, 1 insertion(+)=0A= >>=0A= >> diff --git a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst b/do= c/guides/prog_guide/thread_safety_dpdk_functions.rst=0A= >> index 403e5fc..13a6c89 100644=0A= >> --- a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst=0A= >> +++ b/doc/guides/prog_guide/thread_safety_dpdk_functions.rst=0A= >> @@ -67,6 +67,7 @@ then locking, or some other form of mutual exclusion, = is necessary.=0A= >> The ring library is based on a lockless ring-buffer algorithm that main= tains its original design for thread safety.=0A= >> Moreover, it provides high performance for either multi- or single-cons= umer/producer enqueue/dequeue operations.=0A= >> The mempool library is based on the DPDK lockless ring library and ther= efore is also multi-thread safe.=0A= >> +rte_vhost_enqueue_burst() is also thread safe because based on lockless= ring-buffer algorithm like the ring library.=0A= > FYI, Huawei meant to make rte_vhost_enqueue_burst() not be thread-safe,= =0A= > to aligh with the usage of rte_eth_tx_burst().=0A= >=0A= > --yliu=0A= =0A= I have a patch to remove the lockless enqueue. Unless there is strong=0A= reason, i prefer vhost PMD to behave like other PMDs, with no internal=0A= lockless algorithm. In future, for people who really need it, we could=0A= have dynamic/static switch to enable it.=0A= =0A= =0A=