kernel_optimize_test/net/bridge
Andrew Lunn dfd1f0cb62 net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
[ Upstream commit fbb3abdf2223cd0dfc07de85fe5a43ba7f435bdf ]

It is possible to stack bridges on top of each other. Consider the
following which makes use of an Ethernet switch:

       br1
     /    \
    /      \
   /        \
 br0.11    wlan0
   |
   br0
 /  |  \
p1  p2  p3

br0 is offloaded to the switch. Above br0 is a vlan interface, for
vlan 11. This vlan interface is then a slave of br1. br1 also has a
wireless interface as a slave. This setup trunks wireless lan traffic
over the copper network inside a VLAN.

A frame received on p1 which is passed up to the bridge has the
skb->offload_fwd_mark flag set to true, indicating that the switch has
dealt with forwarding the frame out ports p2 and p3 as needed. This
flag instructs the software bridge it does not need to pass the frame
back down again. However, the flag is not getting reset when the frame
is passed upwards. As a result br1 sees the flag, wrongly interprets
it, and fails to forward the frame to wlan0.

When passing a frame upwards, clear the flag. This is the Rx
equivalent of br_switchdev_frame_unmark() in br_dev_xmit().

Fixes: f1c2eddf4c ("bridge: switchdev: Use an helper to clear forward mark")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20220518005840.771575-1-andrew@lunn.ch
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:17:59 +02:00
..
netfilter netfilter: nf_conntrack_bridge: Fix memory leak when error 2021-08-18 08:59:09 +02:00
br_arp_nd_proxy.c net: bridge: when suppression is enabled exclude RARP packets 2021-05-19 10:12:53 +02:00
br_device.c bridge: Fix a deadlock when enabling multicast snooping 2020-12-07 17:14:43 -08:00
br_fdb.c net: bridge: fix flags interpretation for extern learn fdb entries 2021-08-18 08:59:13 +02:00
br_forward.c net: bridge: mcast: when forwarding handle filter mode and blocked flag 2020-09-23 13:24:35 -07:00
br_if.c net: bridge: fix memleak in br_add_if() 2021-08-18 08:59:13 +02:00
br_input.c net: bridge: Clear offload_fwd_mark when passing frame up bridge interface. 2022-05-25 09:17:59 +02:00
br_ioctl.c
br_mdb.c net: bridge: mcast: add support for blocked port groups 2020-09-23 13:24:34 -07:00
br_mrp_netlink.c
br_mrp_switchdev.c bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state 2021-02-17 11:02:29 +01:00
br_mrp.c net: bridge: mrp: Update ring transitions. 2021-07-19 09:44:46 +02:00
br_multicast.c net: bridge: multicast: fix MRD advertisement router port marking race 2021-07-20 16:05:37 +02:00
br_netfilter_hooks.c netfilter: bridge: add support for pppoe filtering 2022-01-27 10:53:52 +01:00
br_netfilter_ipv6.c
br_netlink_tunnel.c
br_netlink.c net: bridge: fix under estimation in br_get_linkxstats_size() 2021-10-13 10:04:27 +02:00
br_nf_core.c
br_private_mrp.h bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state 2021-02-17 11:02:29 +01:00
br_private_stp.h
br_private_tunnel.h
br_private.h net: bridge: mcast: use multicast_membership_interval for IGMPv3 2021-10-27 09:56:54 +02:00
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_stp.c
br_switchdev.c net: bridge: don't notify switchdev for local FDB addresses 2021-03-30 14:32:04 +02:00
br_sysfs_br.c
br_sysfs_if.c net: bridge: use switchdev for port flags set through sysfs too 2021-03-07 12:34:07 +01:00
br_vlan_options.c
br_vlan_tunnel.c net: bridge: fix vlan tunnel dst refcnt when egressing 2021-06-23 14:42:53 +02:00
br_vlan.c net: bridge: vlan: fix memory leak in __allowed_ingress 2022-02-01 17:25:48 +01:00
br.c net: bridge: fix flags interpretation for extern learn fdb entries 2021-08-18 08:59:13 +02:00
Kconfig
Makefile