DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, stable@dpdk.org
Subject: [PATCH 03/11] net/bnxt: fix Rx handler
Date: Wed,  5 Feb 2025 09:19:56 -0800	[thread overview]
Message-ID: <20250205172004.50395-4-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20250205172004.50395-1-ajit.khaparde@broadcom.com>

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(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 5b43bcbea6..b53d9a917a 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -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
-- 
2.39.5 (Apple Git-154)


  parent reply	other threads:[~2025-02-05 17:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 17:19 [PATCH 00/11] bnxt patch set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 01/11] net/bnxt: disable TruFlow if compressed CQE is set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 02/11] net/bnxt: simplify check for CQE mode Ajit Khaparde
2025-02-05 17:19 ` Ajit Khaparde [this message]
2025-02-05 17:19 ` [PATCH 04/11] net/bnxt: set burst handler correctly Ajit Khaparde
2025-02-05 17:19 ` [PATCH 05/11] net/bnxt/truFlow: Fix seg fault when rep are re-attached Ajit Khaparde
2025-02-05 17:19 ` [PATCH 06/11] net/bnxt: address coverity deadcode issue Ajit Khaparde
2025-02-05 17:20 ` [PATCH 07/11] net/bnxt: address coverity checked return issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 08/11] net/bnxt: address coverity overflow issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 09/11] net/bnxt: address coverity integer " Ajit Khaparde
2025-02-05 17:20 ` [PATCH 10/11] net/bnxt: address coverity uninitialized variables issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 11/11] net/bnxt: address coverity control flow issues Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205172004.50395-4-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).