[dpdk-stable] patch 'net/i40e: fix descriptor scan on Arm' has been queued to stable release 19.11.10

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:39:37 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/12/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/b8cbdcef10df924b95dd4280cbd26a6f18eff20b

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From b8cbdcef10df924b95dd4280cbd26a6f18eff20b Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong at arm.com>
Date: Tue, 6 Jul 2021 01:54:03 -0500
Subject: [PATCH] net/i40e: fix descriptor scan on Arm

[ upstream commit 65b2ec7b4f6bca9c7436681141d2974c7960d208 ]

For Arm platforms, reading descs can get re-ordered, then the
status of DD bits will be discontinuous, so add the logic to
only process continuous descs by checking DD bits.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Joyce Kong <joyce.kong at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 drivers/net/i40e/i40e_rxtx.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 4dc828357f..582dc5a3e4 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -417,7 +417,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
 	uint16_t pkt_len;
 	uint64_t qword1;
 	uint32_t rx_status;
-	int32_t s[I40E_LOOK_AHEAD], nb_dd;
+	int32_t s[I40E_LOOK_AHEAD], var, nb_dd;
 	int32_t i, j, nb_rx = 0;
 	uint64_t pkt_flags;
 	uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
@@ -450,8 +450,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
 		rte_smp_rmb();
 
 		/* Compute how many status bits were set */
-		for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++)
-			nb_dd += s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
+		for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++) {
+			var = s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
+#ifdef RTE_ARCH_ARM
+			/* For Arm platforms, only compute continuous status bits */
+			if (var)
+				nb_dd += 1;
+			else
+				break;
+#else
+			nb_dd += var;
+#endif
+		}
 
 		nb_rx += nb_dd;
 
-- 
2.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:15.253497281 +0200
+++ 0057-net-i40e-fix-descriptor-scan-on-Arm.patch	2021-08-10 15:11:13.054638359 +0200
@@ -1 +1 @@
-From 65b2ec7b4f6bca9c7436681141d2974c7960d208 Mon Sep 17 00:00:00 2001
+From b8cbdcef10df924b95dd4280cbd26a6f18eff20b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 65b2ec7b4f6bca9c7436681141d2974c7960d208 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 8d65f287f4..e518409fe5 100644
+index 4dc828357f..582dc5a3e4 100644
@@ -23 +24 @@
-@@ -452,7 +452,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
+@@ -417,7 +417,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
@@ -32 +33 @@
-@@ -485,8 +485,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
+@@ -450,8 +450,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)


More information about the stable mailing list