On Mon,  7 Sep 2026 13:17:24 +0200
David Marchand <[email protected]> wrote:

> 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];
> +

Why bother with the vmdq temporary at all here?
        if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG)
                pool_mask = 1;
        else
                pool_mask = eth_dev->data->mac_pool_sel[index];

Or use ternary if you want here.

Reply via email to