diff options
| author | Parav Pandit <parav@mellanox.com> | 2019-10-28 13:29:17 -0500 |
|---|---|---|
| committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-11-13 14:25:03 -0800 |
| commit | a7cba0a4d508d2d78f2932ee944feadd38c97c2c (patch) | |
| tree | 041a2021d6db577aed7ad60958e6efd4b1f29e4d /tools/perf/scripts/python/netdev-times.py | |
| parent | net/mlx5: DR, Fix matcher builders select check (diff) | |
| download | linux-a7cba0a4d508d2d78f2932ee944feadd38c97c2c.tar.gz linux-a7cba0a4d508d2d78f2932ee944feadd38c97c2c.zip | |
net/mlx5: Read num_vfs before disabling SR-IOV
mlx5_device_disable_sriov() currently reads num_vfs from the PCI core.
However when mlx5_device_disable_sriov() is executed, SR-IOV is
already disabled at the PCI level.
Due to this disable_hca() cleanup is not done during SR-IOV disable
flow.
mlx5_sriov_disable()
pci_enable_sriov()
mlx5_device_disable_sriov() <- num_vfs is zero here.
When SR-IOV enablement fails during mlx5_sriov_enable(), HCA's are left
in enabled stage because mlx5_device_disable_sriov() relies on num_vfs
from PCI core.
mlx5_sriov_enable()
mlx5_device_enable_sriov()
pci_enable_sriov() <- Fails
Hence, to overcome above issues,
(a) Read num_vfs before disabling SR-IOV and use it.
(b) Use num_vfs given when enabling sriov in error unwinding path.
Fixes: d886aba677a0 ("net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
