acrn-kernel/net/bridge
Tobias Waldekranz 91ac2c79e8 net: bridge: switchdev: Ensure deferred event delivery on unoffload
[ Upstream commit f7a70d650b0b6b0134ccba763d672c8439d9f09b ]

When unoffloading a device, it is important to ensure that all
relevant deferred events are delivered to it before it disassociates
itself from the bridge.

Before this change, this was true for the normal case when a device
maps 1:1 to a net_bridge_port, i.e.

   br0
   /
swp0

When swp0 leaves br0, the call to switchdev_deferred_process() in
del_nbp() makes sure to process any outstanding events while the
device is still associated with the bridge.

In the case when the association is indirect though, i.e. when the
device is attached to the bridge via an intermediate device, like a
LAG...

    br0
    /
  lag0
  /
swp0

...then detaching swp0 from lag0 does not cause any net_bridge_port to
be deleted, so there was no guarantee that all events had been
processed before the device disassociated itself from the bridge.

Fix this by always synchronously processing all deferred events before
signaling completion of unoffloading back to the driver.

Fixes: 4e51bf44a0 ("net: bridge: move the switchdev object replay helpers to "push" mode")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:36 +01:00
..
netfilter
Kconfig
Makefile
br.c
br_arp_nd_proxy.c
br_cfm.c
br_cfm_netlink.c
br_device.c
br_fdb.c
br_forward.c
br_if.c
br_input.c
br_ioctl.c
br_mdb.c
br_mrp.c
br_mrp_netlink.c
br_mrp_switchdev.c
br_mst.c
br_multicast.c bridge: mcast: fix disabled snooping after long uptime 2024-02-05 20:13:01 +00:00
br_multicast_eht.c
br_netfilter_hooks.c
br_netfilter_ipv6.c
br_netlink.c
br_netlink_tunnel.c
br_nf_core.c
br_private.h bridge: mcast: fix disabled snooping after long uptime 2024-02-05 20:13:01 +00:00
br_private_cfm.h
br_private_mcast_eht.h
br_private_mrp.h
br_private_stp.h
br_private_tunnel.h
br_stp.c
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_switchdev.c net: bridge: switchdev: Ensure deferred event delivery on unoffload 2024-03-01 13:26:36 +01:00
br_sysfs_br.c
br_sysfs_if.c
br_vlan.c
br_vlan_options.c
br_vlan_tunnel.c