Message ID | 20200921064837.15957-1-yong.liu@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20DE1A04B7; Mon, 21 Sep 2020 08:52:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 585CA1D8ED; Mon, 21 Sep 2020 08:52:55 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 87A881D8E1 for <dev@dpdk.org>; Mon, 21 Sep 2020 08:52:53 +0200 (CEST) IronPort-SDR: D/n5fq53sCFcqhR6EmDKTrQvgGVd3QQH3RWcZceCMTI1Xv/UAPtN9MsQLdkxP/cwYUypk5iam7 JnwudD+TLTBg== X-IronPort-AV: E=McAfee;i="6000,8403,9750"; a="148073392" X-IronPort-AV: E=Sophos;i="5.77,285,1596524400"; d="scan'208";a="148073392" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2020 23:52:52 -0700 IronPort-SDR: JiQfXu2ncFACF2M1ldtMAJZtCHyRiuo6DfK75Urjkh5L+RrPNrpqH1B/43picAEKhuvBFg1LCU pX2gMYVb4o3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,285,1596524400"; d="scan'208";a="412078386" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56]) by fmsmga001.fm.intel.com with ESMTP; 20 Sep 2020 23:52:50 -0700 From: Marvin Liu <yong.liu@intel.com> To: maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Marvin Liu <yong.liu@intel.com> Date: Mon, 21 Sep 2020 14:48:32 +0800 Message-Id: <20200921064837.15957-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200819032414.51430-2-yong.liu@intel.com> References: <20200819032414.51430-2-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v2 0/5] vhost add vectorized data path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series | vhost add vectorized data path | |
Message
Marvin Liu
Sept. 21, 2020, 6:48 a.m. UTC
Packed ring format is imported since virtio spec 1.1. All descriptors are compacted into one single ring when packed ring format is on. It is straight forward that ring operations can be accelerated by utilizing SIMD instructions. This patch set will introduce vectorized data path in vhost library. If vectorized option is on, operations like descs check, descs writeback, address translation will be accelerated by SIMD instructions. Vhost application can choose whether using vectorized acceleration, it is like external buffer and zero copy features. If platform or ring format not support vectorized function, vhost will fallback to use default batch function. There will be no impact in current data path. v2: * add vIOMMU support * add dequeue offloading * rebase code Marvin Liu (5): vhost: add vectorized data path vhost: reuse packed ring functions vhost: prepare memory regions addresses vhost: add packed ring vectorized dequeue vhost: add packed ring vectorized enqueue doc/guides/nics/vhost.rst | 5 + doc/guides/prog_guide/vhost_lib.rst | 12 + drivers/net/vhost/rte_eth_vhost.c | 17 +- lib/librte_vhost/meson.build | 16 ++ lib/librte_vhost/rte_vhost.h | 1 + lib/librte_vhost/socket.c | 5 + lib/librte_vhost/vhost.c | 11 + lib/librte_vhost/vhost.h | 235 +++++++++++++++++++ lib/librte_vhost/vhost_user.c | 11 + lib/librte_vhost/vhost_vec_avx.c | 338 ++++++++++++++++++++++++++++ lib/librte_vhost/virtio_net.c | 257 ++++----------------- 11 files changed, 692 insertions(+), 216 deletions(-) create mode 100644 lib/librte_vhost/vhost_vec_avx.c
Comments
Hi, On 9/21/20 8:48 AM, Marvin Liu wrote: > Packed ring format is imported since virtio spec 1.1. All descriptors > are compacted into one single ring when packed ring format is on. It is > straight forward that ring operations can be accelerated by utilizing > SIMD instructions. > > This patch set will introduce vectorized data path in vhost library. If > vectorized option is on, operations like descs check, descs writeback, > address translation will be accelerated by SIMD instructions. Vhost > application can choose whether using vectorized acceleration, it is > like external buffer and zero copy features. > > If platform or ring format not support vectorized function, vhost will > fallback to use default batch function. There will be no impact in current > data path. As a pre-requisite, I'd like some performance numbers in both loopback and PVP to figure out if adding such complexity is worth it, given we will have to support it for at least one year. Thanks, Maxime > v2: > * add vIOMMU support > * add dequeue offloading > * rebase code > > Marvin Liu (5): > vhost: add vectorized data path > vhost: reuse packed ring functions > vhost: prepare memory regions addresses > vhost: add packed ring vectorized dequeue > vhost: add packed ring vectorized enqueue > > doc/guides/nics/vhost.rst | 5 + > doc/guides/prog_guide/vhost_lib.rst | 12 + > drivers/net/vhost/rte_eth_vhost.c | 17 +- > lib/librte_vhost/meson.build | 16 ++ > lib/librte_vhost/rte_vhost.h | 1 + > lib/librte_vhost/socket.c | 5 + > lib/librte_vhost/vhost.c | 11 + > lib/librte_vhost/vhost.h | 235 +++++++++++++++++++ > lib/librte_vhost/vhost_user.c | 11 + > lib/librte_vhost/vhost_vec_avx.c | 338 ++++++++++++++++++++++++++++ > lib/librte_vhost/virtio_net.c | 257 ++++----------------- > 11 files changed, 692 insertions(+), 216 deletions(-) > create mode 100644 lib/librte_vhost/vhost_vec_avx.c >
> -----Original Message----- > From: Maxime Coquelin <maxime.coquelin@redhat.com> > Sent: Tuesday, October 6, 2020 9:34 PM > To: Liu, Yong <yong.liu@intel.com>; Xia, Chenbo <chenbo.xia@intel.com>; > Wang, Zhihong <zhihong.wang@intel.com> > Cc: dev@dpdk.org > Subject: Re: [PATCH v2 0/5] vhost add vectorized data path > > Hi, > > On 9/21/20 8:48 AM, Marvin Liu wrote: > > Packed ring format is imported since virtio spec 1.1. All descriptors > > are compacted into one single ring when packed ring format is on. It is > > straight forward that ring operations can be accelerated by utilizing > > SIMD instructions. > > > > This patch set will introduce vectorized data path in vhost library. If > > vectorized option is on, operations like descs check, descs writeback, > > address translation will be accelerated by SIMD instructions. Vhost > > application can choose whether using vectorized acceleration, it is > > like external buffer and zero copy features. > > > > If platform or ring format not support vectorized function, vhost will > > fallback to use default batch function. There will be no impact in current > > data path. > > As a pre-requisite, I'd like some performance numbers in both loopback > and PVP to figure out if adding such complexity is worth it, given we > will have to support it for at least one year. > Thanks for suggestion, will add some reference numbers in next version. > Thanks, > Maxime > > > v2: > > * add vIOMMU support > > * add dequeue offloading > > * rebase code > > > > Marvin Liu (5): > > vhost: add vectorized data path > > vhost: reuse packed ring functions > > vhost: prepare memory regions addresses > > vhost: add packed ring vectorized dequeue > > vhost: add packed ring vectorized enqueue > > > > doc/guides/nics/vhost.rst | 5 + > > doc/guides/prog_guide/vhost_lib.rst | 12 + > > drivers/net/vhost/rte_eth_vhost.c | 17 +- > > lib/librte_vhost/meson.build | 16 ++ > > lib/librte_vhost/rte_vhost.h | 1 + > > lib/librte_vhost/socket.c | 5 + > > lib/librte_vhost/vhost.c | 11 + > > lib/librte_vhost/vhost.h | 235 +++++++++++++++++++ > > lib/librte_vhost/vhost_user.c | 11 + > > lib/librte_vhost/vhost_vec_avx.c | 338 > ++++++++++++++++++++++++++++ > > lib/librte_vhost/virtio_net.c | 257 ++++----------------- > > 11 files changed, 692 insertions(+), 216 deletions(-) > > create mode 100644 lib/librte_vhost/vhost_vec_avx.c > >