patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 01/13] net/bnxt: fix TCP and UDP checksum flags
       [not found] <20241025175738.99564-1-ajit.khaparde@broadcom.com>
@ 2024-10-25 17:57 ` Ajit Khaparde
  2024-10-25 17:57 ` [PATCH 02/13] net/bnxt: fix bad action offset in Tx bd Ajit Khaparde
  2024-10-25 17:57 ` [PATCH 08/13] net/bnxt: fix LRO offload capability Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2024-10-25 17:57 UTC (permalink / raw)
  To: dev; +Cc: stable, Kalesh AP, Damodharam Ammepalli

Set TCP and UDP checksum flags explicitly for LSO capable packets.
In some older chip variants, this will enable the hardware compute
the checksum correctly for tunnel and non-tunnel packets.

Fixes: 1d76c878b21d ("net/bnxt: support updating IPID")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 12e4faa8fa..38f858f27f 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -319,7 +319,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 
 			/* TSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_LSO |
-					 TX_BD_LONG_LFLAGS_T_IPID;
+					 TX_BD_LONG_LFLAGS_T_IPID |
+					 TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM |
+					 TX_BD_LONG_LFLAGS_T_IP_CHKSUM;
 			hdr_size = tx_pkt->l2_len + tx_pkt->l3_len +
 					tx_pkt->l4_len;
 			hdr_size += (tx_pkt->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) ?
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 02/13] net/bnxt: fix bad action offset in Tx bd
       [not found] <20241025175738.99564-1-ajit.khaparde@broadcom.com>
  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
  2024-10-25 17:57 ` [PATCH 08/13] net/bnxt: fix LRO offload capability Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2024-10-25 17:57 UTC (permalink / raw)
  To: dev; +Cc: Peter Spreadborough, stable, Kishore Padmanabha

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)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 08/13] net/bnxt: fix LRO offload capability
       [not found] <20241025175738.99564-1-ajit.khaparde@broadcom.com>
  2024-10-25 17:57 ` [PATCH 01/13] net/bnxt: fix TCP and UDP checksum flags Ajit Khaparde
  2024-10-25 17:57 ` [PATCH 02/13] net/bnxt: fix bad action offset in Tx bd Ajit Khaparde
@ 2024-10-25 17:57 ` Ajit Khaparde
  2 siblings, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2024-10-25 17:57 UTC (permalink / raw)
  To: dev; +Cc: stable, Vasuthevan Maheswaran

Fix LRO offload capability for P7 devices.
Export the capability to the application only if compressed
Rx CQE mode is not enabled.

LRO aka TPA is not supported when compressed CQE mode is set.

Fixes: 3b56c3ffc182 ("net/bnxt: refactor code to support P7 devices")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Vasuthevan Maheswaran <vasuthevan.maheswaran@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 7 ++++++-
 drivers/net/bnxt/bnxt_rxr.c | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 1c25c57ca6..249fe7f6e5 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -30,10 +30,12 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
 			  RTE_ETH_RX_OFFLOAD_KEEP_CRC    |
 			  RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
 			  RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
-			  RTE_ETH_RX_OFFLOAD_TCP_LRO |
 			  RTE_ETH_RX_OFFLOAD_SCATTER |
 			  RTE_ETH_RX_OFFLOAD_RSS_HASH;
 
+	if ((BNXT_CHIP_P7(bp) && !bnxt_compressed_rx_cqe_mode_enabled(bp)) ||
+	    BNXT_CHIP_P5(bp))
+		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TCP_LRO;
 	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
 		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
@@ -244,6 +246,9 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 		}
 	}
 
+	if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp))
+		return;
+
 	/* Free up mbufs in TPA */
 	tpa_info = rxq->rx_ring->tpa_info;
 	if (tpa_info) {
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 0f3fd5326e..dc0bf6032b 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1671,6 +1671,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	}
 	PMD_DRV_LOG_LINE(DEBUG, "AGG Done!");
 
+	if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp))
+		return 0;
+
 	if (rxr->tpa_info) {
 		unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);
 
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-25 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20241025175738.99564-1-ajit.khaparde@broadcom.com>
2024-10-25 17:57 ` [PATCH 01/13] net/bnxt: fix TCP and UDP checksum flags Ajit Khaparde
2024-10-25 17:57 ` [PATCH 02/13] net/bnxt: fix bad action offset in Tx bd Ajit Khaparde
2024-10-25 17:57 ` [PATCH 08/13] net/bnxt: fix LRO offload capability Ajit Khaparde

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