[dpdk-stable] patch 'net/bnxt: fix doorbell write ordering' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:15:56 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/21d9bef593e7bd47558e9dd54f5057efa1c9f7b4

Thanks.

Luca Boccassi

---
>From 21d9bef593e7bd47558e9dd54f5057efa1c9f7b4 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson at broadcom.com>
Date: Mon, 14 Dec 2020 13:56:38 -0500
Subject: [PATCH] net/bnxt: fix doorbell write ordering

[ upstream commit 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 ]

Write completion queue doorbell before receive descriptor
doorbell to avoid possibility of completion queue overflow
when completion queue size is equal to receive descriptor
ring size. Remove unnecessary compiler barriers (db write
functions have the necessary barriers.)

Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")

Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index cadc598cf2..c5d23050e6 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -907,6 +907,10 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		goto done;
 	}
 
+	/* Ring the completion queue doorbell. */
+	bnxt_db_cq(cpr);
+
+	/* Ring the receive descriptor doorbell. */
 	if (prod != rxr->rx_prod)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 
@@ -914,8 +918,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	if (ag_prod != rxr->ag_prod)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 
-	bnxt_db_cq(cpr);
-
 	/* Attempt to alloc Rx buf in case of a previous allocation failure. */
 	if (rc == -ENOMEM) {
 		int i = RING_NEXT(rxr->rx_ring_struct, prod);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:32.402716787 +0000
+++ 0070-net-bnxt-fix-doorbell-write-ordering.patch	2021-02-05 11:18:28.838691721 +0000
@@ -1 +1 @@
-From 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 Mon Sep 17 00:00:00 2001
+From 21d9bef593e7bd47558e9dd54f5057efa1c9f7b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73d1cc96be6a7b49d7d3d79b5a1daa1d94d57956 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/bnxt/bnxt_rxr.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/bnxt/bnxt_rxr.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -23 +24 @@
-index e2d388e69f..ffdeeecc3a 100644
+index cadc598cf2..c5d23050e6 100644
@@ -26 +27 @@
-@@ -917,17 +917,17 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -907,6 +907,10 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -30 +30,0 @@
--	rte_compiler_barrier();
@@ -35,2 +35,2 @@
- 	if (rx_raw_prod != rxr->rx_raw_prod)
- 		bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
+ 	if (prod != rxr->rx_prod)
+ 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
@@ -38,4 +38,3 @@
--	rte_compiler_barrier();
- 	/* Ring the AGG ring DB */
- 	if (ag_raw_prod != rxr->ag_raw_prod)
- 		bnxt_db_write(&rxr->ag_db, rxr->ag_raw_prod);
+@@ -914,8 +918,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ 	if (ag_prod != rxr->ag_prod)
+ 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
@@ -47 +46 @@
- 		int i = RING_NEXT(rx_raw_prod);
+ 		int i = RING_NEXT(rxr->rx_ring_struct, prod);


More information about the stable mailing list