]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix tunnel checksum offload with fragmented traffic
authorPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Wed, 27 Jul 2022 09:19:40 +0000 (11:19 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 16 Aug 2022 15:35:27 +0000 (08:35 -0700)
commit85e5885926259e9ea227d05e2dc238ec25aff1d7
tree83a4fee29e6886ae2ea88b6320b280c438b4ec19
parent08ff73ac65d9acf35245c63ba8fe9cd82428a289
i40e: 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

Without this patch, TX descriptor was using wrong data, 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: 5c808411f3bd ("i40e: Add support for MPLS + TSO")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c