[dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' has been queued to stable release 19.11.7
Christian Ehrhardt
christian.ehrhardt at canonical.com
Thu Feb 4 12:27:53 CET 2021
Hi,
FYI, your patch has been queued to stable release 19.11.7
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/06/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/bdae17156a190112880828fe963fc2806bb9e6b2
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From bdae17156a190112880828fe963fc2806bb9e6b2 Mon Sep 17 00:00:00 2001
From: Samik Gupta <samik.gupta at broadcom.com>
Date: Thu, 12 Nov 2020 13:28:25 -0800
Subject: [PATCH] net/bnxt: fix Rx rings in RSS redirection table
[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]
This commit introduces a limit on the number of RX rings included in
the RSS redirection table to a value no larger than the size supported
by Thor as defined by BNXT_RSS_TBL_SIZE_THOR.
Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations")
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Signed-off-by: Samik Gupta <samik.gupta at broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 3700a277c7..940b41767c 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -344,7 +344,7 @@ struct bnxt_coal {
#define DBR_TYPE_NQ (0xaULL << 60)
#define DBR_TYPE_NQ_ARM (0xbULL << 60)
-#define BNXT_RSS_TBL_SIZE_THOR 512
+#define BNXT_RSS_TBL_SIZE_THOR 512U
#define BNXT_RSS_ENTRIES_PER_CTX_THOR 64
#define BNXT_MAX_RSS_CTXTS_THOR \
(BNXT_RSS_TBL_SIZE_THOR / BNXT_RSS_ENTRIES_PER_CTX_THOR)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fc8532a464..1579714b35 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -153,12 +153,15 @@ int is_bnxt_in_error(struct bnxt *bp)
uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
{
+ unsigned int num_rss_rings = RTE_MIN(bp->rx_nr_rings,
+ BNXT_RSS_TBL_SIZE_THOR);
+
if (!BNXT_CHIP_THOR(bp))
return 1;
- return RTE_ALIGN_MUL_CEIL(bp->rx_nr_rings,
+ return RTE_ALIGN_MUL_CEIL(num_rss_rings,
BNXT_RSS_ENTRIES_PER_CTX_THOR) /
- BNXT_RSS_ENTRIES_PER_CTX_THOR;
+ BNXT_RSS_ENTRIES_PER_CTX_THOR;
}
static uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
@@ -254,6 +257,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) {
int j, nr_ctxs = bnxt_rss_ctxts(bp);
+ if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) {
+ PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
+ bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR);
+ PMD_DRV_LOG(ERR,
+ "Only queues 0-%d will be in RSS table\n",
+ BNXT_RSS_TBL_SIZE_THOR - 1);
+ }
+
rc = 0;
for (j = 0; j < nr_ctxs; j++) {
rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, j);
--
2.30.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-02-04 12:04:28.950927829 +0100
+++ 0018-net-bnxt-fix-Rx-rings-in-RSS-redirection-table.patch 2021-02-04 12:04:27.870789574 +0100
@@ -1 +1 @@
-From d424af43e6c32aec83be8f1380271ff33ed0b89a Mon Sep 17 00:00:00 2001
+From bdae17156a190112880828fe963fc2806bb9e6b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 90ced972c0..9bd4f1da97 100644
+index 3700a277c7..940b41767c 100644
@@ -24 +25 @@
-@@ -389,7 +389,7 @@ struct bnxt_coal {
+@@ -344,7 +344,7 @@ struct bnxt_coal {
@@ -34 +35 @@
-index 81c8f8d79d..c363c8427a 100644
+index fc8532a464..1579714b35 100644
@@ -37 +38 @@
-@@ -207,12 +207,15 @@ int is_bnxt_in_error(struct bnxt *bp)
+@@ -153,12 +153,15 @@ int is_bnxt_in_error(struct bnxt *bp)
@@ -39 +40 @@
- static uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
+ uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
@@ -54,2 +55,2 @@
- uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
-@@ -424,6 +427,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+ static uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
+@@ -254,6 +257,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
More information about the stable
mailing list