[2/2] net/bnxt: fix an issue with rxq0 stop
Checks
Commit Message
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
For the stingray platform and other platforms needing tighter
control of resource utilization, we process async events on
receive completion ring0.
For other chips there is a dedicated completion ring for
asynchronous event handling instead of handling these events
on a receive completion ring.
This patch fixes the check for rxq0 stop.
Fixes: 05b5e4821c1e ("net/bnxt: use dedicated CPR for async events")
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -458,8 +458,11 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
struct bnxt_rx_queue *rxq = NULL;
int rc = 0;
- /* Rx CQ 0 also works as Default CQ for async notifications */
- if (!rx_queue_id) {
+ /* For the stingray platform and other platforms needing tighter
+ * control of resource utilization, Rx CQ 0 also works as
+ * Default CQ for async notifications
+ */
+ if (!BNXT_NUM_ASYNC_CPR && !rx_queue_id) {
PMD_DRV_LOG(ERR, "Cannot stop Rx queue id %d\n", rx_queue_id);
return -EINVAL;
}