]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
mlxsw: spectrum: Add trap for decapsulated ARP packets
authorIdo Schimmel <idosch@mellanox.com>
Tue, 18 Dec 2018 15:59:22 +0000 (15:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Dec 2018 17:17:38 +0000 (09:17 -0800)
After a packet was decapsulated it is classified to the relevant FID
based on its VNI and undergoes L2 forwarding.

Unlike regular (non-encapsulated) ARP packets, Spectrum does not trap
decapsulated ARP packets during L2 forwarding and instead can only trap
such packets in the underlay router during decapsulation.

Add this missing packet trap, which is required for VXLAN routing when
the MAC of the target host is not known.

Fixes: b02597d513a9 ("mlxsw: spectrum: Add NVE packet traps")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@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 75a2f1495455b57221f7e173f4634c10de11c863..f84b9c02fcc5eea8a0a1806831c4b559b31ea4d8 100644 (file)
@@ -3526,6 +3526,7 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
        MLXSW_SP_RXL_MR_MARK(ACL2, TRAP_TO_CPU, MULTICAST, false),
        /* NVE traps */
        MLXSW_SP_RXL_MARK(NVE_ENCAP_ARP, TRAP_TO_CPU, ARP, false),
+       MLXSW_SP_RXL_NO_MARK(NVE_DECAP_ARP, TRAP_TO_CPU, ARP, false),
 };
 
 static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
index 6f18f4d3322a6f28f14bf774a269fe8c52411680..451216dd7f6bbc1025ff26b71f426fd76c40d4f8 100644 (file)
@@ -60,6 +60,7 @@ enum {
        MLXSW_TRAP_ID_IPV6_MC_LINK_LOCAL_DEST = 0x91,
        MLXSW_TRAP_ID_HOST_MISS_IPV6 = 0x92,
        MLXSW_TRAP_ID_IPIP_DECAP_ERROR = 0xB1,
+       MLXSW_TRAP_ID_NVE_DECAP_ARP = 0xB8,
        MLXSW_TRAP_ID_NVE_ENCAP_ARP = 0xBD,
        MLXSW_TRAP_ID_ROUTER_ALERT_IPV4 = 0xD6,
        MLXSW_TRAP_ID_ROUTER_ALERT_IPV6 = 0xD7,