]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: add API to notify bridge driver of learned FBD on offloaded device
authorScott Feldman <sfeldma@gmail.com>
Fri, 28 Nov 2014 13:34:21 +0000 (14:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Dec 2014 04:01:22 +0000 (20:01 -0800)
commitf66c8111667b8da07ca64e99e8e7c80cd120aa22
tree35f71111059d8377c8069680f7a569a170f2801c
parent1eea96827d1ba9554076e5f7476ff4a49c4145f6
bridge: add API to notify bridge driver of learned FBD on offloaded device

When the swdev device learns a new mac/vlan on a port, it sends some async
notification to the driver and the driver installs an FDB in the device.
To give a holistic system view, the learned mac/vlan should be reflected
in the bridge's FBD table, so the user, using normal iproute2 cmds, can view
what is currently learned by the device.  This API on the bridge driver gives
a way for the swdev driver to install an FBD entry in the bridge FBD table.
(And remove one).

This is equivalent to the device running these cmds:

  bridge fdb [add|del] <mac> dev <dev> vid <vlan id> master

This patch needs some extra eyeballs for review, in paricular around the
locking and contexts.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_bridge.h
include/uapi/linux/neighbour.h
net/bridge/br_fdb.c
net/bridge/br_private.h