Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i40e/i40evf: fix extension header csum logic

The hardware design requires that the driver avoid indicating
checksum offload success on some ipv6 frames with extension
headers.

The code needs to just check for the IPV6EXADD bit and if
it is set punt the checksum to the stack. I don't know why
the code was checking TCP on inner protocol, as that code
doesn't make any sense to me but seems wrong, so remove it.

Change-ID: I10d3aacdbb1819fb60b4b0eb80e6cc67ef2c9599
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-By: Jim Young <jamesx.m.young@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

authored by

Jesse Brandeburg and committed by
Jeff Kirsher
22d2fa1d cd552cb4

-4
-2
drivers/net/ethernet/intel/i40e/i40e_txrx.c
··· 1237 1237 1238 1238 /* likely incorrect csum if alternate IP extension headers found */ 1239 1239 if (ipv6 && 1240 - decoded.inner_prot == I40E_RX_PTYPE_INNER_PROT_TCP && 1241 - rx_error & (1 << I40E_RX_DESC_ERROR_L4E_SHIFT) && 1242 1240 rx_status & (1 << I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT)) 1243 1241 /* don't increment checksum err here, non-fatal err */ 1244 1242 return;
-2
drivers/net/ethernet/intel/i40evf/i40e_txrx.c
··· 773 773 774 774 /* likely incorrect csum if alternate IP extension headers found */ 775 775 if (ipv6 && 776 - decoded.inner_prot == I40E_RX_PTYPE_INNER_PROT_TCP && 777 - rx_error & (1 << I40E_RX_DESC_ERROR_L4E_SHIFT) && 778 776 rx_status & (1 << I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT)) 779 777 /* don't increment checksum err here, non-fatal err */ 780 778 return;