path: root/drivers/net/bnxt/bnxt_rxr.c
diff options
authorKalesh AP <>2019-10-02 10:17:32 -0700
committerFerruh Yigit <>2019-10-08 12:14:30 +0200
commit3955e26870bcc3336c87d1fabe6ebdf18b2a337b (patch)
tree465e8d4483a88684002d1cd7b650e621c916edc8 /drivers/net/bnxt/bnxt_rxr.c
parent09aac391a50c8ea7ed3e87389bd97bb1dca97734 (diff)
net/bnxt: fix Rx queue start/stop
Driver should not change "deferred_start" state of the rx queues. It should get the state in queue_setup_op() and use that value. Since the deferred start state was being used in the packet receive functions to determine whether a stopped rx ring should be polled, introduced a per-rxq flag to track queue stopped/started state. Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop") Cc: Signed-off-by: Kalesh AP <> Signed-off-by: Lance Richardson <> Reviewed-by: Ajit Khaparde <>
Diffstat (limited to 'drivers/net/bnxt/bnxt_rxr.c')
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index f60880c..b3cc0d8 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -574,10 +574,9 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
if (unlikely(is_bnxt_in_error(rxq->bp)))
return 0;
- /* If Rx Q was stopped return. RxQ0 cannot be stopped. */
- if (unlikely(((rxq->rx_deferred_start ||
- !rte_spinlock_trylock(&rxq->lock)) &&
- rxq->queue_id)))
+ /* If Rx Q was stopped return */
+ if (unlikely(!rxq->rx_started ||
+ !rte_spinlock_trylock(&rxq->lock)))
return 0;
/* Handle RX burst request */