Skip to content

Commit 01658ae

Browse files
Kaaameanguy11
authored andcommitted
ice: Fix tunnel checksum offload with fragmented traffic
Fix checksum offload on VXLAN tunnels. In case, when mpls protocol is not used, set l4 header to transport header of skb. This fixes case, when user tries to offload checksums of VXLAN tunneled traffic. Steps for reproduction (requires link partner with tunnels): ip l s enp130s0f0 up ip a f enp130s0f0 ip a a 10.10.110.2/24 dev enp130s0f0 ip l s enp130s0f0 mtu 1600 ip link add vxlan12_sut type vxlan id 12 group 238.168.100.100 dev enp130s0f0 dstport 4789 ip l s vxlan12_sut up ip a a 20.10.110.2/24 dev vxlan12_sut iperf3 -c 20.10.110.1 #should connect Offload params: td_offset, cd_tunnel_params were corrupted, due to l4 header pointing wrong address. NIC would then drop those packets internally, due to incorrect TX descriptor data, which increased GLV_TEPC register. Fixes: 69e66c0 ("ice: Add mpls+tso support") Signed-off-by: Przemyslaw Patynowski <[email protected]> Signed-off-by: Mateusz Palczewski <[email protected]> Signed-off-by: Jedrzej Jagielski <[email protected]> Tested-by: Gurucharan <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent 1e308c6 commit 01658ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/net/ethernet/intel/ice/ice_txrx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,11 +1751,13 @@ int ice_tx_csum(struct ice_tx_buf *first, struct ice_tx_offload_params *off)
17511751

17521752
protocol = vlan_get_protocol(skb);
17531753

1754-
if (eth_p_mpls(protocol))
1754+
if (eth_p_mpls(protocol)) {
17551755
ip.hdr = skb_inner_network_header(skb);
1756-
else
1756+
l4.hdr = skb_checksum_start(skb);
1757+
} else {
17571758
ip.hdr = skb_network_header(skb);
1758-
l4.hdr = skb_checksum_start(skb);
1759+
l4.hdr = skb_transport_header(skb);
1760+
}
17591761

17601762
/* compute outer L2 header size */
17611763
l2_len = ip.hdr - skb->data;

0 commit comments

Comments
 (0)