OSDN Git Service

mlxsw: spectrum_acl: Enable vregion rehash per-profile
authorJiri Pirko <jiri@mellanox.com>
Sun, 24 Feb 2019 06:46:28 +0000 (06:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 04:25:29 +0000 (20:25 -0800)
commit6b861682474ca0dd78bcaebbd3f471c8244689de
treee9116b7262b7b6d8aa07e53a010d7338b4a3f570
parent65e190356098f2bd6adbdee06047a941ca1d20e1
mlxsw: spectrum_acl: Enable vregion rehash per-profile

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: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c