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 97F7FA0588; Thu, 16 Apr 2020 09:57:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6FCBF1DADC; Thu, 16 Apr 2020 09:57:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1AA0E1DAD1 for ; Thu, 16 Apr 2020 09:57:38 +0200 (CEST) IronPort-SDR: ECohTQQUcgQsV5kjedOqxqclhKrEVEJBFzE5duQhUX3PeZk2+zQOQEhvM8W+Nf3GDjOkiybwiK 0YpqjuZ2FzZA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 00:57:37 -0700 IronPort-SDR: TGOqVOej2RKn4jRkezx9osjOEuA1ROvyNqwI3s1+j9RuCFp3+pS5Ia9MQLlWyuAN2hzkKzzD/D p8DwbbyYZy/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,390,1580803200"; d="scan'208";a="427743368" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58]) by orsmga005.jf.intel.com with ESMTP; 16 Apr 2020 00:57:36 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com Cc: harry.van.haaren@intel.com, dev@dpdk.org, Marvin Liu Date: Thu, 16 Apr 2020 23:31:38 +0800 Message-Id: <20200416153147.110578-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 v5 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. 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 | 639 ++++++++++++++++++ drivers/net/virtio/virtio_user_ethdev.c | 39 +- drivers/net/virtio/virtqueue.c | 7 +- drivers/net/virtio/virtqueue.h | 168 ++++- 14 files changed, 1080 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