net/mlx5: Lag, filter non compatible devices
authorMark Bloch <mbloch@nvidia.com>
Sun, 27 Feb 2022 12:40:39 +0000 (12:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:18 +0000 (18:36 +0200)
commit65a5ea7cb9c7c79e38540a5c6e46675b49e04d92
treecd24452a00f3a757f159f6256aee357320f5ef0b
parent1084716f76c8045eadf92a9d9a62641f3c8d8c90
net/mlx5: Lag, filter non compatible devices

[ Upstream commit bc4c2f2e017949646b43fdcad005a03462d437c6 ]

When search for a peer lag device we can filter based on that
device's capabilities.

Downstream patch will be less strict when filtering compatible devices
and remove the limitation where we require exact MLX5_MAX_PORTS and
change it to a range.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/dev.c
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h