On Tue, Sep 15, 2026 at 5:05 AM Evgeny Sokolov <[email protected]> wrote:
> From: Sokolov Evgeny <[email protected]> > > 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 <[email protected]> > Cc: [email protected] > --- > 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 <[email protected]> > > 2.30.2 > >
smime.p7s
Description: S/MIME Cryptographic Signature

