kernel-fxtec-pro1x/net/dsa
Daniel Mack 65e389d865 dsa: Allow forwarding of redirected IGMP traffic
commit 1ed9ec9b08addbd8d3e36d5f4a652d8590a6ddb7 upstream.

The driver for Marvell switches puts all ports in IGMP snooping mode
which results in all IGMP/MLD frames that ingress on the ports to be
forwarded to the CPU only.

The bridge code in the kernel can then interpret these frames and act
upon them, for instance by updating the mdb in the switch to reflect
multicast memberships of stations connected to the ports. However,
the IGMP/MLD frames must then also be forwarded to other ports of the
bridge so external IGMP queriers can track membership reports, and
external multicast clients can receive query reports from foreign IGMP
queriers.

Currently, this is impossible as the EDSA tagger sets offload_fwd_mark
on the skb when it unwraps the tagged frames, and that will make the
switchdev layer prevent the skb from egressing on any other port of
the same switch.

To fix that, look at the To_CPU code in the DSA header and make
forwarding of the frame possible for trapped IGMP packets.

Introduce some #defines for the frame types to make the code a bit more
comprehensive.

This was tested on a Marvell 88E6352 variant.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 12:10:56 +02:00
..
dsa.c net: dsa: Fix error cleanup path in dsa_init_module 2019-05-16 19:41:29 +02:00
dsa2.c net: dsa: Do not make user port errors fatal 2020-05-20 08:18:32 +02:00
dsa_priv.h
Kconfig
legacy.c
Makefile
master.c net: dsa: Fix lockdep false positive splat 2019-02-12 19:47:21 +01:00
port.c net: dsa: fix unintended change of bridge interface STP state 2020-01-27 14:50:26 +01:00
slave.c net: dsa: Avoid null pointer when failing to connect to PHY 2020-01-27 14:50:34 +01:00
switch.c net: dsa: Check existence of .port_mdb_add callback before calling it 2019-08-25 10:48:03 +02:00
tag_brcm.c net: dsa: Fix duplicate frames flooded by learning 2020-04-02 15:28:11 +02:00
tag_dsa.c
tag_edsa.c dsa: Allow forwarding of redirected IGMP traffic 2020-09-23 12:10:56 +02:00
tag_ksz.c
tag_lan9303.c
tag_mtk.c net: dsa: mt7530: fix roaming from DSA user ports 2020-06-03 08:19:03 +02:00
tag_qca.c net: dsa: tag_qca: Make sure there is headroom for tag 2020-02-24 08:34:34 +01:00
tag_trailer.c