diff options
author | David S. Miller <davem@davemloft.net> | 2020-02-24 20:55:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-24 20:55:07 +0100 |
commit | 27cf31dc20062b020453ea80b0dc95c46af766c1 (patch) | |
tree | c76061eb6b5d736baf606e5bc361cf21045c4d50 /net | |
parent | Merge branch 'net-Clean-driver-module-and-FW-versions' (diff) | |
parent | selftests: devlink_trap_acl_drops: Add ACL traps test (diff) | |
download | linux-27cf31dc20062b020453ea80b0dc95c46af766c1.tar.xz linux-27cf31dc20062b020453ea80b0dc95c46af766c1.zip |
Merge branch 'mlxsw-Introduce-ACL-traps'
Jiri Pirko says:
====================
mlxsw: Introduce ACL traps
This patchset allows to track packets that are dropped in HW by ACL.
Unlike the existing mlxsw traps, ACL traps are "source traps".
That means the action is not controlled by HPKT register but directly
in ACL TRAP action. When devlink user changes action from drop to trap
and vice versa, it would be needed to go over all instances of ACL TRAP
action and do change. That does not scale. Instead, resolve this
by introducing "dummy" group with "thin" policer. The purpose of
this policer is to drop as many packets as possible. The ones
that pass through are going to be dropped in devlink code - patch #6
takes care of that.
First four patches are preparation for introduction of ACL traps in mlxsw
so it possible to easily change from drop to trap for source traps
as well - by changing group to "dummy" and back.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/devlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 216bdd25ce39..0d7c5d3443d2 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -7795,6 +7795,8 @@ static const struct devlink_trap devlink_trap_generic[] = { DEVLINK_TRAP(NON_ROUTABLE, DROP), DEVLINK_TRAP(DECAP_ERROR, EXCEPTION), DEVLINK_TRAP(OVERLAY_SMAC_MC, DROP), + DEVLINK_TRAP(INGRESS_FLOW_ACTION_DROP, DROP), + DEVLINK_TRAP(EGRESS_FLOW_ACTION_DROP, DROP), }; #define DEVLINK_TRAP_GROUP(_id) \ @@ -7808,6 +7810,7 @@ static const struct devlink_trap_group devlink_trap_group_generic[] = { DEVLINK_TRAP_GROUP(L3_DROPS), DEVLINK_TRAP_GROUP(BUFFER_DROPS), DEVLINK_TRAP_GROUP(TUNNEL_DROPS), + DEVLINK_TRAP_GROUP(ACL_DROPS), }; static int devlink_trap_generic_verify(const struct devlink_trap *trap) |