]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Lag, update tracker when state change event received
authorMaher Sanalla <msanalla@nvidia.com>
Fri, 5 Nov 2021 09:19:48 +0000 (11:19 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 16 Nov 2021 20:20:23 +0000 (12:20 -0800)
commitce4e5ee18663883f58224ecc1b06ccdf63674c8e
tree6a46082099a197f20305b31548af3994766732f6
parent8209ae54d00b9d0133b8f35b43985848e387cb32
net/mlx5: Lag, update tracker when state change event received

Currently, In NETDEV_CHANGELOWERSTATE/NETDEV_CHANGEUPPERSTATE events
handling, tracking is not fully completed if the LAG device is not ready
at the time the events occur. But, we must keep track of the upper and
lower states after receiving the events because RoCE needs this info in
mlx5_lag_get_roce_netdev() - in order to return the corresponding port
that its running on. Returning the wrong (not most recent) port will lead
to gids table being incorrect.

For example: If during the attachment of a slave to the bond, the other
non-attached port performs pci_reload, then the LAG device is not ready,
but that should not result in dismissing attached slave tracker update
automatically (which is performed in mlx5_handle_changelowerstate()), Since
these events might not come later, which can lead to both bond ports
having tx_enabled=0 - which is not a valid state of LAG bond.

Fixes: da28006ed4f0 ("net/mlx5e: Add LAG warning if bond slave is not lag master")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c