MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <[email protected]>
---
I could not test the change as I don't have this NIC.
Probably worth squashing in 9de506a6c781 before pulling to main
---
drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c6f566c214..d37e2d16c9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2019,14 +2019,21 @@ 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 = eth_dev->data->mac_pool_sel[index];
+ uint64_t pool_mask;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
uint32_t i;
+ bool vmdq;
if (is_bnxt_in_error(bp))
return;
+ vmdq = (eth_dev->data->dev_conf.rxmode.mq_mode &
RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+ if (!vmdq)
+ 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
@@ -4540,6 +4547,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
uint64_t pool_mask;
uint32_t pool = 0;
uint32_t i;
+ bool vmdq;
int rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
@@ -4549,6 +4557,8 @@ 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];
@@ -4558,7 +4568,10 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
continue;
pool = 0;
- pool_mask = dev->data->mac_pool_sel[i];
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = dev->data->mac_pool_sel[i];
do {
if (pool_mask & 1ULL) {
--
2.54.0