Skip to content

Commit

Permalink
net/ice: fix outer UDP checksum offload
Browse files Browse the repository at this point in the history
[ upstream commit 10fbf1af4c5548b85b4791d241cdef62755240b1 ]

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: bd70c45 ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
zengzhichao233 authored and kevintraynor committed Jul 11, 2023
1 parent 1c5b0a0 commit 7b8888a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ice/ice_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,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;
}

Expand Down

0 comments on commit 7b8888a

Please sign in to comment.