]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mlxsw: spectrum: Disable MC_DMAC check in hardware pipeline
authorAmit Cohen <amitc@mellanox.com>
Sun, 5 Jan 2020 16:20:52 +0000 (18:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 21:38:36 +0000 (13:38 -0800)
The check drops packets if they need to be routed and their multicast
MAC mismatched to their multicast destination IP.

For IPV4:
DMAC is mismatched if it is different from {01-00-5E-0 (25 bits),
DIP[22:0]}

For IPV6:
DMAC is mismatched if it is different from {33-33-0 (16 bits),
DIP[31:0]}

Disable the check since the kernel forwards such packets and does not
drop them.

Signed-off-by: Amit Cohen <amitc@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@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 c595060aa0ad42c8f80175f4cd0f43f370468336..114122b52166cfbd6a58dc53bc18ce253302a988 100644 (file)
@@ -4547,6 +4547,8 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
        MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, VRRP, false),
        MLXSW_SP_RXL_NO_MARK(DISCARD_ING_ROUTER_SIP_CLASS_E, FORWARD,
                             ROUTER_EXP, false),
+       MLXSW_SP_RXL_NO_MARK(DISCARD_ING_ROUTER_MC_DMAC, FORWARD,
+                            ROUTER_EXP, false),
        /* PKT Sample trap */
        MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU,
                  false, SP_IP2ME, DISCARD),
index e63cb82050c6e49c9ec3ec466e15f34ac6e48b5c..7ccec9e28cdda0029c86716051968abebc88887e 100644 (file)
@@ -83,6 +83,7 @@ enum {
        MLXSW_TRAP_ID_DISCARD_ING_ROUTER_SIP_CLASS_E = 0x164,
        MLXSW_TRAP_ID_DISCARD_ING_ROUTER_SIP_LB = 0x165,
        MLXSW_TRAP_ID_DISCARD_ING_ROUTER_CORRUPTED_IP_HDR = 0x167,
+       MLXSW_TRAP_ID_DISCARD_ING_ROUTER_MC_DMAC = 0x168,
        MLXSW_TRAP_ID_DISCARD_ING_ROUTER_IPV4_SIP_BC = 0x16A,
        MLXSW_TRAP_ID_DISCARD_ING_ROUTER_IPV4_DIP_LOCAL_NET = 0x16B,
        MLXSW_TRAP_ID_DISCARD_ROUTER_LPM4 = 0x17B,