[dpdk-stable] patch 'net/bnxt: fix max rings calculation' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:21:21 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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/13/20. 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.

Thanks.

Luca Boccassi

---
>From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur at broadcom.com>
Date: Thu, 16 Jan 2020 18:34:55 +0530
Subject: [PATCH] net/bnxt: fix max rings calculation

[ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ]

Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.

Account for stat contexts available(one for each ring) along with
no: of completion rings(one for each ring) to cap the max no: of
Tx /Rx rings that can be possibly created.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")

Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index c818bede80..ca54c74155 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -619,12 +619,19 @@ struct bnxt {
 	uint16_t		max_tx_rings;
 	uint16_t		max_rx_rings;
 #define MAX_STINGRAY_RINGS		128U
-#define BNXT_MAX_RINGS(bp) \
+/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
+#define BNXT_MAX_RX_RINGS(bp) \
 	(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \
 					     MAX_STINGRAY_RINGS), \
-				     bp->max_stat_ctx) : \
-				RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx))
+				     bp->max_stat_ctx / 2U) : \
+				RTE_MIN(bp->max_rx_rings, \
+					bp->max_stat_ctx / 2U))
+#define BNXT_MAX_TX_RINGS(bp) \
+	(RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
 
+#define BNXT_MAX_RINGS(bp) \
+	(RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \
+		 BNXT_MAX_TX_RINGS(bp)))
 	uint16_t		max_nq_rings;
 	uint16_t		max_l2_ctx;
 	uint16_t		max_rx_em_flows;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:43.387360114 +0000
+++ 0135-net-bnxt-fix-max-rings-calculation.patch	2020-02-11 11:17:38.644005910 +0000
@@ -1,8 +1,10 @@
-From 93eb13bcb6baf5146798c23ef071ab2ae2489a4f Mon Sep 17 00:00:00 2001
+From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur at broadcom.com>
 Date: Thu, 16 Jan 2020 18:34:55 +0530
 Subject: [PATCH] net/bnxt: fix max rings calculation
 
+[ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ]
+
 Max Tx rings count could be lesser than max Rx rings in some
 cases, so take this into account as well.
 
@@ -11,7 +13,6 @@
 Tx /Rx rings that can be possibly created.
 
 Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
-Cc: stable at dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
 Reviewed-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
@@ -21,10 +22,10 @@
  1 file changed, 10 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 3487b917ed..ddb26814ce 100644
+index c818bede80..ca54c74155 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -622,12 +622,19 @@ struct bnxt {
+@@ -619,12 +619,19 @@ struct bnxt {
  	uint16_t		max_tx_rings;
  	uint16_t		max_rx_rings;
  #define MAX_STINGRAY_RINGS		128U


More information about the stable mailing list