mlxsw: spectrum: Add BGP trap
authorNogah Frankel <nogahf@mellanox.com>
Fri, 25 Nov 2016 09:33:43 +0000 (10:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2016 02:22:14 +0000 (21:22 -0500)
Add a trap for BGP protocol that was previously trapped by the generic trap
for IP2ME. This trap will allow us to have better control (over priority
and rate) of the traffic.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@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 75ba22ab7c164681336e36ec15636e69f04c027f..42ac968e49a2f64ccff9405b6f36dc8709727f73 100644 (file)
@@ -2761,6 +2761,7 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
        MLXSW_SP_RXL_NO_MARK(IP2ME, TRAP_TO_CPU, false),
        MLXSW_SP_RXL_NO_MARK(RTR_INGRESS0, TRAP_TO_CPU, false),
        MLXSW_SP_RXL_NO_MARK(HOST_MISS_IPV4, TRAP_TO_CPU, false),
+       MLXSW_SP_RXL_MARK(BGP_IPV4, TRAP_TO_CPU, false),
 };
 
 static int mlxsw_sp_trap_groups_set(struct mlxsw_core *mlxsw_core)
index ed8e301864004f8092bcf82caf50edc730a4b7d4..7ab275deacacbc51165eed9d5ec3f54281533566 100644 (file)
@@ -62,6 +62,7 @@ enum {
        MLXSW_TRAP_ID_OSPF = 0x55,
        MLXSW_TRAP_ID_IP2ME = 0x5F,
        MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70,
+       MLXSW_TRAP_ID_BGP_IPV4 = 0x88,
        MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90,
 
        MLXSW_TRAP_ID_MAX = 0x1FF