• Amit Cohen's avatar
    mlxsw: spectrum_fid: Set 'mid_base' as part of flood tables initialization · 9f6f467a
    Amit Cohen authored
    The PGT (Port Group Table) table maps an index to a bitmap of local ports
    to which a packet needs to be replicated. This table is used for layer 2
    multicast and flooding.
    
    The index to PGT table which is called 'mid_index', is a result of
    'mid_base' + 'fid_offset'. Using the legacy bridge model, firmware
    configures 'mid_base'. However, using the new model, software is
    responsible to configure it via SFGC register. The first 15K entries will
    be used for flooding and the rest for multicast. The table will look as
    follows:
    
    +----------------------------+
    |                            |
    | 802.1q, unicast flooding   | 4K entries
    |                            |
    +----------------------------+
    |                            |
    | 802.1q, multicast flooding | 4K entries
    |                            |
    +----------------------------+
    |                            |
    | 802.1q, broadcast flooding | 4K entries
    |                            |
    +----------------------------+
    | 802.1d, unicast flooding   | 1K entries
    +----------------------------+
    | 802.1d, multicast flooding | 1K entries
    +----------------------------+
    | 802.1d, broadcast flooding | 1K entries
    +----------------------------+
    |                            |
    |                            |
    |    Multicast entries       | The rest of the table
    |                            |
    |                            |
    +----------------------------+
    
    Add 'pgt_base' to 'struct mlxsw_sp_fid_family' and use it to calculate
    MID base, set 'SFGC.mid_base' as part of flood tables 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>
    9f6f467a
reg.h 368 KB