Skip to content

Add MDB bulk deletion support

Ido Schimmel bridge netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 12 repliesApplied 9/9

Patches in v1 All 9 applied

#Subject and filesSizeRepliesApplied
1/9bridge: add MDB state mask uAPI attributeinclude/uapi/linux/if_bridge.h+1 -01 replyApplied
2/9rtnetlink: bridge: Use a different policy for MDB bulk deletenet/core/rtnetlink.c+49 -21 replyApplied
3/9net: Add MDB bulk deletion device operationinclude/linux/netdevice.h+6 -01 replyApplied
4/9rtnetlink: bridge: Invoke MDB bulk deletion when needednet/core/rtnetlink.c+8 -01 replyApplied
5/9bridge: mdb: Add MDB bulk deletion supportnet/bridge/br_device.c net/bridge/br_mdb.c net/bridge/br_private.h+142 -01 replyApplied
6/9vxlan: mdb: Add MDB bulk deletion supportdrivers/net/vxlan/vxlan_core.c drivers/net/vxlan/vxlan_mdb.c drivers/net/vxlan/vxlan_private.h+153 -241 replyApplied
7/9rtnetlink: bridge: Enable MDB bulk deletionnet/core/rtnetlink.c+2 -11 replyApplied
8/9selftests: bridge_mdb: Add MDB bulk deletion testtools/testing/selftests/net/forwarding/bridge_mdb.sh+189 -22 repliesApplied
9/9selftests: vxlan_mdb: Add MDB bulk deletion testtools/testing/selftests/net/test_vxlan_mdb.sh+199 -23 repliesApplied

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchPetr MachataHangbin LiuNikolay Aleksandrov
1/9R-b A-b
2/9R-b A-b
3/9R-b A-b
4/9R-b A-b
5/9R-b A-b
6/9R-b A-b
7/9R-b A-b
8/9A-b R-b A-b
9/9A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 0/9] Add MDB bulk deletion support

This patchset adds MDB bulk deletion support, allowing user space to request the deletion of matching entries instead of dumping the entire MDB and issuing a separate deletion request for each matching entry. Support is added in both the bridge and VXLAN drivers in a similar fashion to the existing FDB bulk deletion support.

The parameters according to which bulk deletion can be performed are similar to the FDB ones, namely: Destination port, VLAN ID, state (e.g., "permanent"), routing protocol, source / destination VNI, destination IP and UDP port. Flushing based on flags (e.g., "offload", "fast_leave", "added_by_star_ex", "blocked") is not currently supported, but can be added in the future, if a use case arises.

Patch #1 adds a new uAPI attribute to allow specifying the state mask according to which bulk deletion will be performed, if any.

Patch #2 adds a new policy according to which bulk deletion requests (with 'NLM_F_BULK' flag set) will be parsed.

Patches #3-#4 add a new NDO for MDB bulk deletion and invoke it from the rtnetlink code when a bulk deletion request is made.

Patches #5-#6 implement the MDB bulk deletion NDO in the bridge and VXLAN drivers, respectively.

Patch #7 allows user space to issue MDB bulk deletion requests by no longer rejecting the 'NLM_F_BULK' flag when it is set in 'RTM_DELMDB' requests.

Patches #8-#9 add selftests for both drivers, for both good and bad flows.

iproute2 changes can be found here [1].

https://github.com/idosch/iproute2/tree/submit/mdb_flush_v1

Ido Schimmel (9):
bridge: add MDB state mask uAPI attribute
rtnetlink: bridge: Use a different policy for MDB bulk delete
net: Add MDB bulk deletion device operation
rtnetlink: bridge: Invoke MDB bulk deletion when needed
bridge: mdb: Add MDB bulk deletion support
vxlan: mdb: Add MDB bulk deletion support
rtnetlink: bridge: Enable MDB bulk deletion
selftests: bridge_mdb: Add MDB bulk deletion test
selftests: vxlan_mdb: Add MDB bulk deletion test

 drivers/net/vxlan/vxlan_core.c                |   1 +
 drivers/net/vxlan/vxlan_mdb.c                 | 174 ++++++++++++---
 drivers/net/vxlan/vxlan_private.h             |   2 +
 include/linux/netdevice.h                     |   6 +
 include/uapi/linux/if_bridge.h                |   1 +
 net/bridge/br_device.c                        |   1 +
 net/bridge/br_mdb.c                           | 133 ++++++++++++
 net/bridge/br_private.h                       |   8 +
 net/core/rtnetlink.c                          |  62 +++++-
 .../selftests/net/forwarding/bridge_mdb.sh    | 191 ++++++++++++++++-
 tools/testing/selftests/net/test_vxlan_mdb.sh | 201 +++++++++++++++++-
 11 files changed, 749 insertions(+), 31 deletions(-)
Signature · 1 line
2.40.1