From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>, stable@dpdk.org
Subject: [PATCH 06/18] net/bnxt: support backward compatibility
Date: Thu, 21 Dec 2023 10:05:17 -0800 [thread overview]
Message-ID: <20231221180529.18687-7-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20231221180529.18687-1-ajit.khaparde@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
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
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_hwrm.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index cfdbfd3f54..cd85a944e8 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -974,6 +974,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 a1f3a8251f..d649f217ec 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -901,6 +901,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;
memcpy(bp->dsn, resp->device_serial_number, sizeof(bp->dsn));
if (BNXT_PF(bp))
--
2.39.2 (Apple Git-143)
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]
next prev parent reply other threads:[~2023-12-21 18:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 18:05 [PATCH 00/18] bnxt patchset Ajit Khaparde
2023-12-21 18:05 ` [PATCH 01/18] net/bnxt: add support for UDP GSO Ajit Khaparde
2023-12-21 18:05 ` [PATCH 02/18] net/bnxt: add support for compressed Rx CQE Ajit Khaparde
2023-12-21 18:05 ` [PATCH 03/18] net/bnxt: fix a typo while parsing link speed Ajit Khaparde
2023-12-21 18:05 ` [PATCH 04/18] net/bnxt: fix setting 50G and 100G forced speed Ajit Khaparde
2023-12-21 18:05 ` [PATCH 05/18] net/bnxt: fix speed change from 200G to 25G on Thor Ajit Khaparde
2023-12-21 18:05 ` Ajit Khaparde [this message]
2023-12-21 18:05 ` [PATCH 07/18] net/bnxt: reattempt mbuf allocation for Rx and AGG rings Ajit Khaparde
2023-12-21 18:05 ` [PATCH 08/18] net/bnxt: refactor Rx doorbell during Rx flush Ajit Khaparde
2023-12-21 18:05 ` [PATCH 09/18] net/bnxt: extend RSS hash support for P7 devices Ajit Khaparde
2023-12-21 18:05 ` [PATCH 10/18] net/bnxt: add flow query callback Ajit Khaparde
2023-12-21 18:05 ` [PATCH 11/18] net/bnxt: add ESP and AH header based RSS support Ajit Khaparde
2023-12-21 18:05 ` [PATCH 12/18] net/bnxt: set allmulti mode if multicast filter fails Ajit Khaparde
2023-12-21 18:05 ` [PATCH 13/18] net/bnxt: add VF FLR async event handler Ajit Khaparde
2023-12-21 18:05 ` [PATCH 14/18] net/bnxt: add tunnel TPA support Ajit Khaparde
2023-12-21 18:05 ` [PATCH 15/18] net/bnxt: add 400G get support for P7 devices Ajit Khaparde
2023-12-21 18:05 ` [PATCH 16/18] net/bnxt: query extended stats from firmware Ajit Khaparde
2023-12-21 18:05 ` [PATCH 17/18] net/bnxt: add AVX2 support for compressed CQE Ajit Khaparde
2023-12-21 18:05 ` [PATCH 18/18] net/bnxt: enable SSE mode " Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231221180529.18687-7-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).