[03/11] net/bnxt: fix Rx handler
Checks
Commit Message
Fix the code accounting the status of compressed CQE handler.
The code was inside the block handling the normal CQE mode.
Moved the code out. Without this the Rx datapath was broken
for compressed CQEs in scalar mode.
Fixes: 5c980062d895 ("net/bnxt: support compressed Rx CQE")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
@@ -1390,14 +1390,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
} else if ((CMP_TYPE(rxcmp) >= CMPL_BASE_TYPE_RX_TPA_START_V2) &&
(CMP_TYPE(rxcmp) <= CMPL_BASE_TYPE_RX_TPA_START_V3)) {
rc = bnxt_rx_pkt(&rx_pkts[nb_rx_pkts], rxq, &raw_cons);
- if (!rc)
- nb_rx_pkts++;
- else if (rc == -EBUSY) /* partial completion */
- break;
- else if (rc == -ENODEV) /* completion for representor */
- nb_rep_rx_pkts++;
- else if (rc == -ENOMEM)
- nb_rx_pkts++;
} else if (!BNXT_NUM_ASYNC_CPR(rxq->bp)) {
evt =
bnxt_event_hwrm_resp_handler(rxq->bp,
@@ -1407,6 +1399,14 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
goto done;
}
+ if (!rc)
+ nb_rx_pkts++;
+ else if (rc == -EBUSY) /* partial completion */
+ break;
+ else if (rc == -ENODEV) /* completion for representor */
+ nb_rep_rx_pkts++;
+ else if (rc == -ENOMEM)
+ nb_rx_pkts++;
raw_cons = NEXT_RAW_CMP(raw_cons);
/*
* The HW reposting may fall behind if mbuf allocation has