[PATCH] net/bnxt: remove redundant Rx queue array check
Evgeny Sokolov
Evgeny.Sokolov at infotecs.ru
Tue Sep 15 11:05:24 CEST 2026
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) {
--
2.30.2
More information about the stable
mailing list