Skip to contentSkip to conversation

net/bnxt: fix transmit length hint threshold

PATCH In review Lance Richardson 2 participants 2 messages Mar 18, 2021 – Mar 19, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix transmit length hint threshold

Use correct threshold when selecting "greater than or equal to 2K" length hint.

Fixes 6eb3cc2294fd ("net/bnxt: add initial Tx code")
---
 drivers/net/bnxt/bnxt_txr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_txr.c +1 -1
index 65355fb040..27459960de 100644
@@ -187,7 +187,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 	txbd->flags_type |= TX_BD_SHORT_FLAGS_COAL_NOW;
 	txbd->flags_type |= TX_BD_LONG_FLAGS_NO_CMPL;
 	txbd->len = tx_pkt->data_len;
-	if (tx_pkt->pkt_len >= 2014)
+	if (tx_pkt->pkt_len >= 2048)
 		txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K;
 	else
 		txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9];
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Lance Richardson

Use correct threshold when selecting "greater than or equal to 2K" length hint.

Fixes 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Patch applied to dpdk-next-net-brcm.

Quoted 20 lines
---
 drivers/net/bnxt/bnxt_txr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_txr.c +1 -2
index 65355fb040..27459960de 100644
@@ -187,7 +187,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
        txbd->flags_type |= TX_BD_SHORT_FLAGS_COAL_NOW;
        txbd->flags_type |= TX_BD_LONG_FLAGS_NO_CMPL;
        txbd->len = tx_pkt->data_len;
-       if (tx_pkt->pkt_len >= 2014)
+       if (tx_pkt->pkt_len >= 2048)
                txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K;
        else
                txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9];
--

2.25.1