summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/mlx5_ifc.h
diff options
context:
space:
mode:
authorBodong Wang2019-06-29 00:36:04 +0200
committerSaeed Mahameed2019-07-02 01:40:30 +0200
commit5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc (patch)
tree0c3b129da2e014e672d3a23bc711a6b82249081b /include/linux/mlx5/mlx5_ifc.h
parentnet/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices (diff)
downloadkernel-qcow2-linux-5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc.tar.gz
kernel-qcow2-linux-5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc.tar.xz
kernel-qcow2-linux-5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc.zip
net/mlx5: Don't handle VF func change if host PF is disabled
When ECPF eswitch manager is at offloads mode, it monitors functions changed event from host PF side and acts according to the number of VFs enabled/disabled. As ECPF and host PF work in two independent hosts, it's possible that host PF OS reboots but ECPF system is still kept on and continues monitoring events from host PF. When kernel from host PF side is booting, PCI iov driver does sriov_init and compute_max_vf_buses by iterating over all valid num of VFs. This triggers FLR and generates functions changed events, even though host PF HCA is not enabled at this time. However, ECPF is not aware of this information, and still handles these events as usual. ECPF system will see massive number of reps are created, but destroyed immediately once creation finished. To eliminate this noise, a bit is added to host parameter context to indicate host PF is disabled. ECPF will not handle the VF changed event if this bit is set. Signed-off-by: Bodong Wang <bodong@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5/mlx5_ifc.h')
-rw-r--r--include/linux/mlx5/mlx5_ifc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index e2a77b5152a8..031db53e94ce 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -9823,7 +9823,8 @@ struct mlx5_ifc_mtrc_ctrl_bits {
struct mlx5_ifc_host_params_context_bits {
u8 host_number[0x8];
- u8 reserved_at_8[0x8];
+ u8 reserved_at_8[0x7];
+ u8 host_pf_disabled[0x1];
u8 host_num_of_vfs[0x10];
u8 host_total_vfs[0x10];