From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ECFA6A00C2; Wed, 22 Apr 2020 08:17:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDAF51C24B; Wed, 22 Apr 2020 08:17:34 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7B8F11C24A for ; Wed, 22 Apr 2020 08:17:33 +0200 (CEST) IronPort-SDR: uZKuAG0sjzLI1A2eKBT3MsoRjFklUJ5UhRI8hn8DE4ZcS7WO4EnqrsYiuJtLGCXizA1wzMD5HQ ZLkMIkhdrLJw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 23:17:32 -0700 IronPort-SDR: YAgewm/4Q8NLNQAPKf7MgfqeO26TFYhzpLjI6KSfu/tFfUHlw1Njz6DEoXs00GwZgK1X+kGeGV mzx7yXVPX2iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="279904512" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2020 23:17:30 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com, harry.van.haaren@intel.com Cc: dev@dpdk.org, Marvin Liu Date: Wed, 22 Apr 2020 14:16:15 +0800 Message-Id: <20200422061624.110901-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 v7 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. v7: 1. default vectorization is disabled 2. compilation time check with rte_mbuf structure 3. offsets are calcuated when compiling 4. remove useless barrier as descs are batched store&load 5. vindex of scatter is directly set 6. some comments updates 7. enable vectorized path in meson build v6: 1. fix issue when size not power of 2 v5: 1. remove cpuflags definition as required extensions always come with AVX512F on x86_64 2. inorder actions should depend on feature bit 3. check ring type in rx queue setup 4. rewrite some commit logs 5. fix some checkpatch warnings v4: 1. rename 'packed_vec' to 'vectorized', also used in split ring 2. add RTE_LIBRTE_VIRTIO_INC_VECTOR config for virtio ethdev 3. check required AVX512 extensions cpuflags 4. combine split and packed ring datapath selection logic 5. remove limitation that size must power of two 6. clear 12Bytes virtio_net_hdr v3: 1. remove virtio_net_hdr array for better performance 2. disable 'packed_vec' by default v2: 1. more function blocks replaced by vector instructions 2. clean virtio_net_hdr by vector instruction 3. allow header room size change 4. add 'packed_vec' option in virtio_user vdev 5. fix build not check whether AVX512 enabled 6. 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 | 662 ++++++++++++++++++++ drivers/net/virtio/virtio_user_ethdev.c | 37 +- drivers/net/virtio/virtqueue.c | 7 +- drivers/net/virtio/virtqueue.h | 168 ++++- 12 files changed, 1072 insertions(+), 214 deletions(-) create mode 100644 drivers/net/virtio/virtio_rxtx_packed_avx.c -- 2.17.1