mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04:00
net: bridge: add option to allow activity notifications for any fdb entries
This patch adds the ability to notify about activity of any entries (static, permanent or ext_learn). EVPN multihoming peers need it to properly and efficiently handle mac sync (peer active/locally active). We add a new NFEA_ACTIVITY_NOTIFY attribute which is used to dump the current activity state and to control if static entries should be monitored at all. We use 2 bits - one to activate fdb entry tracking (disabled by default) and the second to denote that an entry is inactive. We need the second bit in order to avoid multiple notifications of inactivity. Obviously this makes no difference for dynamic entries since at the time of inactivity they get deleted, while the tracked non-dynamic entries get the inactive bit set and get a notification. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
899426b3bd
commit
31cbc39b63
3 changed files with 119 additions and 13 deletions
|
@ -173,13 +173,24 @@ enum {
|
|||
};
|
||||
#define NDTA_MAX (__NDTA_MAX - 1)
|
||||
|
||||
/* FDB activity notification bits used in NFEA_ACTIVITY_NOTIFY:
|
||||
* - FDB_NOTIFY_BIT - notify on activity/expire for any entry
|
||||
* - FDB_NOTIFY_INACTIVE_BIT - mark as inactive to avoid multiple notifications
|
||||
*/
|
||||
enum {
|
||||
FDB_NOTIFY_BIT = (1 << 0),
|
||||
FDB_NOTIFY_INACTIVE_BIT = (1 << 1)
|
||||
};
|
||||
|
||||
/* embedded into NDA_FDB_EXT_ATTRS:
|
||||
* [NDA_FDB_EXT_ATTRS] = {
|
||||
* [NFEA_ACTIVITY_NOTIFY]
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
NFEA_UNSPEC,
|
||||
NFEA_ACTIVITY_NOTIFY,
|
||||
__NFEA_MAX
|
||||
};
|
||||
#define NFEA_MAX (__NFEA_MAX - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue