]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: LAG, Support LAG over Multi-Host NICs
authorRongwei Liu <rongweil@nvidia.com>
Thu, 19 Dec 2024 17:58:32 +0000 (19:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Dec 2024 18:34:45 +0000 (10:34 -0800)
commit60d01cc468fdb0fbd6b878d66ef86f7e946b0669
tree99793ef0ae4f5509df0f51c6655c06e9580cf74d
parentddbb5ddc43ad000a984149db5af1133433938404
net/mlx5: LAG, Support LAG over Multi-Host NICs

New multi-host NICs provide each host with partial ports,
allowing each host to maintain its unique LAG configuration.

On these multi-host NICs, the 'native_port_num' capability
is no longer continuous on each host and can exceed the
'num_lag_ports' capability. Therefore, it is necessary to
skip the PFs with ldev->pf[i].dev == NULL when querying/modifying
the lag devices' information.
There is no need to check dev.native_port_num against ldev->ports.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241219175841.1094544-3-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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
drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c
drivers/net/ethernet/mellanox/mlx5/core/main.c