linux-stable/net/dsa
Vladimir Oltean c4bb76a9a0 net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work
Currently DSA doesn't add FDB entries on the CPU port, because it only
does so through switchdev, which is associated with a net_device, and
there are none of those for the CPU port.

But actually FDB addresses on the CPU port have some use cases of their
own, if the switchdev operations are initiated from within the DSA
layer. There is just one problem with the existing code: it passes a
structure in dsa_switchdev_event_work which was retrieved directly from
switchdev, so it contains a net_device. We need to generalize the
contents to something that covers the CPU port as well: the "ds, port"
tuple is fine for that.

Note that the new procedure for notifying the successful FDB offload is
inspired from the rocker model.

Also, nothing was being done if added_by_user was false. Let's check for
that a lot earlier, and don't actually bother to schedule the worker
for nothing.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-07 15:34:45 -08:00
..
dsa.c net: dsa: use net core stats64 handling 2020-11-09 17:50:27 -08:00
dsa2.c net: dsa: print error on invalid port index 2021-01-06 16:21:08 -08:00
dsa_priv.h net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work 2021-01-07 15:34:45 -08:00
Kconfig net: dsa: tag_dsa: Unify regular and ethertype DSA taggers 2020-11-17 09:16:12 -08:00
Makefile net: dsa: tag_dsa: Unify regular and ethertype DSA taggers 2020-11-17 09:16:12 -08:00
master.c net: dsa: print the MTU value that could not be set 2020-12-08 11:24:07 -08:00
port.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
slave.c net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work 2021-01-07 15:34:45 -08:00
switch.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
tag_8021q.c net: dsa: tag_8021q: add VLANs to the master interface too 2020-09-20 19:01:34 -07:00
tag_ar9331.c net: dsa: tag_ar9331: let DSA core deal with TX reallocation 2020-11-02 17:41:17 -08:00
tag_brcm.c net: dsa: tag_brcm: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_dsa.c net: dsa: tag_dsa: Use a consistent comment style 2020-11-17 09:16:12 -08:00
tag_gswip.c net: dsa: tag_gswip: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_hellcreek.c net: dsa: tag_hellcreek: Cleanup includes 2020-11-23 16:57:21 -08:00
tag_ksz.c net: dsa: tag_ksz: don't allocate additional memory for padding/tagging 2020-11-02 17:41:16 -08:00
tag_lan9303.c net: dsa: tag_lan9303: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_mtk.c net: dsa: tag_mtk: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_ocelot.c net: dsa: tag_ocelot: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_qca.c net: dsa: tag_qca: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_sja1105.c net: dsa: tag_sja1105: use a custom flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_trailer.c net: dsa: trailer: don't allocate additional memory for padding/tagging 2020-11-02 17:41:16 -08:00