• Jiri Pirko's avatar
    mlxsw: spectrum_acl: Enable vregion rehash per-profile · 6b861682
    Jiri Pirko authored
    For MR ACL profile is does not make sense to do periodical rehashes, as
    there is only one mask in use during the whole vregion lifetime.
    Therefore periodical work is scheduled but the rehash never happens.
    So allow to enable/disable rehash for the whole group, which is added
    per-profile. Disable rehashing for MR profile.
    
    Addition to the vregion list is done only in case the rehash is enable
    on the particular vregion. Also, the addition is moved after delayed
    work init to avoid schedule of uninitialized work
    from vregion_rehash_intrvl_set(). Symmetrically, deletion from
    the list is done before canceling the delayed work so it is
    not scheduled by vregion_rehash_intrvl_set() again.
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6b861682
spectrum_acl_tcam.c 46.6 KB