linux/drivers/net/ethernet/intel/iavf
Slawomir Laba 7ae42ef308 iavf: Fix iavf_shutdown to call iavf_remove instead iavf_close
Make the flow for pci shutdown be the same to the pci remove.

iavf_shutdown was implementing an incomplete version
of iavf_remove. It misses several calls to the kernel like
iavf_free_misc_irq, iavf_reset_interrupt_capability, iounmap
that might break the system on reboot or hibernation.

Implement the call of iavf_remove directly in iavf_shutdown to
close this gap.

Fixes below error messages (dmesg) during shutdown stress tests -
[685814.900917] ice 0000:88:00.0: MAC 02:d0:5f:82:43:5d does not exist for
 VF 0
[685814.900928] ice 0000:88:00.0: MAC 33:33:00:00:00:01 does not exist for
VF 0

Reproduction:

1. Create one VF interface:
echo 1 > /sys/class/net/<interface_name>/device/sriov_numvfs

2. Run live dmesg on the host:
dmesg -wH

3. On SUT, script below steps into vf_namespace_assignment.sh

<#!/bin/sh> // Remove <>. Git removes # line
if=<VF name> (edit this per VF name)
loop=0

while true; do

echo test round $loop
let loop++

ip netns add ns$loop
ip link set dev $if up
ip link set dev $if netns ns$loop
ip netns exec ns$loop ip link set dev $if up
ip netns exec ns$loop ip link set dev $if netns 1
ip netns delete ns$loop

done

4. Run the script for at least 1000 iterations on SUT:
./vf_namespace_assignment.sh

Expected result:
No errors in dmesg.

Fixes: 129cf89e58 ("iavf: rename functions and structs to new name")
Signed-off-by: Slawomir Laba <slawomirx.laba@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Co-developed-by: Ranganatha Rao <ranganatha.rao@intel.com>
Signed-off-by: Ranganatha Rao <ranganatha.rao@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2023-12-12 11:21:30 -08:00
..
Makefile iavf: delete the iavf client interface 2023-10-27 15:35:49 -07:00
iavf.h iavf: Introduce new state machines for flow director 2023-12-12 11:20:40 -08:00
iavf_adminq.c
iavf_adminq.h
iavf_adminq_cmd.h
iavf_adv_rss.c
iavf_adv_rss.h
iavf_alloc.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_common.c iavf: delete unused iavf_mac_info fields 2023-10-19 13:23:14 +02:00
iavf_devids.h
iavf_ethtool.c iavf: Introduce new state machines for flow director 2023-12-12 11:20:40 -08:00
iavf_fdir.c iavf: fix FDIR rule fields masks validation 2023-08-16 08:27:29 -07:00
iavf_fdir.h iavf: Introduce new state machines for flow director 2023-12-12 11:20:40 -08:00
iavf_main.c iavf: Fix iavf_shutdown to call iavf_remove instead iavf_close 2023-12-12 11:21:30 -08:00
iavf_osdep.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_prototype.h iavf: delete unused iavf_mac_info fields 2023-10-19 13:23:14 +02:00
iavf_register.h iavf: remove mask from iavf_irq_enable_queues() 2023-06-10 00:09:54 -07:00
iavf_status.h
iavf_trace.h
iavf_txrx.c iavf: remove "inline" functions from iavf_txrx.c 2023-10-03 15:25:13 -07:00
iavf_txrx.h iavf: validate tx_coalesce_usecs even if rx_coalesce_usecs is zero 2023-12-05 10:51:22 -08:00
iavf_type.h iavf: delete unused iavf_mac_info fields 2023-10-19 13:23:14 +02:00
iavf_virtchnl.c iavf: Introduce new state machines for flow director 2023-12-12 11:20:40 -08:00