Skip to content

Commit e0e6adf

Browse files
shayshyikuba-moo
authored andcommitted
net/mlx5: Enable 8 ports LAG
This patch adds to mlx5 drivers support for 8 ports HCAs. Starting with ConnectX-8 HCAs with 8 ports are possible. As most driver parts aren't affected by such configuration most driver code is unchanged. Specially the only affected areas are: - Lag - Multiport E-Switch - Single FDB E-Switch All of the above are already factored in generic way, and LAG and VF LAG are tested, so all that left is to change a #define and remove checks which are no longer needed. However, Multiport E-Switch is not tested yet, so it is left untouched. This patch will allow to create hardware LAG/VF LAG when all 8 ports are added to the same bond device. for example, In order to activate the hardware lag a user can execute the following: ip link add bond0 type bond ip link set bond0 type bond miimon 100 mode 2 ip link set eth2 master bond0 ip link set eth3 master bond0 ip link set eth4 master bond0 ip link set eth5 master bond0 ip link set eth6 master bond0 ip link set eth7 master bond0 ip link set eth8 master bond0 ip link set eth9 master bond0 Where eth2, eth3, eth4, eth5, eth6, eth7, eth8 and eth9 are the PFs of the same HCA. Signed-off-by: Shay Drory <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent eafbf05 commit e0e6adf

File tree

2 files changed

+1
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lag
  • include/linux/mlx5

2 files changed

+1
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ int mlx5_deactivate_lag(struct mlx5_lag *ldev)
713713
return 0;
714714
}
715715

716-
#define MLX5_LAG_OFFLOADS_SUPPORTED_PORTS 4
717716
bool mlx5_lag_check_prereq(struct mlx5_lag *ldev)
718717
{
719718
#ifdef CONFIG_MLX5_ESWITCH
@@ -739,8 +738,6 @@ bool mlx5_lag_check_prereq(struct mlx5_lag *ldev)
739738
if (mlx5_eswitch_mode(ldev->pf[i].dev) != mode)
740739
return false;
741740

742-
if (mode == MLX5_ESWITCH_OFFLOADS && ldev->ports > MLX5_LAG_OFFLOADS_SUPPORTED_PORTS)
743-
return false;
744741
#else
745742
for (i = 0; i < ldev->ports; i++)
746743
if (mlx5_sriov_is_enabled(ldev->pf[i].dev))

include/linux/mlx5/driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ enum mlx5_sqp_t {
8585
};
8686

8787
enum {
88-
MLX5_MAX_PORTS = 4,
88+
MLX5_MAX_PORTS = 8,
8989
};
9090

9191
enum {

0 commit comments

Comments
 (0)