From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net,
Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Keegan Freyhof <keegan.freyhof@broadcom.com>,
Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
Subject: [PATCH 1/8] net/bnxt: remove leftover VMDq code in MAC helpers
Date: Fri, 16 Oct 2026 15:05:47 +0200 [thread overview]
Message-ID: <20261016130555.1685102-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20261016130555.1685102-1-david.marchand@redhat.com>
The VMDq support removal left dead code in MAC address removal and
filter restore functions.
Remove the VMDq flag checks and pool_mask logic that are no longer needed.
At the same time, remove unneeded reset to 0 of VMDq related field in
the dev_info structure.
Fixes: 582f971526da ("net/bnxt: remove VMDq support")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 65 +++++++---------------------------
1 file changed, 13 insertions(+), 52 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 23edd94444..e811651413 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1252,12 +1252,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
* TODO: default_rxconf, default_txconf, rx_desc_lim, and tx_desc_lim
* need further investigation.
*/
- dev_info->max_vmdq_pools = 0;
- dev_info->vmdq_queue_num = 0;
-
- dev_info->vmdq_pool_base = 0;
- dev_info->vmdq_queue_base = 0;
-
dev_info->rx_seg_capa.max_nseg = BNXT_MAX_BUFFER_SPLIT_SEGS;
dev_info->rx_seg_capa.multi_pools = BNXT_MULTI_POOL_BUF_SPLIT_CAP;
dev_info->rx_seg_capa.offset_allowed = BNXT_BUF_SPLIT_OFFSET_CAP;
@@ -1999,39 +1993,23 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
uint32_t index)
{
struct bnxt *bp = eth_dev->data->dev_private;
- uint64_t pool_mask;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
- uint32_t i;
if (is_bnxt_in_error(bp))
return;
- if ((eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) == 0)
- pool_mask = 1;
- else
- pool_mask = eth_dev->data->mac_pool_sel[index];
-
- /*
- * Loop through all VNICs from the specified filter flow pools to
- * remove the corresponding MAC addr filter
- */
- for (i = 0; i < bp->nr_vnics; i++) {
- if (!(pool_mask & (1ULL << i)))
- continue;
-
- vnic = &bp->vnic_info[i];
- filter = STAILQ_FIRST(&vnic->filter);
- while (filter) {
- temp_filter = STAILQ_NEXT(filter, next);
- if (filter->mac_index == index) {
- STAILQ_REMOVE(&vnic->filter, filter,
- bnxt_filter_info, next);
- bnxt_hwrm_clear_l2_filter(bp, filter);
- bnxt_free_filter(bp, filter);
- }
- filter = temp_filter;
+ vnic = &bp->vnic_info[0];
+ filter = STAILQ_FIRST(&vnic->filter);
+ while (filter) {
+ temp_filter = STAILQ_NEXT(filter, next);
+ if (filter->mac_index == index) {
+ STAILQ_REMOVE(&vnic->filter, filter,
+ bnxt_filter_info, next);
+ bnxt_hwrm_clear_l2_filter(bp, filter);
+ bnxt_free_filter(bp, filter);
}
+ filter = temp_filter;
}
}
@@ -4528,10 +4506,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
struct rte_eth_dev *dev = bp->eth_dev;
struct rte_eth_dev_info dev_info;
struct rte_ether_addr *addr;
- uint64_t pool_mask;
- uint32_t pool = 0;
uint32_t i;
- bool vmdq;
int rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
@@ -4541,8 +4516,6 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
if (rc)
return rc;
- vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
-
/* replay MAC address configuration */
for (i = 1; i < dev_info.max_mac_addrs; i++) {
addr = &dev->data->mac_addrs[i];
@@ -4551,21 +4524,9 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
if (rte_is_zero_ether_addr(addr))
continue;
- pool = 0;
- if (!vmdq)
- pool_mask = 1;
- else
- pool_mask = dev->data->mac_pool_sel[i];
-
- do {
- if (pool_mask & 1ULL) {
- rc = bnxt_mac_addr_add_op(dev, addr, i, pool);
- if (rc)
- return rc;
- }
- pool_mask >>= 1;
- pool++;
- } while (pool_mask);
+ rc = bnxt_mac_addr_add_op(dev, addr, i, 0);
+ if (rc)
+ return rc;
}
return 0;
--
2.54.0
next prev parent reply other threads:[~2026-10-16 13:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 13:05 [PATCH 0/8] Validate multiqueue configuration in ethdev David Marchand
2026-10-16 13:05 ` David Marchand [this message]
2026-10-16 13:05 ` [PATCH 2/8] drivers/net: fix reported VMDq capability David Marchand
2026-10-16 13:05 ` [PATCH 3/8] drivers/net: remove check on VMDq modes David Marchand
2026-10-16 13:05 ` [PATCH 4/8] devtools: check VMDq capability David Marchand
2026-10-16 13:05 ` [PATCH 5/8] ethdev: check DCB availability David Marchand
2026-10-16 13:05 ` [PATCH 6/8] drivers/net: fix reported RSS capability David Marchand
2026-10-16 13:05 ` [PATCH 7/8] ethdev: check RSS availability David Marchand
2026-10-16 13:05 ` [PATCH 8/8] ethdev: check unknown Rx/Tx multi-queue modes David Marchand
2026-10-16 16:44 ` [PATCH 0/8] Validate multiqueue configuration in ethdev Stephen Hemminger
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=20261016130555.1685102-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=keegan.freyhof@broadcom.com \
--cc=kishore.padmanabha@broadcom.com \
--cc=mohammad-shuab.siddique@broadcom.com \
--cc=thomas@monjalon.net \
/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