]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Lag, Create shared FDB when in switchdev mode
authorMark Bloch <mbloch@nvidia.com>
Tue, 3 Aug 2021 23:19:59 +0000 (16:19 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Aug 2021 20:50:52 +0000 (13:50 -0700)
commit20046b21049a44afc791f67ec998ef0d2c29b19c
treea95bc9ed4fcdf4d5005438d990ad52ef75e188f9
parent55b0701c055189d4f3b3cbce785984ff4fffce6c
net/mlx5: Lag, Create shared FDB when in switchdev mode

If both eswitches are in switchdev mode and the uplink representors
are enslaved to the same bond device create a shared FDB configuration.

When moving to shared FDB mode not only the hardware needs be configured
but the RDMA driver needs to reconfigure itself.

When such change is done, unload the RDMA devices, configure the hardware
and load the RDMA representors.

When destroying the lag (can happen if a PCI function is unbinded,
driver is unloaded or by just removing a netdev from the bond) make sure
to restore the system to the previous state only if possible.

For example, if a PCI function is unbinded there is no need to load the
representors as the device is going away.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/lag.h
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c