From 2a0c9ae4f646d8325eaaa0cd44b5def34f5a23b3 Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Tue, 28 Jul 2020 21:42:03 +0800 Subject: [PATCH] net/ice: fix TCP checksum offload 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") Cc: stable@dpdk.org Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index cc3139042e..ddf6a93fb2 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -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: -- 2.30.2