DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Peter Spreadborough <peter.spreadborough@broadcom.com>,
	stable@dpdk.org,
	Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Subject: [PATCH 02/13] net/bnxt: fix bad action offset in Tx bd
Date: Fri, 25 Oct 2024 10:57:27 -0700	[thread overview]
Message-ID: <20241025175738.99564-3-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20241025175738.99564-1-ajit.khaparde@broadcom.com>

From: Peter Spreadborough <peter.spreadborough@broadcom.com>

This change ensures that the high part of an action table entry
offset stored in the Tx BD is set correctly. A bad value will
cause the PDCU to abort a fetch an may stall the pipeline.

Fixes: 527b10089cc5 ("net/bnxt: optimize Tx completion handling")
Cc: stable@dpdk.org

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 38f858f27f..c82b11e733 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -308,10 +308,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 		 */
 		txbd1->kid_or_ts_high_mss = 0;
 
-		if (txq->vfr_tx_cfa_action)
-			txbd1->cfa_action = txq->vfr_tx_cfa_action;
-		else
-			txbd1->cfa_action = txq->bp->tx_cfa_action;
+		if (txq->vfr_tx_cfa_action) {
+			txbd1->cfa_action = txq->vfr_tx_cfa_action & 0xffff;
+			txbd1->cfa_action_high = (txq->vfr_tx_cfa_action >> 16) &
+				TX_BD_LONG_CFA_ACTION_HIGH_MASK;
+		} else {
+			txbd1->cfa_action = txq->bp->tx_cfa_action & 0xffff;
+			txbd1->cfa_action_high = (txq->bp->tx_cfa_action >> 16) &
+				TX_BD_LONG_CFA_ACTION_HIGH_MASK;
+		}
 
 		if (tx_pkt->ol_flags & RTE_MBUF_F_TX_TCP_SEG ||
 		    tx_pkt->ol_flags & RTE_MBUF_F_TX_UDP_SEG) {
-- 
2.39.5 (Apple Git-154)


  parent reply	other threads:[~2024-10-25 17:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 17:57 [PATCH 00/13] patchset for bnxt PMD Ajit Khaparde
2024-10-25 17:57 ` [PATCH 01/13] net/bnxt: fix TCP and UDP checksum flags Ajit Khaparde
2024-10-25 17:57 ` Ajit Khaparde [this message]
2024-10-25 17:57 ` [PATCH 03/13] net/bnxt: add check to validate TSO segment size Ajit Khaparde
2024-10-25 17:57 ` [PATCH 04/13] net/bnxt: add check for number of segs Ajit Khaparde
2024-10-25 17:57 ` [PATCH 05/13] net/bnxt: add check for invalid mbuf passed by application Ajit Khaparde
2024-10-25 17:57 ` [PATCH 06/13] net/bnxt: free and account a bad Tx mbuf Ajit Khaparde
2024-10-25 17:57 ` [PATCH 07/13] net/bnxt: register for and handle RSS change event Ajit Khaparde
2024-10-25 17:57 ` [PATCH 08/13] net/bnxt: fix LRO offload capability Ajit Khaparde
2024-10-25 17:57 ` [PATCH 09/13] net/bnxt: disable VLAN filter when TF is enabled Ajit Khaparde
2024-10-25 17:57 ` [PATCH 10/13] net/bnxt: remove the VNIC async event handler Ajit Khaparde
2024-10-25 17:57 ` [PATCH 11/13] net/bnxt: remove some unnecessary logs Ajit Khaparde
2024-10-25 17:57 ` [PATCH 12/13] net/bnxt: add support for buffer split Rx offload Ajit Khaparde
2024-10-25 17:57 ` [PATCH 13/13] net/bnxt: remove unnecessary ifdef 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=20241025175738.99564-3-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=peter.spreadborough@broadcom.com \
    --cc=stable@dpdk.org \
    /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).