WSL2-Linux-Kernel/drivers/net
Vladimir Oltean c1930148a3 net: mscc: ocelot: allow forwarding from bridge ports to the tag_8021q CPU port
Currently we are unable to ping a bridge on top of a felix switch which
uses the ocelot-8021q tagger. The packets are dropped on the ingress of
the user port and the 'drop_local' counter increments (the counter which
denotes drops due to no valid destinations).

Dumping the PGID tables, it becomes clear that the PGID_SRC of the user
port is zero, so it has no valid destinations.

But looking at the code, the cpu_fwd_mask (the bit mask of DSA tag_8021q
ports) is clearly missing from the forwarding mask of ports that are
under a bridge. So this has always been broken.

Looking at the version history of the patch, in v7
https://patchwork.kernel.org/project/netdevbpf/patch/20210125220333.1004365-12-olteanv@gmail.com/
the code looked like this:

	/* Standalone ports forward only to DSA tag_8021q CPU ports */
	unsigned long mask = cpu_fwd_mask;

(...)
	} else if (ocelot->bridge_fwd_mask & BIT(port)) {
		mask |= ocelot->bridge_fwd_mask & ~BIT(port);

while in v8 (the merged version)
https://patchwork.kernel.org/project/netdevbpf/patch/20210129010009.3959398-12-olteanv@gmail.com/
it looked like this:

	unsigned long mask;

(...)
	} else if (ocelot->bridge_fwd_mask & BIT(port)) {
		mask = ocelot->bridge_fwd_mask & ~BIT(port);

So the breakage was introduced between v7 and v8 of the patch.

Fixes: e21268efbe ("net: dsa: felix: perform switch setup for tag_8021q")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20210817160425.3702809-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-18 15:34:52 -07:00
..
appletalk
arcnet
bonding bonding: fix build issue 2021-07-16 17:22:35 -07:00
caif Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
can can: m_can: m_can_set_bittiming(): fix setting M_CAN_DBTP register 2021-08-10 08:10:27 +02:00
dsa net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse 2021-08-18 10:21:01 +01:00
ethernet net: mscc: ocelot: allow forwarding from bridge ports to the tag_8021q CPU port 2021-08-18 15:34:52 -07:00
fddi net: fddi: fix UAF in fza_probe 2021-07-13 09:43:50 -07:00
fjes Tracing updates for 5.14: 2021-07-03 11:13:22 -07:00
hamradio net: 6pack: fix slab-out-of-bounds in decode_data 2021-08-16 11:08:05 +01:00
hippi
hyperv Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-07-08 09:37:03 +02:00
ipa Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
ipvlan
mdio net: mdio-mux: Handle -EPROBE_DEFER correctly 2021-08-18 10:48:52 +01:00
mhi net: really fix the build... 2021-08-03 11:14:03 +01:00
netdevsim net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops 2021-07-06 10:36:59 -07:00
pcs net: pcs: xpcs: fix error handling on failed to allocate memory 2021-08-11 14:50:54 -07:00
phy net: phy: micrel: Fix link detection on ksz87xx switch" 2021-08-08 12:03:24 +01:00
plip
ppp ppp: Fix generating ppp unit id when ifname is not specified 2021-08-08 13:08:46 +01:00
slip TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
team
usb net: asix: fix uninit value bugs 2021-08-18 11:46:52 +01:00
vmxnet3 vmxnet3: fix cksum offload issues for tunnels with non-default udp ports 2021-07-02 13:41:15 -07:00
wan Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
wireguard
wireless wireless-drivers fixes for v5.14 2021-08-17 15:08:14 -07:00
wwan net: iosm: Prevent underflow in ipc_chnl_cfg_get() 2021-08-16 13:40:18 +01:00
xen-netback
Kconfig net: wwan: Fix WWAN config symbols 2021-06-14 13:17:10 -07:00
LICENSE.SRC
Makefile
Space.c
bareudp.c bareudp: Fix invalid read beyond skb's linear data 2021-08-09 15:37:43 -07:00
dummy.c
eql.c
geneve.c
gtp.c gtp: reset mac_header after decap 2021-06-28 12:44:17 -07:00
ifb.c
loopback.c
macsec.c net: macsec: fix the length used to copy the key for offloading 2021-06-24 12:41:12 -07:00
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2021-08-17 10:45:09 +01:00
vrf.c vrf: Reset skb conntrack connection on VRF rcv 2021-08-16 16:37:01 -07:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-06-22 09:48:38 -07:00
xen-netfront.c