net: dsa: add FDB notifier
Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to notify not only a single switch, but all switches of a the fabric when an FDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1faabf7440
commit
685fb6a40d
@@ -20,6 +20,8 @@ enum {
|
||||
DSA_NOTIFIER_AGEING_TIME,
|
||||
DSA_NOTIFIER_BRIDGE_JOIN,
|
||||
DSA_NOTIFIER_BRIDGE_LEAVE,
|
||||
DSA_NOTIFIER_FDB_ADD,
|
||||
DSA_NOTIFIER_FDB_DEL,
|
||||
};
|
||||
|
||||
/* DSA_NOTIFIER_AGEING_TIME */
|
||||
@@ -36,6 +38,14 @@ struct dsa_notifier_bridge_info {
|
||||
int port;
|
||||
};
|
||||
|
||||
/* DSA_NOTIFIER_FDB_* */
|
||||
struct dsa_notifier_fdb_info {
|
||||
const struct switchdev_obj_port_fdb *fdb;
|
||||
struct switchdev_trans *trans;
|
||||
int sw_index;
|
||||
int port;
|
||||
};
|
||||
|
||||
struct dsa_device_ops {
|
||||
struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
|
||||
struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
|
||||
|
Reference in New Issue
Block a user