diff options
author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2019-10-02 10:17:32 -0700 |
---|---|---|
committer | Ferruh Yigit <ferruh.yigit@intel.com> | 2019-10-08 12:14:30 +0200 |
commit | 3955e26870bcc3336c87d1fabe6ebdf18b2a337b (patch) | |
tree | 465e8d4483a88684002d1cd7b650e621c916edc8 /drivers/net/bnxt/bnxt_rxr.c | |
parent | 09aac391a50c8ea7ed3e87389bd97bb1dca97734 (diff) | |
download | dpdk-next-eventdev-3955e26870bcc3336c87d1fabe6ebdf18b2a337b.zip dpdk-next-eventdev-3955e26870bcc3336c87d1fabe6ebdf18b2a337b.tar.gz dpdk-next-eventdev-3955e26870bcc3336c87d1fabe6ebdf18b2a337b.tar.xz |
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: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net/bnxt/bnxt_rxr.c')
-rw-r--r-- | drivers/net/bnxt/bnxt_rxr.c | 7 |
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 */ |