Skip to contentSkip to conversation

net/ice: fix TCP checksum offload failure

PATCH Applied Haiyue Wang 2 participants 2 messages Jul 28, 2020 – Jul 29, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix TCP checksum offload failure

The L4LEN field of the Descriptor Header Offset for TCP should be the real length including the TCP options.

Fixes 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
---
 drivers/net/ice/ice_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_rxtx.c +1 -1
index cc3139042e..ddf6a93fb2 100644
@@ -2234,7 +2234,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
+		*td_offset |= (tx_offload.l4_len >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	case PKT_TX_SCTP_CKSUM:
Signature · 1 line
2.28.0
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Wang, Haiyue <[email protected]>
Sent: Tuesday, July 28, 2020 9:42 PM
To: [email protected]; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wang, Yinan <[email protected]>; Xu, Ting <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]
Subject: [PATCH v1] net/ice: fix TCP checksum offload failure

Quoted 7 lines

The L4LEN field of the Descriptor Header Offset for TCP should be the real length including the TCP options.

Fixes 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Applied to dpdk-next-net-intel.

Thanks
Qi