From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8D7AE2946 for ; Sun, 11 Sep 2016 14:17:36 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 11 Sep 2016 05:17:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,316,1470726000"; d="scan'208";a="1054431624" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga002.fm.intel.com with ESMTP; 11 Sep 2016 05:17:34 -0700 Date: Sun, 11 Sep 2016 20:18:07 +0800 From: Yuanhan Liu To: Rich Lane Cc: dev@dpdk.org, Huawei Xie , Thomas Monjalon Message-ID: <20160911121807.GX23158@yliu-dev.sh.intel.com> References: <1471291224-12755-1-git-send-email-rich.lane@bigswitch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471291224-12755-1-git-send-email-rich.lane@bigswitch.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] vhost: add back support for concurrent enqueue 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: Sun, 11 Sep 2016 12:17:37 -0000 On Mon, Aug 15, 2016 at 01:00:24PM -0700, Rich Lane wrote: > Concurrent enqueue is an important performance optimization when the number > of cores used for switching is different than the number of vhost queues. > I've observed a 20% performance improvement compared to a strategy that > binds queues to cores. > > The atomic cmpset is only executed when the application calls > rte_vhost_enqueue_burst_mp. Benchmarks show no performance impact > when not using concurrent enqueue. > > Mergeable RX buffers aren't supported by concurrent enqueue to minimize > code complexity. > > Partially reverts 39449e74 ("vhost: remove concurrent enqueue") and > includes a fix from "vhost: avoid reordering of used->idx and last_used_idx > updating". > > Signed-off-by: Rich Lane > --- > lib/librte_vhost/rte_vhost_version.map | 6 +++ > lib/librte_vhost/rte_virtio_net.h | 19 +++++++++ > lib/librte_vhost/vhost-net.h | 2 + > lib/librte_vhost/vhost_rxtx.c | 77 ++++++++++++++++++++++++++++++---- > lib/librte_vhost/virtio-net.c | 2 + > 5 files changed, 97 insertions(+), 9 deletions(-) > > diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map > index 5ceaa8a..ca9d49e 100644 > --- a/lib/librte_vhost/rte_vhost_version.map > +++ b/lib/librte_vhost/rte_vhost_version.map > @@ -30,3 +30,9 @@ DPDK_16.07 { > rte_vhost_get_queue_num; > > } DPDK_2.1; > + > +DPDK_16.11 { > + global: > + > + rte_vhost_enqueue_burst_mp > +} DPDK_16.07; Hi, FYI, my testrobot caught some errors when this patch is applied. --yliu --- x86_64-native-linuxapp-clang: config-all-yes-shared =================================================== /usr/bin/ld:/root/dpdk/lib/librte_vhost/rte_vhost_version.map:38: syntax error in VERSION script clang: error: linker command failed with exit code 1 (use -v to see invocation) make[5]: *** [librte_vhost.so.3.1] Error 1 make[4]: *** [librte_vhost] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [lib] Error 2 make[2]: *** [all] Error 2 make[1]: *** [pre_install] Error 2 make: *** [install] Error 2 error: build failed