Skip to contentSkip to conversation

net/ice: fix outer UDP checksum offload

PATCH Applied Zhichao Zeng 2 participants 2 messages Jun 2, 2023 – Jun 6, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix outer UDP checksum offload

Currently, when dealing with UDP tunnel pkts checksum offloading, the outer-udp checksum will be offloaded by default. So the 'csum set outer-udp hw/sw' command does not work.

This patch fixes judgment of the EIPT flag and enables the 'csum set outer-udp hw/sw' command by adding judgment for the outer-udp checksum offload flag.

Fixes bd70c451532c ("net/ice: support Tx checksum offload for tunnel")
---
 drivers/net/ice/ice_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_rxtx.c +2 -1
index 7b6784b177..665ae32c13 100644
@@ -2734,7 +2734,8 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 	 */
 	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
-	    (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING))
+		(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+		(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Friday, June 2, 2023 9:43 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Tang, Zhijun <[email protected]>; Zeng, ZhichaoX <[email protected]>; Yang, Qiming <[email protected]>; Xing, Beilei <[email protected]>
Subject: [PATCH] net/ice: fix outer UDP checksum offload

Currently, when dealing with UDP tunnel pkts checksum offloading, the outer-udp checksum will be offloaded by default. So the 'csum set outer-udp hw/sw' command does not work.

Quoted 8 lines

This patch fixes judgment of the EIPT flag and enables the 'csum set outer- udp hw/sw' command by adding judgment for the outer-udp checksum offload flag.

Fixes bd70c451532c ("net/ice: support Tx checksum offload for tunnel")

Applied to dpdk-next-net-intel.

Thanks
Qi