mlxsw: spectrum_matchall: Forbid to insert matchall rules in collision with flower...
authorJiri Pirko <jiri@mellanox.com>
Sat, 9 May 2020 20:06:06 +0000 (23:06 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 9 May 2020 23:02:43 +0000 (16:02 -0700)
commit18346b70ab776fa2cbb9a5f0f0f9c4700c470c5e
tree9de16dc0a9e67c90a75128e9438ec54a1acb6692
parentaed65285fb9e16328f9bbf14394fef5ddbe82815
mlxsw: spectrum_matchall: Forbid to insert matchall rules in collision with flower rules

On ingress, the matchall rules doing mirroring and sampling are offloaded
into hardware blocks that are processed before any flower rules.
On egress, the matchall mirroring rules are offloaded into hardware
block that is processed after all flower rules.

Therefore check the priorities of inserted matchall rules against
existing flower rules and ensure the correct ordering.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_flow.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c