linux_dsm_epyc7002/net/dsa
Petr Machata 2b239f6780 net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL
Following patches will change the way of distributing port object
changes from a switchdev operation to a switchdev notifier. The
switchdev code currently recursively descends through layers of lower
devices, eventually calling the op on a front-panel port device. The
notifier will instead be sent referencing the bridge port device, which
may be a stacking device that's one of front-panel ports uppers, or a
completely unrelated device.

DSA currently doesn't support any other uppers than bridge.
SWITCHDEV_OBJ_ID_HOST_MDB and _PORT_MDB objects are always notified on
the bridge port device. Thus the only case that a stacked device could
be validly referenced by port object notifications are bridge
notifications for VLAN objects added to the bridge itself. But the
driver explicitly rejects such notifications in dsa_port_vlan_add(). It
is therefore safe to assume that the only interesting case is that the
notification is on a front-panel port netdevice. Therefore keep the
filtering by dsa_slave_dev_check() in place.

To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking
notifier chain. Dispatch to rocker_port_obj_add() resp. _del() to
maintain the behavior that the switchdev operation based code currently
has.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23 18:02:23 -08:00
..
dsa2.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
dsa_priv.h net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
dsa.c net: dsa: tag_gswip: Add gswip to dsa_tag_protocol_to_str() 2018-09-17 08:12:11 -07:00
Kconfig net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
legacy.c net: dsa: legacy: simplify getting .driver_data 2018-10-22 19:49:04 -07:00
Makefile net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
master.c net: dsa: Allow providing PHY statistics from CPU port 2018-04-27 11:53:03 -04:00
port.c dsa: port: Ignore bridge VLAN events 2018-05-31 14:13:43 -04:00
slave.c net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL 2018-11-23 18:02:23 -08:00
switch.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
tag_brcm.c net: dsa: Move padding into Broadcom tagger 2018-01-05 11:21:31 -05:00
tag_dsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_edsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_gswip.c net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
tag_ksz.c net: dsa: rename dsa_master_get_slave 2017-10-18 12:24:33 +01:00
tag_lan9303.c net: dsa: lan9303: calculate offload_fwd_mark from tag 2017-11-14 21:47:48 +09:00
tag_mtk.c net: dsa: mediatek: combine MediaTek tag with VLAN tag 2017-12-15 10:31:54 -05:00
tag_qca.c net: dsa: rename dsa_master_get_slave 2017-10-18 12:24:33 +01:00
tag_trailer.c net: dsa: add error handling for pskb_trim_rcsum 2018-06-11 14:19:38 -07:00