mbox series

[net-next,0/4] net: bridge: fdb activity tracking

Message ID 20200623204718.1057508-1-nikolay@cumulusnetworks.com
Headers show
Series net: bridge: fdb activity tracking | expand

Message

Nikolay Aleksandrov June 23, 2020, 8:47 p.m. UTC
Hi,
This set adds extensions needed for EVPN multi-homing proper and
efficient mac sync. User-space (e.g. FRR) needs to be able to track
non-dynamic entry activity on per-fdb basis depending if a tracked fdb is
currently peer active or locally active and needs to be able to add new
peer active fdb (static + track + inactive) without refreshing it to get
real activity tracking. Patch 02 adds a new NDA attribute - NDA_FDB_EXT_ATTRS
to avoid future pollution of NDA attributes by bridge or vxlan. New
bridge/vxlan specific fdb attributes are embedded in NDA_FDB_EXT_ATTRS,
which is used in patch 03 to pass the new NFEA_ACTIVITY_NOTIFY attribute
which controls if an fdb should be tracked and also reflects its current
state when dumping. It is treated as a bitfield, current valid bits are:
 1 - mark an entry for activity tracking
 2 - mark an entry as inactive to avoid multiple notifications and
     reflect state properly

Patch 04 adds the ability to avoid refreshing an entry when changing it
via the NFEA_DONT_REFRESH flag. That allows user-space to mark a static
entry for tracking and keep its real activity unchanged.
The set has been extensively tested with FRR and those changes will
be upstreamed if/after it gets accepted.

Thanks,
 Nik


Nikolay Aleksandrov (4):
  net: bridge: fdb_add_entry takes ndm as argument
  net: neighbor: add fdb extended attribute
  net: bridge: add option to allow activity notifications for any fdb
    entries
  net: bridge: add a flag to avoid refreshing fdb when changing/adding

 include/uapi/linux/neighbour.h |  24 +++++++
 net/bridge/br_fdb.c            | 127 ++++++++++++++++++++++++++++-----
 net/bridge/br_private.h        |   4 ++
 net/core/neighbour.c           |   1 +
 4 files changed, 139 insertions(+), 17 deletions(-)

Comments

David Miller June 24, 2020, 9:37 p.m. UTC | #1
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Tue, 23 Jun 2020 23:47:14 +0300

> This set adds extensions needed for EVPN multi-homing proper and
> efficient mac sync. User-space (e.g. FRR) needs to be able to track
> non-dynamic entry activity on per-fdb basis depending if a tracked fdb is
> currently peer active or locally active and needs to be able to add new
> peer active fdb (static + track + inactive) without refreshing it to get
> real activity tracking. Patch 02 adds a new NDA attribute - NDA_FDB_EXT_ATTRS
> to avoid future pollution of NDA attributes by bridge or vxlan. New
> bridge/vxlan specific fdb attributes are embedded in NDA_FDB_EXT_ATTRS,
> which is used in patch 03 to pass the new NFEA_ACTIVITY_NOTIFY attribute
> which controls if an fdb should be tracked and also reflects its current
> state when dumping. It is treated as a bitfield, current valid bits are:
>  1 - mark an entry for activity tracking
>  2 - mark an entry as inactive to avoid multiple notifications and
>      reflect state properly
> 
> Patch 04 adds the ability to avoid refreshing an entry when changing it
> via the NFEA_DONT_REFRESH flag. That allows user-space to mark a static
> entry for tracking and keep its real activity unchanged.
> The set has been extensively tested with FRR and those changes will
> be upstreamed if/after it gets accepted.

Series applied, thanks.