net: bridge: add option to allow activity notifications for any fdb entries
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 23 Jun 2020 20:47:17 +0000 (23:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:36:33 +0000 (14:36 -0700)
commit31cbc39b6344916c20452e43a9171009214c409c
tree998b76d2b5cb90193021b894b7b55b79c114f096
parent899426b3bdd947541ba4af8c767575889c8b842a
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>
include/uapi/linux/neighbour.h
net/bridge/br_fdb.c
net/bridge/br_private.h