linux/drivers/s390/net
Alexandra Winter 10a6cfc0fc s390/qeth: Translate address events into switchdev notifiers
A qeth-l2 HiperSockets card can show switch-ish behaviour in the sense,
that it can report all MACs that are reachable via this interface. Just
like a switch device, it can notify the software bridge about changes
to its fdb. This patch exploits this device-to-bridge-notification and
extracts the relevant information from the hardware events to generate
notifications to an attached software bridge.

There are 2 sources for this information:
1) The reply message of Perform-Network-Subchannel-Operations (PNSO)
(operation code ADDR_INFO) reports all addresses that are currently
reachable (implemented in a later patch).
2) As long as device-to-bridge-notification is enabled, hardware will
generate address change notification events, whenever the content of
the hardware fdb changes (this patch).

The bridge_hostnotify feature (PNSO operation code BRIDGE_INFO) uses
the same address change notification events. We need to distinguish
between qeth_pnso_mode QETH_PNSO_BRIDGEPORT and QETH_PNSO_ADDR_INFO
and call a different handler. In both cases deadlocks must be
prevented, if the workqueue is drained under lock and QETH_PNSO_NONE,
when notification is disabled.

bridge_hostnotify generates udev events, there is no intend to do the same
for dev2br. Instead this patch will generate SWITCHDEV_FDB_ADD_TO_BRIDGE
and SWITCHDEV_FDB_DEL_TO_BRIDGE notifications, that will cause the
software bridge to add (or delete) entries to its fdb as 'extern_learn
offload'.

Documentation/networking/switchdev.txt proposes to add
"depends NET_SWITCHDEV" to driver's Kconfig. This is not done here,
so even in absence of the NET_SWITCHDEV module, the QETH_L2 module will
still be built, but then the switchdev notifiers will have no effect.

No VLAN filtering is done on the entries and VLAN information is not
passed on to the bridge fdb entries. This could be added later.
For now VLAN interfaces can be defined on the upper bridge interface.

Multicast entries are not passed on to the bridge fdb.
This could be added later. For now mcast flooding can be used in the
bridge.

The card reports all MACs that are in its FDB, but we must not pass on
MACs that are registered for this interface.

Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-15 13:21:47 -07:00
..
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ctcm_fsms.h
ctcm_main.c s390/net: remove pm ops from ccwgroup drivers 2020-05-19 12:48:39 -07:00
ctcm_main.h
ctcm_mpc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
ism_drv.c s390/ism: indicate correct error reason in ism_alloc_dmb() 2020-07-27 10:30:01 -07:00
ism.h net/smc: immediate termination for SMCD link groups 2019-11-15 12:28:28 -08:00
Kconfig s390/net: add SMC config as one of the defaults of CCWGROUP 2020-09-10 15:24:26 -07:00
lcs.c s390/net: remove pm ops from ccwgroup drivers 2020-05-19 12:48:39 -07:00
lcs.h
Makefile
netiucv.c s390/net: remove pm support from iucv drivers 2020-05-19 12:48:39 -07:00
qeth_core_main.c s390/qeth: Detect PNSO OC3 capability 2020-09-15 13:21:47 -07:00
qeth_core_mpc.c s390/qeth: constify the MPC initialization data 2020-07-14 14:53:45 -07:00
qeth_core_mpc.h s390/qeth: unify structs for bridge port state 2020-08-27 07:42:03 -07:00
qeth_core_sys.c s390/qeth: clean up error handling for isolation mode cmds 2020-07-14 14:53:45 -07:00
qeth_core.h s390/qeth: Translate address events into switchdev notifiers 2020-09-15 13:21:47 -07:00
qeth_ethtool.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
qeth_l2_main.c s390/qeth: Translate address events into switchdev notifiers 2020-09-15 13:21:47 -07:00
qeth_l2_sys.c s390/qeth: strictly order bridge address events 2020-08-27 07:42:04 -07:00
qeth_l2.h s390/qeth: shift some bridgeport code around 2020-01-26 15:20:32 +01:00
qeth_l3_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
qeth_l3_sys.c s390/qeth: remove fake_broadcast attribute 2020-03-27 15:36:56 -07:00
qeth_l3.h s390/qeth: stop yielding the ip_lock during IPv4 registration 2019-12-18 12:34:56 -08:00
smsgiucv_app.c
smsgiucv.c s390/net: remove pm support from iucv drivers 2020-05-19 12:48:39 -07:00
smsgiucv.h