From patchwork Mon Sep 21 06:48:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Liu X-Patchwork-Id: 78144 Return-Path: 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 ; 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 To: maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Marvin Liu 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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