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 E6EF6A0588; Thu, 16 Apr 2020 16:50:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D98401DD06; Thu, 16 Apr 2020 16:50:23 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id BAB871DCBE for ; Thu, 16 Apr 2020 16:50:21 +0200 (CEST) IronPort-SDR: Vayja+J0fsnJNZC7ESyH+Q9856JF+YUwWwDvMLkNl/1dCdQpNJVlc+CdLGFfhYl+yWXc9GrKQF LWgqRUN8UV8Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 07:50:20 -0700 IronPort-SDR: OogJ+cn5H10Fy2xwn+/tkk8QjRpBbS7BbesmprHSv4XBZM/0gHMaYgYrPodX33pXNA75zW6xf+ cTKI229SHcTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,391,1580803200"; d="scan'208";a="454352659" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58]) by fmsmga005.fm.intel.com with ESMTP; 16 Apr 2020 07:50:18 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Marvin Liu Date: Fri, 17 Apr 2020 06:24:22 +0800 Message-Id: <20200416222431.114184-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 v6 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. 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 + .../nics/features/virtio-packed_vec.ini | 22 + .../{virtio_vec.ini => virtio-split_vec.ini} | 2 +- doc/guides/nics/virtio.rst | 44 +- drivers/net/virtio/Makefile | 36 + drivers/net/virtio/meson.build | 27 +- 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 | 652 ++++++++++++++++++ drivers/net/virtio/virtio_user_ethdev.c | 39 +- drivers/net/virtio/virtqueue.c | 7 +- drivers/net/virtio/virtqueue.h | 168 ++++- 14 files changed, 1093 insertions(+), 221 deletions(-) create mode 100644 doc/guides/nics/features/virtio-packed_vec.ini rename doc/guides/nics/features/{virtio_vec.ini => virtio-split_vec.ini} (88%) create mode 100644 drivers/net/virtio/virtio_rxtx_packed_avx.c -- 2.17.1