mlxsw: core_acl_flex_actions: Add mirror sampler action
authorIdo Schimmel <idosch@nvidia.com>
Tue, 16 Mar 2021 15:03:00 +0000 (17:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Mar 2021 22:32:22 +0000 (15:32 -0700)
commitca19ea63f739c7a4e5dad64951706fea789e1f1a
tree8dabf22db3584d25daa4c30ed97b460c97ee47b5
parent54d0e963f683362418424f9ce61884a6e1cced38
mlxsw: core_acl_flex_actions: Add mirror sampler action

Add core functionality required to support mirror sampler action in the
policy engine. The switch driver (e.g., 'mlxsw_spectrum') is required to
implement the sampler_add() / sampler_del() callbacks that perform the
necessary configuration before the sampler action can be installed. The
next patch will implement it for Spectrum-{2,3}, while Spectrum-1 will
return an error, given it is not supported.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h