patch 'net/bnxt: fix backward firmware compatibility' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:31:45 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
>From e2cfac4357b258fd569754b7bf13f6a3e858418d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Thu, 7 Dec 2023 07:56:26 -0800
Subject: [PATCH] net/bnxt: fix backward firmware compatibility

[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]

On older firmware versions, HWRM_FUNC_QCAPS response is not
returning the maximum number of multicast filters that can be
supported by the function. As a result, memory allocation with
size 0 fails.

Bugzilla ID: 1309

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt.h      | 1 +
 drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index df6442abc4..5ea6f9b69a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -867,6 +867,7 @@ struct bnxt {
 	struct rte_ether_addr	*mcast_addr_list;
 	rte_iova_t		mc_list_dma_addr;
 	uint32_t		nb_mc_addr;
+#define BNXT_DFLT_MAX_MC_ADDR	16 /* for compatibility with older firmware */
 	uint32_t		max_mcast_addr; /* maximum number of mcast filters supported */
 
 	struct rte_eth_rss_conf	rss_conf; /* RSS configuration. */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 098f84fbae..ad756337da 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -907,7 +907,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		    bp->max_l2_ctx, bp->max_vnics);
 	bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
 	bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
-
+	if (!bp->max_mcast_addr)
+		bp->max_mcast_addr = BNXT_DFLT_MAX_MC_ADDR;
 	if (BNXT_PF(bp)) {
 		bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
 		if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.204526909 +0000
+++ 0088-net-bnxt-fix-backward-firmware-compatibility.patch	2024-03-07 01:05:34.978943837 +0000
@@ -1 +1 @@
-From 589619999b0411a4266e335fe105e1c7cba6e02b Mon Sep 17 00:00:00 2001
+From e2cfac4357b258fd569754b7bf13f6a3e858418d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/bnxt/bnxt_hwrm.c | 2 ++
- 2 files changed, 3 insertions(+)
+ drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
@@ -22 +23 @@
-index 3290c57a72..4b8a691f80 100644
+index df6442abc4..5ea6f9b69a 100644
@@ -25 +26 @@
-@@ -974,6 +974,7 @@ struct bnxt {
+@@ -867,6 +867,7 @@ struct bnxt {
@@ -34 +35 @@
-index 441e3aef51..9260bcb4cd 100644
+index 098f84fbae..ad756337da 100644
@@ -37 +38 @@
-@@ -901,6 +901,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -907,7 +907,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -40,0 +42 @@
+-
@@ -43,3 +45,3 @@
- 	memcpy(bp->dsn, resp->device_serial_number, sizeof(bp->dsn));
- 
- 	if (BNXT_PF(bp))
+ 	if (BNXT_PF(bp)) {
+ 		bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
+ 		if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {


More information about the stable mailing list