patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Huisong Li <lihuisong@huawei.com>
Cc: Dongdong Liu <liudongdong3@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: fix order in NEON Rx' has been queued to stable release 21.11.6
Date: Thu,  2 Nov 2023 13:11:17 +0000	[thread overview]
Message-ID: <20231102131254.315947-11-ktraynor@redhat.com> (raw)
In-Reply-To: <20231102131254.315947-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.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 11/08/23. 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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/03a4383ed726dce9be60a4e098cc186882639e4e

Thanks.

Kevin

---
From 03a4383ed726dce9be60a4e098cc186882639e4e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 11 Jul 2023 18:24:45 +0800
Subject: [PATCH] net/hns3: fix order in NEON Rx

[ upstream commit 7dd439ed998c36c8d0204c436cc656af08cfa5fc ]

This patch reorders the order of the NEON Rx for better maintenance
and easier understanding.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 80 +++++++++++----------------
 1 file changed, 32 insertions(+), 48 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index a5b2011654..2d1ecf93e6 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -181,7 +181,4 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 		bd_vld = vset_lane_u16(rxdp[3].rx.bdtype_vld_udp0, bd_vld, 3);
 
-		/* load 2 mbuf pointer */
-		mbp1 = vld1q_u64((uint64_t *)&sw_ring[pos]);
-
 		bd_vld = vshl_n_u16(bd_vld,
 				    HNS3_UINT16_BIT - 1 - HNS3_RXD_VLD_B);
@@ -190,8 +187,4 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 					   HNS3_UINT16_BIT - 1));
 		stat = ~vget_lane_u64(vreinterpret_u64_u16(bd_vld), 0);
-
-		/* load 2 mbuf pointer again */
-		mbp2 = vld1q_u64((uint64_t *)&sw_ring[pos + 2]);
-
 		if (likely(stat == 0))
 			bd_valid_num = HNS3_DEFAULT_DESCS_PER_LOOP;
@@ -201,18 +194,18 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 			break;
 
+		/* load 4 mbuf pointer */
+		mbp1 = vld1q_u64((uint64_t *)&sw_ring[pos]);
+		mbp2 = vld1q_u64((uint64_t *)&sw_ring[pos + 2]);
+
+		/* store 4 mbuf pointer into rx_pkts */
+		vst1q_u64((uint64_t *)&rx_pkts[pos], mbp1);
+		vst1q_u64((uint64_t *)&rx_pkts[pos + 2], mbp2);
+
 		/* use offset to control below data load oper ordering */
 		offset = rxq->offset_table[bd_valid_num];
 
-		/* store 2 mbuf pointer into rx_pkts */
-		vst1q_u64((uint64_t *)&rx_pkts[pos], mbp1);
-
-		/* read first two descs */
+		/* read 4 descs */
 		descs[0] = vld2q_u64((uint64_t *)(rxdp + offset));
 		descs[1] = vld2q_u64((uint64_t *)(rxdp + offset + 1));
-
-		/* store 2 mbuf pointer into rx_pkts again */
-		vst1q_u64((uint64_t *)&rx_pkts[pos + 2], mbp2);
-
-		/* read remains two descs */
 		descs[2] = vld2q_u64((uint64_t *)(rxdp + offset + 2));
 		descs[3] = vld2q_u64((uint64_t *)(rxdp + offset + 3));
@@ -222,21 +215,4 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 		pkt_mbuf2.val[0] = vreinterpretq_u8_u64(descs[1].val[0]);
 		pkt_mbuf2.val[1] = vreinterpretq_u8_u64(descs[1].val[1]);
-
-		/* pkt 1,2 convert format from desc to pktmbuf */
-		pkt_mb1 = vqtbl2q_u8(pkt_mbuf1, shuf_desc_fields_msk);
-		pkt_mb2 = vqtbl2q_u8(pkt_mbuf2, shuf_desc_fields_msk);
-
-		/* store the first 8 bytes of pkt 1,2 mbuf's rearm_data */
-		*(uint64_t *)&sw_ring[pos + 0].mbuf->rearm_data =
-			rxq->mbuf_initializer;
-		*(uint64_t *)&sw_ring[pos + 1].mbuf->rearm_data =
-			rxq->mbuf_initializer;
-
-		/* pkt 1,2 remove crc */
-		tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb1), crc_adjust);
-		pkt_mb1 = vreinterpretq_u8_u16(tmp);
-		tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb2), crc_adjust);
-		pkt_mb2 = vreinterpretq_u8_u16(tmp);
-
 		pkt_mbuf3.val[0] = vreinterpretq_u8_u64(descs[2].val[0]);
 		pkt_mbuf3.val[1] = vreinterpretq_u8_u64(descs[2].val[1]);
@@ -244,15 +220,15 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 		pkt_mbuf4.val[1] = vreinterpretq_u8_u64(descs[3].val[1]);
 
-		/* pkt 3,4 convert format from desc to pktmbuf */
+		/* 4 packets convert format from desc to pktmbuf */
+		pkt_mb1 = vqtbl2q_u8(pkt_mbuf1, shuf_desc_fields_msk);
+		pkt_mb2 = vqtbl2q_u8(pkt_mbuf2, shuf_desc_fields_msk);
 		pkt_mb3 = vqtbl2q_u8(pkt_mbuf3, shuf_desc_fields_msk);
 		pkt_mb4 = vqtbl2q_u8(pkt_mbuf4, shuf_desc_fields_msk);
 
-		/* pkt 1,2 save to rx_pkts mbuf */
-		vst1q_u8((void *)&sw_ring[pos + 0].mbuf->rx_descriptor_fields1,
-			 pkt_mb1);
-		vst1q_u8((void *)&sw_ring[pos + 1].mbuf->rx_descriptor_fields1,
-			 pkt_mb2);
-
-		/* pkt 3,4 remove crc */
+		/* 4 packets remove crc */
+		tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb1), crc_adjust);
+		pkt_mb1 = vreinterpretq_u8_u16(tmp);
+		tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb2), crc_adjust);
+		pkt_mb2 = vreinterpretq_u8_u16(tmp);
 		tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb3), crc_adjust);
 		pkt_mb3 = vreinterpretq_u8_u16(tmp);
@@ -260,11 +236,9 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 		pkt_mb4 = vreinterpretq_u8_u16(tmp);
 
-		/* store the first 8 bytes of pkt 3,4 mbuf's rearm_data */
-		*(uint64_t *)&sw_ring[pos + 2].mbuf->rearm_data =
-			rxq->mbuf_initializer;
-		*(uint64_t *)&sw_ring[pos + 3].mbuf->rearm_data =
-			rxq->mbuf_initializer;
-
-		/* pkt 3,4 save to rx_pkts mbuf */
+		/* save packet info to rx_pkts mbuf */
+		vst1q_u8((void *)&sw_ring[pos + 0].mbuf->rx_descriptor_fields1,
+			 pkt_mb1);
+		vst1q_u8((void *)&sw_ring[pos + 1].mbuf->rx_descriptor_fields1,
+			 pkt_mb2);
 		vst1q_u8((void *)&sw_ring[pos + 2].mbuf->rx_descriptor_fields1,
 			 pkt_mb3);
@@ -272,4 +246,14 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 			 pkt_mb4);
 
+		/* store the first 8 bytes of packets mbuf's rearm_data */
+		*(uint64_t *)&sw_ring[pos + 0].mbuf->rearm_data =
+			rxq->mbuf_initializer;
+		*(uint64_t *)&sw_ring[pos + 1].mbuf->rearm_data =
+			rxq->mbuf_initializer;
+		*(uint64_t *)&sw_ring[pos + 2].mbuf->rearm_data =
+			rxq->mbuf_initializer;
+		*(uint64_t *)&sw_ring[pos + 3].mbuf->rearm_data =
+			rxq->mbuf_initializer;
+
 		rte_prefetch_non_temporal(rxdp + HNS3_DEFAULT_DESCS_PER_LOOP);
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-02 13:09:41.165996965 +0000
+++ 0011-net-hns3-fix-order-in-NEON-Rx.patch	2023-11-02 13:09:40.781163233 +0000
@@ -1 +1 @@
-From 7dd439ed998c36c8d0204c436cc656af08cfa5fc Mon Sep 17 00:00:00 2001
+From 03a4383ed726dce9be60a4e098cc186882639e4e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dd439ed998c36c8d0204c436cc656af08cfa5fc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 564d831a48..0dc6b9f0a2 100644
+index a5b2011654..2d1ecf93e6 100644


  parent reply	other threads:[~2023-11-02 13:13 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 13:11 patch 'mempool: fix default ops for an empty mempool' " Kevin Traynor
2023-11-02 13:11 ` patch 'eal/unix: fix firmware reading with external xz helper' " Kevin Traynor
2023-11-02 13:11 ` patch 'rawdev: fix device class in log message' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/bonding: fix header for C++' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: set max Rx packet length for representors' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: account for data offset on Tx' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: add missing error code indication to MAE init path' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix VF default MAC modified when set failed' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix error code for multicast resource' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix flushing multicast MAC address' " Kevin Traynor
2023-11-02 13:11 ` Kevin Traynor [this message]
2023-11-02 13:11 ` patch 'random: initialize state for unregistered non-EAL threads' " Kevin Traynor
2023-11-02 13:11 ` patch 'bus/dpaa: fix build with asserts for GCC 13' " Kevin Traynor
2023-11-02 13:11 ` patch 'hash: align SSE lookup to scalar implementation' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/netvsc: increase VSP response timeout to 60 seconds' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: add Tx queue maximum limit' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: fix GRE tunnel packet checksum' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: fix flow control' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: reconfigure MAC Rx when link update' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: keep link down after device close' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: check process type in close operation' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/tap: use MAC address parse API instead of local parser' " Kevin Traynor
2023-11-02 13:11 ` patch 'app/testpmd: fix help string' " Kevin Traynor
2023-11-02 13:11 ` patch 'cryptodev: add missing doc for security context' " Kevin Traynor
2023-11-02 13:11 ` patch 'doc: replace code blocks with includes in security guide' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: fix IV in some vectors' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: skip some synchronous tests with CPU crypto' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: fix typo in asym tests' " Kevin Traynor
2023-11-02 13:11 ` patch 'crypto/ipsec_mb: add dependency check for cross build' " Kevin Traynor
2023-11-02 13:11 ` patch 'eventdev: fix symbol export for port maintenance' " Kevin Traynor
2023-11-02 13:11 ` patch 'bus/pci: fix device ID log' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/cnxk: fix getwork mode devargs parsing' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/cnxk: fix return values for capability API' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/event: fix crypto null device creation' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/sw: remove obsolete comment' " Kevin Traynor
2023-11-02 13:11 ` patch 'eventdev/eth_rx: fix timestamp field register in mbuf' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/sw: fix ordering corruption with op release' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix default flow action setting' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix xstats for different packet sizes' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix different size bit operations' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/cnxk: fix uninitialized variable' " Kevin Traynor
2023-11-02 13:11 ` Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix DPI memzone name' " Kevin Traynor
2023-11-02 13:11 ` patch 'dma/cnxk: fix device state' " Kevin Traynor
2023-11-02 13:11 ` patch 'mempool/cnxk: fix free from non-EAL threads' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix aura disable handling' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: remove dead Meson code' " Kevin Traynor
2023-11-02 13:11 ` patch 'baseband/acc: fix ACC100 HARQ input alignment' " Kevin Traynor
2023-11-02 13:11 ` patch 'app/bbdev: fix link with NXP LA12XX' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/i40e: fix FDIR queue receives broadcast packets' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: write timestamp to first segment in scattered Rx' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix VLAN offload strip flag' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix checksum offloading' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/i40e: fix buffer leak on Rx reconfiguration' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix TM configuration clearing' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix port stats " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: unregister interrupt handler before FD close' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix ESN session update' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix initial link status' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix Tx debug' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: remove log from Tx prepare function' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix TSO with big segments' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: remove log from Tx prepare function' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix TSO with big segments' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mlx5: fix leak in sysfs port name translation' " Kevin Traynor
2023-11-02 13:12 ` patch 'fib: fix adding default route overwriting entire table' " Kevin Traynor
2023-11-02 13:12 ` patch 'fib6: fix adding default route as first route' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/af_packet: fix Rx and Tx queue state' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/af_xdp: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/avp: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bnx2x: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bnxt: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bonding: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/cxgbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/dpaa: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/dpaa2: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/e1000: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ena: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/enetc: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/enic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/hinic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ipn3ke: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/memif: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mlx4: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mvneta: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mvpp2: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/null: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/octeon_ep: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/pfe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ring: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/sfc: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/softnic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/txgbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/vhost: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/virtio: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/vmxnet3: " Kevin Traynor
2023-11-02 13:12 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bonding: fix link status callback stop' " Kevin Traynor
2023-11-02 13:12 ` patch 'app/procinfo: remove unnecessary rte_malloc' " Kevin Traynor
2023-11-02 13:12 ` patch 'malloc: remove return from void functions' " 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=20231102131254.315947-11-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=lihuisong@huawei.com \
    --cc=liudongdong3@huawei.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).