> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Ranganatha Rao
> Sent: Wednesday, November 29, 2023 4:35 PM
> To: [email protected]
> Cc: Laba, SlawomirX <[email protected]>; [email protected];
> Brandeburg, Jesse <[email protected]>; Zaki, Ahmed
> <[email protected]>; Rao, Ranganatha <[email protected]>;
> Michal Swiatkowski <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net, v2] iavf: Fix iavf_shutdown to call
> iavf_remove instead iavf_close
> 
> From: Slawomir Laba <[email protected]>
> 
> 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: 129cf89e5856 ("iavf: rename functions and structs to new name")
> Signed-off-by: Slawomir Laba <[email protected]>
> Reviewed-by: Michal Swiatkowski <[email protected]>
> Reviewed-by: Ahmed Zaki <[email protected]>
> Reviewed-by: Jesse Brandeburg <[email protected]>
> Co-authored-by: Ranganatha Rao <[email protected]>
> Signed-off-by: Ranganatha Rao <[email protected]>
> 
> ---
> v2: Add reproduction steps in commit log
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 72 ++++++---------------
>  1 file changed, 21 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index c862ebcd2e39..3c177dcd3b38 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c


Tested-by: Rafal Romanowski <[email protected]>


_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to