• Petr Machata's avatar
    mlxsw: spectrum_fid: Add a family for bridge FIDs in CFF flood mode · db3e541b
    Petr Machata authored
    
    
    In this patch, add the artifacts for 802.1d and 802.1q FID families that
    work in CFF flood mode.
    
    In CFF flood mode, the way flood vectors are looked up changes: there's a
    per-FID PGT base, to which a small offset is added depending on type of
    traffic. Thus each FID occupies a small contiguous block of PGT memory,
    whereas in the controlled flood mode, flood vectors for a given FID were
    spread across the PGT.
    
    The term "flood table" as used by the spectrum_fid module, borrows from
    controlled flood mode way of organizing the PGT table. There flood tables
    were actual tables, contiguous in the PGT. In the CFF flood mode, they are
    more abstract: a flood table becomes a collection of e.g. all first rows of
    the per-FID PGT blocks. Nonetheless we retain the nomenclature.
    
    FIDs are still configured through the SFMR register, but there are
    different fields to set under CFF mode: PGT base and profile. Thus register
    packing gets a dedicated op overload as well.
    
    The new organization of PGT makes it possible to treat the PGT as a block
    of an ordinary memory, allocate and deallocate on demand, and achieve
    better flexibility. Here instead, we aim to keep the code as close as
    possible to the previous controlled flood mode, support for which we need
    to retain for Spectrum-1 and older FW versions anyway. Thus the PGT
    footprint of the individual families is the same as before, just the
    internal organization of the per-family PGT region differs. Hence the
    pgt_size callback is reused between the controlled and CFF flood modes.
    
    Since the dummy family has no flood tables in either the CTL mode or in
    CFF mode, the existing one can be reused for the CFF family array.
    
    Users should not notice any changes between the controlled and CFF flood
    modes.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Link: https://lore.kernel.org/r/ca40b8163e6d6a21f63ef299619acee953cf9519.1701183892.git.petrm@nvidia.com
    
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    db3e541b
spectrum_fid.c 60.9 KB