mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: replace br_fdb_external_learn_* calls with switchdev notifier events
This patch benefits from newly introduced switchdev notifier and uses it to propagate fdb learn events from rocker driver to bridge. That avoids direct function calls and possible use by other listeners (ovs). Suggested-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
03bf0c2812
commit
3aeb66176f
6 changed files with 78 additions and 55 deletions
|
@ -13,10 +13,21 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
enum netdev_switch_notifier_type {
|
||||
NETDEV_SWITCH_FDB_ADD = 1,
|
||||
NETDEV_SWITCH_FDB_DEL,
|
||||
};
|
||||
|
||||
struct netdev_switch_notifier_info {
|
||||
struct net_device *dev;
|
||||
};
|
||||
|
||||
struct netdev_switch_notifier_fdb_info {
|
||||
struct netdev_switch_notifier_info info; /* must be first */
|
||||
const unsigned char *addr;
|
||||
u16 vid;
|
||||
};
|
||||
|
||||
static inline struct net_device *
|
||||
netdev_switch_notifier_info_to_dev(const struct netdev_switch_notifier_info *info)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue