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 51F98A0563; Wed, 15 Apr 2020 11:13:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EBFD11D607; Wed, 15 Apr 2020 11:13:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1E1951D5CC for ; Wed, 15 Apr 2020 11:13:18 +0200 (CEST) IronPort-SDR: g17nJvmyrslXdSCo4ZM+ifLl2/bhsG6VHIxKsfX319V20NkxbQ5JMaq9YhyPHgjNcuvh1K6y8N shH4Hv+G9I5g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2020 02:13:18 -0700 IronPort-SDR: jYr/ZSR+bn7XWZs9OcpzZ0aUMxDRmORbMHaVrwP8oabTcSachunh0JyQ+9IMMhx/Kyg57HCN/S 6zWFE1WMTFdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,386,1580803200"; d="scan'208";a="400250825" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58]) by orsmga004.jf.intel.com with ESMTP; 15 Apr 2020 02:13:16 -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 00:47:25 +0800 Message-Id: <20200415164733.75416-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 v4 0/8] add packed ring vectorized datapath 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 datapath 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 datapath can fully transformed into vectorized datapath. Rx datapath also can be vectorized when features limiated(LRO and mergable disabled). User can specify whether disable vectorized packed ring datapath by 'packed_vec' parameter of virtio user vdev. 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 (8): net/virtio: enable vectorized datapath net/virtio-user: add vectorized datapath parameter net/virtio: add vectorized packed ring Rx function net/virtio: reuse packed ring xmit functions net/virtio: add vectorized packed ring Tx datapath eal/x86: identify AVX512 extensions flag net/virtio: add election for vectorized datapath doc: add packed vectorized datapath 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 | 13 + 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 | 182 +---- drivers/net/virtio/virtio_rxtx_packed_avx.c | 637 ++++++++++++++++++ drivers/net/virtio/virtio_user_ethdev.c | 36 +- drivers/net/virtio/virtqueue.c | 6 +- drivers/net/virtio/virtqueue.h | 163 ++++- lib/librte_eal/common/arch/x86/rte_cpuflags.c | 3 + .../common/include/arch/x86/rte_cpuflags.h | 3 + 16 files changed, 1040 insertions(+), 212 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