patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: Gavin Hu <gavin.hu@arm.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe: support packet type with NEON' has been queued to LTS release 18.11.6
Date: Wed, 11 Dec 2019 21:25:55 +0000	[thread overview]
Message-ID: <20191211212702.27851-3-ktraynor@redhat.com> (raw)
In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/17/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/295b2079b0cd80810dbad09c5e154b2590015065

Thanks.

Kevin.

---
From 295b2079b0cd80810dbad09c5e154b2590015065 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 24 Oct 2019 10:58:02 +0800
Subject: [PATCH] net/ixgbe: support packet type with NEON

[ upstream commit 41fdc03e72c55ac7f28f0d52f3c1935a19015180 ]

Ptype parse is missing in aarch64 vector PMD. It makes packet type info
provided by NIC get lost, thus requires extra CPU cycles to do this.
Add the parse process to utilize NIC hardware capability.

In test with l3fwd (removed port conf DEV_RX_OFFLOAD_CHECKSUM),
observed over 3% performance gain.

Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c        |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 64 +++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 5492f5f5f..74de2ff4e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3882,5 +3882,5 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		return ptypes;
 
-#if defined(RTE_ARCH_X86)
+#if defined(RTE_ARCH_X86) || defined(RTE_MACHINE_CPUFLAG_NEON)
 	if (dev->rx_pkt_burst == ixgbe_recv_pkts_vec ||
 	    dev->rx_pkt_burst == ixgbe_recv_scattered_pkts_vec)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
index 07f2fafe7..fa73d1e45 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -146,4 +146,66 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
 #define IXGBE_VPMD_DESC_EOP_MASK	0x02020202
 
+static inline uint32_t
+get_packet_type(uint32_t pkt_info,
+		uint32_t etqf_check,
+		uint32_t tunnel_check)
+{
+	if (etqf_check)
+		return RTE_PTYPE_UNKNOWN;
+
+	if (tunnel_check) {
+		pkt_info &= IXGBE_PACKET_TYPE_MASK_TUNNEL;
+		return ptype_table_tn[pkt_info];
+	}
+
+	pkt_info &= IXGBE_PACKET_TYPE_MASK_82599;
+	return ptype_table[pkt_info];
+}
+
+static inline void
+desc_to_ptype_v(uint64x2_t descs[4], uint16_t pkt_type_mask,
+		struct rte_mbuf **rx_pkts)
+{
+	uint32x4_t etqf_check, tunnel_check;
+	uint32x4_t etqf_mask = vdupq_n_u32(0x8000);
+	uint32x4_t tunnel_mask = vdupq_n_u32(0x10000);
+	uint32x4_t ptype_mask = vdupq_n_u32((uint32_t)pkt_type_mask);
+	uint32x4_t ptype0 = vzipq_u32(vreinterpretq_u32_u64(descs[0]),
+				vreinterpretq_u32_u64(descs[2])).val[0];
+	uint32x4_t ptype1 = vzipq_u32(vreinterpretq_u32_u64(descs[1]),
+				vreinterpretq_u32_u64(descs[3])).val[0];
+
+	/* interleave low 32 bits,
+	 * now we have 4 ptypes in a NEON register
+	 */
+	ptype0 = vzipq_u32(ptype0, ptype1).val[0];
+
+	/* mask etqf bits */
+	etqf_check = vandq_u32(ptype0, etqf_mask);
+	/* mask tunnel bits */
+	tunnel_check = vandq_u32(ptype0, tunnel_mask);
+
+	/* shift right by IXGBE_PACKET_TYPE_SHIFT, and apply ptype mask */
+	ptype0 = vandq_u32(vshrq_n_u32(ptype0, IXGBE_PACKET_TYPE_SHIFT),
+			ptype_mask);
+
+	rx_pkts[0]->packet_type =
+		get_packet_type(vgetq_lane_u32(ptype0, 0),
+				vgetq_lane_u32(etqf_check, 0),
+				vgetq_lane_u32(tunnel_check, 0));
+	rx_pkts[1]->packet_type =
+		get_packet_type(vgetq_lane_u32(ptype0, 1),
+				vgetq_lane_u32(etqf_check, 1),
+				vgetq_lane_u32(tunnel_check, 1));
+	rx_pkts[2]->packet_type =
+		get_packet_type(vgetq_lane_u32(ptype0, 2),
+				vgetq_lane_u32(etqf_check, 2),
+				vgetq_lane_u32(tunnel_check, 2));
+	rx_pkts[3]->packet_type =
+		get_packet_type(vgetq_lane_u32(ptype0, 3),
+				vgetq_lane_u32(etqf_check, 3),
+				vgetq_lane_u32(tunnel_check, 3));
+}
+
 static inline uint16_t
 _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -297,4 +359,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			 pkt_mb1);
 
+		desc_to_ptype_v(descs, rxq->pkt_type_mask, &rx_pkts[pos]);
+
 		stat &= IXGBE_VPMD_DESC_DD_MASK;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:12.966873767 +0000
+++ 0003-net-ixgbe-support-packet-type-with-NEON.patch	2019-12-11 21:24:12.535653945 +0000
@@ -1 +1 @@
-From 41fdc03e72c55ac7f28f0d52f3c1935a19015180 Mon Sep 17 00:00:00 2001
+From 295b2079b0cd80810dbad09c5e154b2590015065 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41fdc03e72c55ac7f28f0d52f3c1935a19015180 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index dbce7a80e..3c7624f3a 100644
+index 5492f5f5f..74de2ff4e 100644
@@ -28 +29 @@
-@@ -3909,5 +3909,5 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -3882,5 +3882,5 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -36 +37 @@
-index 26c0ef5ae..ee11fab96 100644
+index 07f2fafe7..fa73d1e45 100644
@@ -39,2 +40,2 @@
-@@ -147,4 +147,66 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
- #define IXGBE_UINT8_BIT			(CHAR_BIT * sizeof(uint8_t))
+@@ -146,4 +146,66 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
+ #define IXGBE_VPMD_DESC_EOP_MASK	0x02020202
@@ -106 +107 @@
-@@ -304,4 +366,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -297,4 +359,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -111,2 +112,2 @@
- 		/* C.5 calc available number of desc */
- 		if (unlikely(stat == 0)) {
+ 		stat &= IXGBE_VPMD_DESC_DD_MASK;
+ 


  parent reply	other threads:[~2019-12-11 21:27 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 21:25 [dpdk-stable] patch 'net/qede: fix setting MTU' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/qede: fix setting VLAN strip mode' " Kevin Traynor
2019-12-11 21:25 ` Kevin Traynor [this message]
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix MACsec setting' " Kevin Traynor
2019-12-12  2:42   ` Sun, GuinanX
2019-12-12 10:01     ` Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix performance drop caused by MACsec' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
2019-12-11 21:25 ` [dpdk-stable] patch 'net/bnxt: fix debug log level' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix L4 checksum indication in non-vector Rx' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix IP checksum error indication' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'vhost: do not limit packed ring size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'vhost: fix build dependency on hash lib' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/virtio-user: fix setting filters' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/mlx5: allow pattern start from IP' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: fix expand RSS flows' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: fix item expansion for RSS flow' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: fix last item detection on RSS flow expand' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'eal: add ack interrupt API' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/qede: use ack in interrupt handlers' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/enic: re-enable link status change interrupt' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/sfc: fix adapter lock usage on rule creation' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: block xstats for hidden ports' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/dpaa2: fix Rx offload flags on jumbo MTU set' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/vm_power: fix OOB frequency oscillations' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'bus/pci: align next mapping address on page boundary' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'test: optimise fd closing in forks' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix internal links for older releases' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix link to AESNI mb external library' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc/guides: clean repeated words' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'mempool: use actual IOVA addresses when populating' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'build: remove unneeded meson option' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'lib: fix log typos' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'lib: fix doxygen " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix realloc copy size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix realloc padded element " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix default configuration' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/fips_validation: fix auth verify' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/mlx5: fix check of RSS queue index' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix crash in xstats get' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bonding: fix selection logic' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: avoid undefined behaviour on configuration copy' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/bnxt: fix resource qcaps with older FW' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: report invalid command line parameter' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples: hide error for missing pkg-config path flag' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'common/octeontx: add missing public symbol' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/testpmd: fix invalid port detaching' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'power: handle frequency increase with turbo disabled' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'mk: remove library search path from binary' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/multi_process: check server port validity' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'examples/multi_process: fix client crash with sparse ports' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/eventdev: fix divide by zero' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/eventdev: check function errors' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'app/crypto-perf: fix input of AEAD decrypt' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix l2fwd-crypto usage in CCP guide' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix maximum queues and burst size' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix CPU authentication crash' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix scheduling of burst' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'crypto/ccp: fix digest size capabilities' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'malloc: fix memory element size in case of padding' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'eal: fix header file install with meson' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/virtio-user: drop attribute unused for memory callback' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'doc: fix tap guide' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/e1000: fix link status update' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/e1000: " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'net/ifc: check VFIO query error' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'ethdev: limit maximum number of queues' " Kevin Traynor
2019-12-11 21:26 ` [dpdk-stable] patch 'event/octeontx: fix partial Rx packet handling' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'test/service: fix wait for service core' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'usertools: fix typo in SPDX tag of telemetry script' " Kevin Traynor
2019-12-11 21:27 ` [dpdk-stable] patch 'doc: update arm64 cross build tool version' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211212702.27851-3-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=gavin.hu@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).