OSDN Git Service

mlxsw: Support configuring 'max_lag' via CONFIG_PROFILE
authorAmit Cohen <amcohen@nvidia.com>
Fri, 26 Aug 2022 16:06:50 +0000 (18:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 31 Aug 2022 06:20:42 +0000 (23:20 -0700)
commiteb907e9779ca48e3f3fe3796ed88de017dd59414
tree902319e57e8f9ec8e3f7f06998d668f532bfc660
parent95484760f03d684da522a15682776a090db738da
mlxsw: Support configuring 'max_lag' via CONFIG_PROFILE

In the device, LAG identifiers are stored in the port group table (PGT).
During initialization, firmware reserves a certain amount of entries at
the beginning of this table for LAG identifiers.

In Spectrum-4, the size of the PGT table did not increase, but the maximum
number of LAG identifiers was doubled, leaving less room for others entries
(e.g., flood entries) that also reside in the PGT.

Therefore, in order to avoid a regression and as long as there is no
explicit requirement to support 256 LAGs, mlxsw driver will configure the
firmware to allocate the same amount of LAG entries (128) as in
Spectrum-{2,3}. This configuration is done using 'max_lag' field in
CONFIG_PROFILE command. Extend 'struct mlxsw_config_profile' to support
'max_lag' field and configure firmware accordingly.

A next patch will adjust Spectrum-4 to configure 'max_lag' field.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/pci.c