mlxsw: spectrum: Set SW LAG mode on Spectrum>1
authorPetr Machata <petrm@nvidia.com>
Thu, 19 Oct 2023 10:27:20 +0000 (12:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Oct 2023 10:47:50 +0000 (11:47 +0100)
On Spectrum-2, Spectrum-3 and Spectrum-4 machines, request SW
responsibility for placement of the LAG table.

On Spectrum-1, some FW versions claim to support lag_mode field despite
quietly ignoring any settings made to that field. Thus refrain from
attempting to configure lag_mode on those systems at all.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

index d383d00dd86028199ec1dd5e0b6eeca9ca183714..cec72d99d9c97d44bedbdd439c27a71618044ada 100644 (file)
@@ -3597,6 +3597,7 @@ static const struct mlxsw_config_profile mlxsw_sp2_config_profile = {
        },
        .used_cqe_time_stamp_type       = 1,
        .cqe_time_stamp_type            = MLXSW_CMD_MBOX_CONFIG_PROFILE_CQE_TIME_STAMP_TYPE_UTC,
+       .lag_mode_prefer_sw             = true,
 };
 
 /* Reduce number of LAGs from full capacity (256) to the maximum supported LAGs
@@ -3624,6 +3625,7 @@ static const struct mlxsw_config_profile mlxsw_sp4_config_profile = {
        },
        .used_cqe_time_stamp_type       = 1,
        .cqe_time_stamp_type            = MLXSW_CMD_MBOX_CONFIG_PROFILE_CQE_TIME_STAMP_TYPE_UTC,
+       .lag_mode_prefer_sw             = true,
 };
 
 static void