[dpdk-stable] patch 'net/bnxt: fix setting max RSS contexts' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:59:09 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 12/16/19. 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/044ad35701140f6b06e893a3da4a34d6ecd5d353

Thanks.

Kevin.

---
>From 044ad35701140f6b06e893a3da4a34d6ecd5d353 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Thu, 24 Oct 2019 13:14:18 +0530
Subject: [PATCH] net/bnxt: fix setting max RSS contexts

[ upstream commit 32e970c1668ddfb892a5fda35ab962f27ba62d9f ]

Configure max RSS contexts in case the firmware indicates a maximal
resource reservation strategy.

Fixes: 6d8109bcb398 ("net/bnxt: check VF resources if resource manager is enabled")

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 8 ++++++--
 drivers/net/bnxt/bnxt_hwrm.h | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 596ab3658..1f8996b7c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -702,5 +702,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
 	HWRM_PREP(req, FUNC_VF_CFG, BNXT_USE_CHIMP_MB);
 
-	req.enables = rte_cpu_to_le_32
+	enables = rte_cpu_to_le_32
 			(HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS  |
 			HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS   |
@@ -723,8 +723,11 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
 				HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS |
 				HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS;
-		req.enables |= rte_cpu_to_le_32(enables);
 		req.num_rsscos_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX);
 		req.num_l2_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_L2_CTX);
 		req.num_vnics = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_VNIC);
+	} else if (bp->vf_resv_strategy ==
+		   HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) {
+		enables |= HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS;
+		req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
 	}
 
@@ -738,4 +741,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
 
 	req.flags = rte_cpu_to_le_32(flags);
+	req.enables |= rte_cpu_to_le_32(enables);
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index ec9b3e007..a3a481b2b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -32,4 +32,6 @@ struct bnxt_cp_ring_info;
 #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC \
 	HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
+#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL \
+	HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MAXIMAL
 
 #define HWRM_SPEC_CODE_1_8_4		0x10804
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:41.468886653 +0000
+++ 0035-net-bnxt-fix-setting-max-RSS-contexts.patch	2019-12-10 14:49:39.062457581 +0000
@@ -1 +1 @@
-From 32e970c1668ddfb892a5fda35ab962f27ba62d9f Mon Sep 17 00:00:00 2001
+From 044ad35701140f6b06e893a3da4a34d6ecd5d353 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32e970c1668ddfb892a5fda35ab962f27ba62d9f ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -16 +17 @@
- drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
+ drivers/net/bnxt/bnxt_hwrm.c | 8 ++++++--
@@ -18 +19 @@
- 2 files changed, 6 insertions(+)
+ 2 files changed, 8 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index 018113c4c..3eedd08ee 100644
+index 596ab3658..1f8996b7c 100644
@@ -24 +25,12 @@
-@@ -860,4 +860,8 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
+@@ -702,5 +702,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
+ 	HWRM_PREP(req, FUNC_VF_CFG, BNXT_USE_CHIMP_MB);
+ 
+-	req.enables = rte_cpu_to_le_32
++	enables = rte_cpu_to_le_32
+ 			(HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS  |
+ 			HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS   |
+@@ -723,8 +723,11 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
+ 				HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS |
+ 				HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS;
+-		req.enables |= rte_cpu_to_le_32(enables);
+ 		req.num_rsscos_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX);
@@ -32,0 +45,6 @@
+@@ -738,4 +741,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
+ 
+ 	req.flags = rte_cpu_to_le_32(flags);
++	req.enables |= rte_cpu_to_le_32(enables);
+ 
+ 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -34 +52 @@
-index fcbce6058..abe5de9db 100644
+index ec9b3e007..a3a481b2b 100644
@@ -37 +55 @@
-@@ -38,4 +38,6 @@ struct bnxt_cp_ring_info;
+@@ -32,4 +32,6 @@ struct bnxt_cp_ring_info;
@@ -43 +61 @@
- #define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_L2_HDR_SRC_FILTER_EN \
+ #define HWRM_SPEC_CODE_1_8_4		0x10804



More information about the stable mailing list