linux/net/dsa
Vladimir Oltean 69bfac968a net: switchdev: add a context void pointer to struct switchdev_notifier_info
In the case where the driver asks for a replay of a certain type of
event (port object or attribute) for a bridge port that is a LAG, it may
do so because this port has just joined the LAG.

But there might already be other switchdev ports in that LAG, and it is
preferable that those preexisting switchdev ports do not act upon the
replayed event.

The solution is to add a context to switchdev events, which is NULL most
of the time (when the bridge layer initiates the call) but which can be
set to a value controlled by the switchdev driver when a replay is
requested. The driver can then check the context to figure out if all
ports within the LAG should act upon the switchdev event, or just the
ones that match the context.

We have to modify all switchdev_handle_* helper functions as well as the
prototypes in the drivers that use these helpers too, because these
helpers hide the underlying struct switchdev_notifier_info from us and
there is no way to retrieve the context otherwise.

The context structure will be populated and used in later patches.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-28 14:09:03 -07:00
..
dsa2.c net: dsa: export the dsa_port_is_{user,cpu,dsa} helpers 2021-06-21 12:50:20 -07:00
dsa_priv.h net: dsa: targeted MTU notifiers should only match on one port 2021-06-21 12:50:20 -07:00
dsa.c net: dsa: allow changing the tag protocol via the "tagging" device attribute 2021-01-29 21:24:39 -08:00
Kconfig net: selftest: fix build issue if INET is disabled 2021-04-28 14:06:45 -07:00
Makefile net: dsa: add a second tagger for Ocelot switches based on tag_8021q 2021-01-29 21:25:27 -08:00
master.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
port.c net: dsa: targeted MTU notifiers should only match on one port 2021-06-21 12:50:20 -07:00
slave.c net: switchdev: add a context void pointer to struct switchdev_notifier_info 2021-06-28 14:09:03 -07:00
switch.c net: dsa: remove cross-chip support from the MRP notifiers 2021-06-21 12:50:20 -07:00
tag_8021q.c net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function 2021-06-11 12:45:38 -07:00
tag_ar9331.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_brcm.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_dsa.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_gswip.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_hellcreek.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_ksz.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_lan9303.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_mtk.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_ocelot_8021q.c net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function 2021-06-11 12:45:38 -07:00
tag_ocelot.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_qca.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_rtl4_a.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_sja1105.c net: dsa: sja1105: implement TX timestamping for SJA1110 2021-06-11 12:45:38 -07:00
tag_trailer.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_xrs700x.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00