Skip to contentSkip to conversation

liquidio: set sriov_totalvfs correctly

PATCH Applied Felix Manlunas 2 participants 2 messages Aug 1, 2017 – Aug 2, 2017

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

PATCH 1/1 liquidio: set sriov_totalvfs correctly

From: Derek Chickles <[email protected]>

The file /sys/devices/pci000.../sriov_totalvfs is showing a wrong value. Fix it by calling pci_sriov_set_totalvfs() to set the total number of VFs available after calculations for the number of PF and VF queues are made.

---
 drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ethernet/cavium/liquidio/lio_main.c +5 -0
index 1d8fefa..39a8dca 100644
@@ -1825,6 +1825,11 @@ static int octeon_chip_specific_setup(struct octeon_device *oct)
 	case OCTEON_CN23XX_PCIID_PF:
 		oct->chip_id = OCTEON_CN23XX_PF_VID;
 		ret = setup_cn23xx_octeon_pf_device(oct);
+#ifdef CONFIG_PCI_IOV
+		if (!ret)
+			pci_sriov_set_totalvfs(oct->pci_dev,
+					       oct->sriov_info.max_vfs);
+#endif
 		s = "CN23XX";
 		break;
 
maintainer Applied
#1 lore raw

From: Felix Manlunas <[email protected]>
Date: Tue, 1 Aug 2017 15:05:07 -0700

Quoted 9 lines

From: Derek Chickles <[email protected]>

The file /sys/devices/pci000.../sriov_totalvfs is showing a wrong value. Fix it by calling pci_sriov_set_totalvfs() to set the total number of VFs available after calculations for the number of PF and VF queues are made.

Applied, thanks.