• Amit Cohen's avatar
    mlxsw: Support configuring 'max_lag' via CONFIG_PROFILE · eb907e97
    Amit Cohen authored
    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: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    eb907e97
core.h 21.3 KB