• Amit Cohen's avatar
    mlxsw: Align PGT index to legacy bridge model · 4abaa5cc
    Amit Cohen authored
    FID code reserves about 15K entries in PGT table for flooding. These
    entries are just allocated and are not used yet because the code that uses
    them is skipped now.
    
    The next patches will convert MDB code to use PGT APIs. The allocation of
    indexes for multicast is done after FID code reserves 15K entries.
    Currently, legacy bridge model is used and firmware manages PGT table. That
    means that the indexes which are allocated using PGT API are too high when
    legacy bridge model is used. To not exceed firmware limitation for MDB
    entries, add an API that returns the correct 'mid_index', based on bridge
    model. For legacy model, subtract the number of flood entries from PGT
    index. Use it to write the correct MID to SMID register. This API will be
    used also from MDB code in the next patches.
    
    PGT should not be aware of MDB and FID different usage, this API is
    temporary and will be removed once unified bridge model will be used.
    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>
    4abaa5cc
spectrum.h 50.6 KB