Skip to contentSkip to conversation

igb: do not re-init SR-IOV during probe

PATCH In review Stefan Assmann 2 participants 2 messages Jul 10, 2015 – Aug 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: do not re-init SR-IOV during probe

During driver probing the following code path is triggered. igb_probe
->igb_sw_init
->igb_probe_vfs

    ->igb_pci_enable_sriov
      ->igb_sriov_reinit

Doing the SR-IOV re-init is not necessary during probing since we're starting from scratch. Here we can call igb_enable_sriov() right away.

Running igb_sriov_reinit() during igb_probe() also seems to cause occasional packet loss on some onboard 82576 NICs. Reproduced on Dell and HP servers with onboard 82576 NICs.
Example:
Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01)
Subsystem: Dell Device [1028:0481]

---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
index f287186..7f41237 100644
@@ -2847,7 +2847,7 @@ static void igb_probe_vfs(struct igb_adapter *adapter)
 		return;
 
 	pci_sriov_set_totalvfs(pdev, 7);
-	igb_pci_enable_sriov(pdev, max_vfs);
+	igb_enable_sriov(pdev, max_vfs);
 
 #endif /* CONFIG_PCI_IOV */
 }
Signature · 1 line
2.4.3
Tested-by on v1 1/1
#1 lore raw
Quoted 24 lines

From: netdev-owner at vger.kernel.org [mailto:netdev-owner at vger.kernel.org] On Behalf Of Stefan Assmann
Sent: Friday, July 10, 2015 6:01 AM
To: intel-wired-lan at lists.osuosl.org
Cc: netdev at vger.kernel.org; Kirsher, Jeffrey T; sassmann at kpanic.de
Subject: [PATCH] igb: do not re-init SR-IOV during probe

During driver probing the following code path is triggered. igb_probe
->igb_sw_init
->igb_probe_vfs

    ->igb_pci_enable_sriov
      ->igb_sriov_reinit

Doing the SR-IOV re-init is not necessary during probing since we're starting from scratch. Here we can call igb_enable_sriov() right away.

Running igb_sriov_reinit() during igb_probe() also seems to cause occasional packet loss on some onboard 82576 NICs. Reproduced on Dell and HP servers with onboard 82576 NICs.
Example:
Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01)
Subsystem: Dell Device [1028:0481]

Quoted 5 lines
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)