[PATCH] net/bnxt: remove redundant Rx queue array check

Kishore Padmanabha kishore.padmanabha at broadcom.com
Mon Sep 21 21:25:01 CEST 2026


On Tue, Sep 15, 2026 at 5:05 AM Evgeny Sokolov <Evgeny.Sokolov at infotecs.ru>
wrote:

> From: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
>
> The rx_queues array is allocated during device configuration
> before nb_rx_queues is set. Since bnxt_rx_queue_setup_op() is
> called from rte_eth_rx_queue_setup(), which validates the queue
> index against nb_rx_queues, the rx_queues NULL check is redundant.
>
> Remove the unnecessary condition.
>
> Signed-off-by: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
> Cc: stable at dpdk.org
> ---
>  drivers/net/bnxt/bnxt_rxq.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
> index 023cb0e174..a89d5ab611 100644
> --- a/drivers/net/bnxt/bnxt_rxq.c
> +++ b/drivers/net/bnxt/bnxt_rxq.c
> @@ -370,11 +370,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev
> *eth_dev,
>                 return -EINVAL;
>         }
>
> -       if (eth_dev->data->rx_queues) {
> -               rxq = eth_dev->data->rx_queues[queue_idx];
> -               if (rxq)
> -                       bnxt_rx_queue_release_op(eth_dev, queue_idx);
> -       }
> +       rxq = eth_dev->data->rx_queues[queue_idx];
> +       if (rxq)
> +               bnxt_rx_queue_release_op(eth_dev, queue_idx);
>         rxq = rte_zmalloc_socket("bnxt_rx_queue", sizeof(struct
> bnxt_rx_queue),
>                                  RTE_CACHE_LINE_SIZE, socket_id);
>         if (!rxq) {
> --

Acked-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>

>
> 2.30.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/2fa854f9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5493 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/2fa854f9/attachment.bin>


More information about the stable mailing list