]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Bridge, verify LAG state when adding bond to bridge
authorVlad Buslov <vladbu@nvidia.com>
Thu, 3 Nov 2022 06:55:37 +0000 (23:55 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 9 Nov 2022 18:30:42 +0000 (10:30 -0800)
commit15f8f168952f54d3c86d734dc764f20844e423ac
tree6e9839b56e541caf969fa3fa37b549d04b67ab43
parent27c064ae14d1a80c790ce019759500c95a2a9551
net/mlx5: Bridge, verify LAG state when adding bond to bridge

Mlx5 LAG is initialized asynchronously on a workqueue which means that for
a brief moment after setting mlx5 UL representors as lower devices of a
bond netdevice the LAG itself is not fully initialized in the driver. When
adding such bond device to a bridge mlx5 bridge code will not consider it
as offload-capable, skip creating necessary bookkeeping and fail any
further bridge offload-related commands with it (setting VLANs, offloading
FDBs, etc.). In order to make the error explicit during bridge
initialization stage implement the code that detects such condition during
NETDEV_PRECHANGEUPPER event and returns an error.

Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c