diff mbox series

[net-next,01/12] iavf: restore MSI state on reset

Message ID 20211124171652.831184-2-anthony.l.nguyen@intel.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series 40GbE Intel Wired LAN Driver Updates 2021-11-24 | expand

Commit Message

Tony Nguyen Nov. 24, 2021, 5:16 p.m. UTC
From: Mitch Williams <mitch.a.williams@intel.com>

If the PF experiences an FLR, the VF's MSI and MSI-X configuration will
be conveniently and silently removed in the process. When this happens,
reset recovery will appear to complete normally but no traffic will
pass. The netdev watchdog will helpfully notify everyone of this issue.

To prevent such public embarrassment, restore MSI configuration at every
reset. For normal resets, this will do no harm, but for VF resets
resulting from a PF FLR, this will keep the VF working.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Nov. 24, 2021, 11:42 p.m. UTC | #1
On Wed, 24 Nov 2021 09:16:41 -0800 Tony Nguyen wrote:
> If the PF experiences an FLR, the VF's MSI and MSI-X configuration will
> be conveniently and silently removed in the process. When this happens,
> reset recovery will appear to complete normally but no traffic will
> pass. The netdev watchdog will helpfully notify everyone of this issue.
> 
> To prevent such public embarrassment, restore MSI configuration at every
> reset. For normal resets, this will do no harm, but for VF resets
> resulting from a PF FLR, this will keep the VF working.

Why is this not a fix?
Tony Nguyen Nov. 29, 2021, 6:41 p.m. UTC | #2
On Wed, 2021-11-24 at 15:42 -0800, Jakub Kicinski wrote:
> On Wed, 24 Nov 2021 09:16:41 -0800 Tony Nguyen wrote:
> > If the PF experiences an FLR, the VF's MSI and MSI-X configuration
> > will
> > be conveniently and silently removed in the process. When this
> > happens,
> > reset recovery will appear to complete normally but no traffic will
> > pass. The netdev watchdog will helpfully notify everyone of this
> > issue.
> > 
> > To prevent such public embarrassment, restore MSI configuration at
> > every
> > reset. For normal resets, this will do no harm, but for VF resets
> > resulting from a PF FLR, this will keep the VF working.
> 
> Why is this not a fix?

As I'll need to do a v2 on this series, I'll go ahead and drop it here
and send it via net.

Thanks,
Tony
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 336e6bf95e48..4aa8d1af8a31 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2236,6 +2236,7 @@  static void iavf_reset_task(struct work_struct *work)
 	}
 
 	pci_set_master(adapter->pdev);
+	pci_restore_msi_state(adapter->pdev);
 
 	if (i == IAVF_RESET_WAIT_COMPLETE_COUNT) {
 		dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n",