• Amit Cohen's avatar
    mlxsw: Add new FID families for unified bridge model · d4324e31
    Amit Cohen authored
    In the unified bridge model, mlxsw will no longer emulate 802.1Q FIDs
    using 802.1D FIDs. The new FID table will look as follows:
    
         +---------------+
         | 802.1q FIDs   | 4K entries
         | [1..4094]     |
         +---------------+
         | 802.1d FIDs   | 1K entries
         | [4095..5118]  |
         +---------------+
         | Dummy FIDs    | 1 entry
         | [5119..5119]  |
         +---------------+
         | rFIDs         | 11K entries
         | [5120..16383] |
         +---------------+
    
    In order to make the change easier to review, four new temporary FID
    families will be added (e.g., MLXSW_SP_FID_TYPE_8021D_UB) and will not
    be registered with the FID core until mlxsw is flipped to use the unified
    bridge model.
    
    Add .1d, rfid and dummy FID families for unified bridge, the next patch
    will add .1q family separately as it requires more changes.
    
    The following changes are required:
    1. Add 'smpe_index_valid' field to 'struct mlxsw_sp_fid_family' and set
       SFMR.smpe accordingly. SMPE index is reserved for rFIDs, as their
       flooding is handled by firmware, and always reserved in Spectrum-1,
       as it is configured as part of PGT table.
    
    2. Add 'ubridge' field to 'struct mlxsw_sp_fid_family'. This field will
       be removed later, use it in mlxsw_sp_fid_family_{register,unregister}()
       to skip the registration / unregistration of the new families when the
       legacy model is used.
    
    3. Indexes - the start and end indexes of each FID family will need to be
       changed according to the above diagram.
    
    4. Add flood tables for unified bridge model, use 'fid_offset' as table
       type, as in the new model the access to flood tables will be using
       'fid_offset' calculation.
    
    5. FID family operation changes:
       a. rFID supposed to be created using SFMR, as it is not created by
          firmware using unified bridge model.
       b. port_vid_map() should perform SVFA for rFID, as the mapping is not
          created by firmware using unified bridge model.
       c. flood_index() is not aligned to the new model, as this function will
          be removed later.
    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 avatarDavid S. Miller <davem@davemloft.net>
    d4324e31
reg.h 369 KB