[PATCH v3 1/2] net/i40e: fix MAC address removal

Bruce Richardson bruce.richardson at intel.com
Tue Sep 8 09:38:08 CEST 2026


On Tue, Sep 08, 2026 at 09:18:52AM +0200, David Marchand wrote:
> 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: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
Reviewed-by: Bruce Richardson <bruce.richardson at intel.com>
>  drivers/net/intel/i40e/i40e_ethdev.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..0d914d86ea 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -4513,6 +4513,12 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
>  
>  	macaddr = &(data->mac_addrs[index]);
>  
> +	if (!(pf->flags & I40E_FLAG_VMDQ)) {
> +		if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
> +			PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
> +		return;
> +	}
> +
>  	pool_sel = dev->data->mac_pool_sel[index];
>  
>  	for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
> @@ -4521,8 +4527,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
>  				vsi = pf->main_vsi;
>  			else {
>  				/* No VMDQ pool enabled or configured */
> -				if (!(pf->flags & I40E_FLAG_VMDQ) ||
> -					(i > pf->nb_cfg_vmdq_vsi)) {
> +				if (i > pf->nb_cfg_vmdq_vsi) {
>  					PMD_DRV_LOG(ERR,
>  						"No VMDQ pool enabled/configured");
>  					return;
> -- 
> 2.54.0
> 


More information about the dev mailing list