mlxsw: spectrum: Introduce ACL trap
authorJiri Pirko <jiri@mellanox.com>
Tue, 6 Jun 2017 12:12:05 +0000 (14:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 16:45:24 +0000 (12:45 -0400)
Introduce an ACL trap and put it into ip2me trap group.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/trap.h

index 84b6f36eb42158996a695c2137d40fc518d2a518..f60e2ba515d030b283047dc3ba49408816dd6444 100644 (file)
@@ -3261,7 +3261,9 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
        MLXSW_SP_RXL_NO_MARK(BGP_IPV4, TRAP_TO_CPU, BGP_IPV4, false),
        /* PKT Sample trap */
        MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU,
-                 false, SP_IP2ME, DISCARD)
+                 false, SP_IP2ME, DISCARD),
+       /* ACL trap */
+       MLXSW_SP_RXL_NO_MARK(ACL0, TRAP_TO_CPU, IP2ME, false),
 };
 
 static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
index e008fdbed20fd34e13ef3dbd357f663b681cfaa8..12b5ed58f3eb45e3443e78e1cfde901a80106a23 100644 (file)
@@ -66,6 +66,7 @@ enum {
        MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70,
        MLXSW_TRAP_ID_BGP_IPV4 = 0x88,
        MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90,
+       MLXSW_TRAP_ID_ACL0 = 0x1C0,
 
        MLXSW_TRAP_ID_MAX = 0x1FF
 };