• Amit Cohen's avatar
    mlxsw: Add an indication of SMPE index validity for PGT table · a1697d11
    Amit Cohen authored
    In Spectrum-1, the index into the MPE table - called switch multicast to
    port egress VID (SMPE) - is derived from the PGT entry, whereas in
    Spectrum-2 and later ASICs it is derived from the FID.
    
    Therefore, in Spectrum-1, the SMPE index needs to be programmed as part of
    the PGT entry via SMID register, while it is reserved for Spectrum-2 and
    later ASICs.
    
    Add 'pgt_smpe_index_valid' boolean as part of 'struct mlxsw_sp' and set
    it to true for Spectrum-1 and to false for the later ASICs. Add
    'smpe_index_valid' as part of 'struct mlxsw_sp_pgt' and set it according
    to the value in 'struct mlxsw_sp' as part of PGT initialization.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    a1697d11
spectrum.c 149 KB