Message ID | 20200423123106.78513-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 5519AA00C2; Thu, 23 Apr 2020 06:55:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 057F21D164; Thu, 23 Apr 2020 06:55:53 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 988D91D150 for <dev@dpdk.org>; Thu, 23 Apr 2020 06:55:50 +0200 (CEST) IronPort-SDR: L742IY55D/aw87+v6Y0E/OVNs2b3FztilK9ZjXUhMrE0a4n/VfMB9HOrAihONJ+FNVjmD4YQNj efT6dLMwdl0A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 21:55:49 -0700 IronPort-SDR: 6FHYrZcdDkEOMZJlG4lILT5SyYez3orjFR48ZTYD+jHjVEWBfImM2uiHBFzLD84grgMdb3Ic5O rPLrqhpsB/cg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,305,1583222400"; d="scan'208";a="456772672" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56]) by fmsmga005.fm.intel.com with ESMTP; 22 Apr 2020 21:55:46 -0700 From: Marvin Liu <yong.liu@intel.com> To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com Cc: harry.van.haaren@intel.com, dev@dpdk.org, Marvin Liu <yong.liu@intel.com> Date: Thu, 23 Apr 2020 20:30:57 +0800 Message-Id: <20200423123106.78513-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313174230.74661-1-yong.liu@intel.com> References: <20200313174230.74661-1-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v8 0/9] add packed ring vectorized 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 |
add packed ring vectorized path
|
|
Message
Marvin Liu
April 23, 2020, 12:30 p.m. UTC
This patch set introduced vectorized path for packed ring. The size of packed ring descriptor is 16Bytes. Four batched descriptors are just placed into one cacheline. AVX512 instructions can well handle this kind of data. Packed ring TX path can fully transformed into vectorized path. Packed ring Rx path can be vectorized when requirements met(LRO and mergeable disabled). New option RTE_LIBRTE_VIRTIO_INC_VECTOR will be introduced in this patch set. This option will unify split and packed ring vectorized path default setting. Meanwhile user can specify whether enable vectorized path at runtime by 'vectorized' parameter of virtio user vdev. v8: * fix meson build error on ubuntu16.04 and suse15 v7: * default vectorization is disabled * compilation time check dependency on rte_mbuf structure * offsets are calcuated when compiling * remove useless barrier as descs are batched store&load * vindex of scatter is directly set * some comments updates * enable vectorized path in meson build v6: * fix issue when size not power of 2 v5: * remove cpuflags definition as required extensions always come with AVX512F on x86_64 * inorder actions should depend on feature bit * check ring type in rx queue setup * rewrite some commit logs * fix some checkpatch warnings v4: * rename 'packed_vec' to 'vectorized', also used in split ring * add RTE_LIBRTE_VIRTIO_INC_VECTOR config for virtio ethdev * check required AVX512 extensions cpuflags * combine split and packed ring datapath selection logic * remove limitation that size must power of two * clear 12Bytes virtio_net_hdr v3: * remove virtio_net_hdr array for better performance * disable 'packed_vec' by default v2: * more function blocks replaced by vector instructions * clean virtio_net_hdr by vector instruction * allow header room size change * add 'packed_vec' option in virtio_user vdev * fix build not check whether AVX512 enabled * doc update Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: enable vectorized path net/virtio: inorder should depend on feature bit net/virtio-user: add vectorized path parameter net/virtio: add vectorized packed ring Rx path net/virtio: reuse packed ring xmit functions net/virtio: add vectorized packed ring Tx path net/virtio: add election for vectorized path doc: add packed vectorized path config/common_base | 1 + doc/guides/nics/virtio.rst | 43 +- drivers/net/virtio/Makefile | 37 ++ drivers/net/virtio/meson.build | 15 + drivers/net/virtio/virtio_ethdev.c | 95 ++- drivers/net/virtio/virtio_ethdev.h | 6 + drivers/net/virtio/virtio_pci.h | 3 +- drivers/net/virtio/virtio_rxtx.c | 212 ++----- drivers/net/virtio/virtio_rxtx_packed_avx.c | 665 ++++++++++++++++++++ drivers/net/virtio/virtio_user_ethdev.c | 37 +- drivers/net/virtio/virtqueue.c | 7 +- drivers/net/virtio/virtqueue.h | 168 ++++- 12 files changed, 1075 insertions(+), 214 deletions(-) create mode 100644 drivers/net/virtio/virtio_rxtx_packed_avx.c
Comments
Tested-by: Wang, Yinan <yinan.wang@intel.com> > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Marvin Liu > Sent: 2020年4月23日 20:31 > To: maxime.coquelin@redhat.com; Ye, Xiaolong <xiaolong.ye@intel.com>; > Wang, Zhihong <zhihong.wang@intel.com> > Cc: Van Haaren, Harry <harry.van.haaren@intel.com>; dev@dpdk.org; Liu, > Yong <yong.liu@intel.com> > Subject: [dpdk-dev] [PATCH v8 0/9] add packed ring vectorized path > > This patch set introduced vectorized path for packed ring. > > The size of packed ring descriptor is 16Bytes. Four batched descriptors are > just placed into one cacheline. AVX512 instructions can well handle this kind > of data. Packed ring TX path can fully transformed into vectorized path. > Packed ring Rx path can be vectorized when requirements met(LRO and > mergeable disabled). > > New option RTE_LIBRTE_VIRTIO_INC_VECTOR will be introduced in this patch > set. This option will unify split and packed ring vectorized path default setting. > Meanwhile user can specify whether enable vectorized path at runtime by > 'vectorized' parameter of virtio user vdev. > > v8: > * fix meson build error on ubuntu16.04 and suse15 > > v7: > * default vectorization is disabled > * compilation time check dependency on rte_mbuf structure > * offsets are calcuated when compiling > * remove useless barrier as descs are batched store&load > * vindex of scatter is directly set > * some comments updates > * enable vectorized path in meson build > > v6: > * fix issue when size not power of 2 > > v5: > * remove cpuflags definition as required extensions always come with > AVX512F on x86_64 > * inorder actions should depend on feature bit > * check ring type in rx queue setup > * rewrite some commit logs > * fix some checkpatch warnings > > v4: > * rename 'packed_vec' to 'vectorized', also used in split ring > * add RTE_LIBRTE_VIRTIO_INC_VECTOR config for virtio ethdev > * check required AVX512 extensions cpuflags > * combine split and packed ring datapath selection logic > * remove limitation that size must power of two > * clear 12Bytes virtio_net_hdr > > v3: > * remove virtio_net_hdr array for better performance > * disable 'packed_vec' by default > > v2: > * more function blocks replaced by vector instructions > * clean virtio_net_hdr by vector instruction > * allow header room size change > * add 'packed_vec' option in virtio_user vdev > * fix build not check whether AVX512 enabled > * doc update > > > Marvin Liu (9): > net/virtio: add Rx free threshold setting > net/virtio: enable vectorized path > net/virtio: inorder should depend on feature bit > net/virtio-user: add vectorized path parameter > net/virtio: add vectorized packed ring Rx path > net/virtio: reuse packed ring xmit functions > net/virtio: add vectorized packed ring Tx path > net/virtio: add election for vectorized path > doc: add packed vectorized path > > config/common_base | 1 + > doc/guides/nics/virtio.rst | 43 +- > drivers/net/virtio/Makefile | 37 ++ > drivers/net/virtio/meson.build | 15 + > drivers/net/virtio/virtio_ethdev.c | 95 ++- > drivers/net/virtio/virtio_ethdev.h | 6 + > drivers/net/virtio/virtio_pci.h | 3 +- > drivers/net/virtio/virtio_rxtx.c | 212 ++----- > drivers/net/virtio/virtio_rxtx_packed_avx.c | 665 ++++++++++++++++++++ > drivers/net/virtio/virtio_user_ethdev.c | 37 +- > drivers/net/virtio/virtqueue.c | 7 +- > drivers/net/virtio/virtqueue.h | 168 ++++- > 12 files changed, 1075 insertions(+), 214 deletions(-) > create mode 100644 drivers/net/virtio/virtio_rxtx_packed_avx.c > > -- > 2.17.1