• Amit Cohen's avatar
    mlxsw: Introduce flex key elements for Spectrum-4 · 07ff1359
    Amit Cohen authored
    Spectrum-4 ASIC will support more virtual routers and local ports
    compared to the existing ASICs. Therefore, the virtual router and local
    port ACL key elements need to be increased.
    
    Introduce new key elements for Spectrum-4 to be aligned with the elements
    used already for other Spectrum ASICs.
    
    The key blocks layout is the same for Spectrum-4, so use the existing
    code for encode_block() and clear_block(), just create separate blocks.
    
    Note that size of `VIRT_ROUTER_MSB` is 4 bits in Spectrum-4,
    therefore declare it using `MLXSW_AFK_ELEMENT_INST_U32()`, in order to
    be able to set `.avoid_size_check` to true.
    Otherwise, `mlxsw_afk_blocks_check()` will fail and warn.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    07ff1359
spectrum_acl_flex_keys.c 13.7 KB