[02/13] net/bnxt: fix bad action offset in Tx bd
Checks
Commit Message
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(-)
@@ -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) {