OSDN Git Service

net/mlx5: Don't handle VF func change if host PF is disabled
authorBodong Wang <bodong@mellanox.com>
Fri, 28 Jun 2019 22:36:04 +0000 (22:36 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 1 Jul 2019 23:40:30 +0000 (16:40 -0700)
commit5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc
tree0c3b129da2e014e672d3a23bc711a6b82249081b
parent7e26dac28101ef1ae8fb500abc8acd1ba1ab4d17
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>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
include/linux/mlx5/mlx5_ifc.h