The MAC address removal was checking if the hardware supports VMDq
(I40E_FLAG_VMDQ) to decide whether to use pool-based removal.
However, ethdev only populates mac_pool_sel[] when VMDq mode is actually
configured. As a result, when VMDq is supported but not configured,
mac_pool_sel is 0 and no MAC address gets removed.

Fix by checking if VMDq mode is configured, matching the condition
used by ethdev to manage mac_pool_sel[].

Bugzilla ID: 2074
Fixes: 774365884bb8 ("net/i40e: fix MAC address removal")

Signed-off-by: David Marchand <[email protected]>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c 
b/drivers/net/intel/i40e/i40e_ethdev.c
index 2405d9e119..46149134fa 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4501,7 +4501,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t 
index)
 
        macaddr = &(data->mac_addrs[index]);
 
-       if (!(pf->flags & I40E_FLAG_VMDQ)) {
+       if ((dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) == 
0) {
                if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
                        PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
                return;
-- 
2.54.0

Reply via email to