net/mlx5: Lag, record inactive state of bond device
authorMark Bloch <mbloch@nvidia.com>
Wed, 12 Jan 2022 14:31:36 +0000 (14:31 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Feb 2022 23:21:58 +0000 (15:21 -0800)
commit54493a08e21f46446b3b24577c5a6f229d049757
tree72f89590a951bd32268f78df88804d9efbf5cf71
parent4f4551435ce000a47cd4f331af7b67e962f5f6f4
net/mlx5: Lag, record inactive state of bond device

A bond device will drop duplicate packets (received on inactive ports)
by default. A flag (all_slaves_active) can be set to override such
behaviour. This flag is a global flag per bond device (ALB mode isn't
supported by mlx5 driver so it can be ignored)

When NETDEV_CHANGEUPPER / NETDEV_CHANGEINFODATA event is received check if
there is an interface that is inactive.

Downstream patch will use this information in order to decide if a drop
rule is needed.

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