sfc: ef10: don't overwrite offload features at NIC reset
authorÍñigo Huguet <ihuguet@redhat.com>
Thu, 23 Mar 2023 08:34:17 +0000 (09:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Mar 2023 21:48:17 +0000 (14:48 -0700)
commitca4a80e4bb7e87daf33b27d2ab9e4f5311018a89
tree5f304f77ee52dcd8a1eccbc7a4b25f8ff1f0db97
parent59513714f6659409adf717b0f85e0a6e35480a01
sfc: ef10: don't overwrite offload features at NIC reset

At NIC reset, some offload features related to encapsulated traffic
might have changed (this mainly happens if the firmware-variant is
changed with the sfboot userspace tool). Because of this, features are
checked and set again at reset time.

However, this was not done right, and some features were improperly
overwritten at NIC reset:
- Tunneled IPv6 segmentation was always disabled
- Features disabled with ethtool were reenabled
- Features that becomes unsupported after the reset were not disabled

Also, checking if the device supports IPV6_CSUM to enable TSO6 is no
longer necessary because all currently supported devices support it.
Additionally, move the assignment of some other features to the
EF10_OFFLOAD_FEATURES macro, like it is done in ef100, leaving the
selection of features in efx_pci_probe_post_io a bit cleaner.

Fixes: ffffd2454a7a ("sfc: correctly advertise tunneled IPv6 segmentation")
Fixes: 24b2c3751aa3 ("sfc: advertise encapsulated offloads on EF10")
Reported-by: Tianhao Zhao <tizhao@redhat.com>
Suggested-by: Jonathan Cooper <jonathan.s.cooper@amd.com>
Tested-by: Jonathan Cooper <jonathan.s.cooper@amd.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://lore.kernel.org/r/20230323083417.7345-1-ihuguet@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/efx.c