1. Jun 27, 2022
  2. Jun 25, 2022
  3. Jun 24, 2022
    • David S. Miller's avatar
      Merge branch 'mlxsw-unified-bridge-conversion-part-3' · cbdabaec
      David S. Miller authored
      
      
      Ido Schimmel says:
      
      ====================
      mlxsw: Unified bridge conversion - part 3/6
      
      This is the third part of the conversion of mlxsw to the unified bridge
      model.
      
      Like the second part, this patchset does not begin the conversion, but
      instead prepares the FID code for it. The individual changes are
      relatively small and self-contained with detailed description and
      motivation in the commit message.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cbdabaec
    • Amit Cohen's avatar
      mlxsw: spectrum: Change mlxsw_sp_rif_vlan_fid_op() to be dedicated for FID RIFs · 7dd19648
      Amit Cohen authored
      
      
      The function was designed to configure both VLAN and FID RIFs, but
      currently the driver does not use VLAN RIFs. Instead, it emulates VLAN
      RIFs using FID RIFs.
      
      As part of the conversion to the unified bridge model, the driver will
      need to use VLAN RIFs, but they will be configured differently from FID
      RIFs.
      
      As a preparation for this change, rename the function to reflect the
      fact that it is specific to FID RIFs and do not pass the RIF type as an
      argument.
      
      This leaves mlxsw_reg_ritr_fid_set() unused, so remove it.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7dd19648
    • Amit Cohen's avatar
      mlxsw: spectrum: Rename MLXSW_SP_RIF_TYPE_VLAN · 027c92e0
      Amit Cohen authored
      
      
      Currently, the driver emulates 802.1Q FIDs using 802.1D FIDs. As such,
      the RIFs configured on top of these FIDs are FID RIFs and not VLAN RIFs.
      
      As part of converting the driver to the unified bridge model, 802.1Q
      FIDs and VLAN RIFs will be used.
      
      As a preparation for this change, rename the emulated VLAN RIFs from
      'MLXSW_SP_RIF_TYPE_VLAN' to 'MLXSW_SP_RIF_TYPE_VLAN_EMU'. After the
      conversion the emulated VLAN RIFs will be removed.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      027c92e0
    • Amit Cohen's avatar
      mlxsw: spectrum: Use different arrays of FID families per-ASIC type · 04e85970
      Amit Cohen authored
      
      
      Egress VID for layer 2 multicast is determined from two tables, the MPE
      and PGT tables. The MPE table is a two dimensional table indexed by local
      port and SMPE index, which should be thought of as a FID index.
      
      In Spectrum-1 the SMPE index is derived from the PGT entry, whereas in
      Spectrum-2 and newer ASICs the SMPE index is a FID attribute configured
      via the SFMR register.
      
      The validity of the SMPE index in SFMR is influenced from two factors:
      1. FID family. SMPE index is reserved for rFIDs, as their flooding is
         handled by firmware.
      2. ASIC generation. SMPE index is always reserved for Spectrum-1.
      
      As such, the validity of the SMPE index should be an attribute of the FID
      family and have different arrays of FID families per-ASIC type.
      
      As a preparation for SMPE index configuration, create separate arrays of
      FID families for different ASICs.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04e85970