WSL2-Linux-Kernel/drivers/s390
Alexandra Winter 521c65b649 s390/qeth: implement ndo_bridge_setlink for learning_sync
Documentation/networking/switchdev.txt and 'man bridge' indicate that the
learning_sync bridge attribute is used to control whether a given
device will sync MAC addresses learned on its device port to a master
bridge FDB, where they will show up as 'extern_learn offload'. So we map
qeth_l2_dev2br_an_set() to the learning_sync bridge link attribute.

Turning off learning_sync will flush all extern_learn entries from the
bridge fdb and all pending events from the card's work queue.

When the hardware interface goes offline with learning_sync on
(e.g. for HW recovery), all extern_learn entries will be flushed from the
bridge fdb and all pending events from the card's work queue. When the
interface goes online again, it will send new notifications for all then
valid MACs. learning_sync attribute can not be modified while interface is
offline. See
'commit e6e771b3d8 ("s390/qeth: detach netdevice while card is offline")'

An alternative implementation would be to always offload the 'learning'
attribute of a software bridge to the hardware interface attached to it
and thus implicitly enable fdb notification. This was not chosen for 2
reasons:
1) In our case the software bridge is NOT a representation of a hardware
switch. It is just connected to a smart NIC that is able to inform
about the addresses attached to it. It is not necessarily using source
MAC learning for this and other bridgeports can be attached to other
NICs with different properties.
2) We want a means to enable this notification explicitly. There may be
cases where a bridgeport is set to 'learning', but we do not want to
enable the notification.

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
..
block s390/dasd: Use struct_size() helper 2020-07-15 08:47:11 -06:00
char s390/tty3270: remove function callback casts 2020-07-01 20:00:55 +02:00
cio s390/cio: Helper functions to read CSSID, IID, and CHID 2020-09-15 13:21:46 -07:00
crypto s390/pkey: remove redundant variable initialization 2020-08-11 18:16:31 +02:00
net s390/qeth: implement ndo_bridge_setlink for learning_sync 2020-09-15 13:21:47 -07:00
scsi scsi: zfcp: Fix use-after-free in request timeout handlers 2020-08-17 22:12:09 -04:00
virtio s390/virtio: remove unused pm callbacks 2020-06-16 13:44:04 +02:00
Makefile