mbox series

[net-next,v2,00/13] Add MDB get support

Message ID 20231025123020.788710-1-idosch@nvidia.com (mailing list archive)
Headers show
Series Add MDB get support | expand

Message

Ido Schimmel Oct. 25, 2023, 12:30 p.m. UTC
This patchset adds MDB get support, allowing user space to request a
single MDB entry to be retrieved instead of dumping the entire MDB.
Support is added in both the bridge and VXLAN drivers.

Patches #1-#6 are small preparations in both drivers.

Patches #7-#8 add the required uAPI attributes for the new functionality
and the MDB get net device operation (NDO), respectively.

Patches #9-#10 implement the MDB get NDO in both drivers.

Patch #11 registers a handler for RTM_GETMDB messages in rtnetlink core.
The handler derives the net device from the ifindex specified in the
ancillary header and invokes its MDB get NDO.

Patches #12-#13 add selftests by converting tests that use MDB dump with
grep to the new MDB get functionality.

iproute2 changes can be found here [1].

v2:
* Patch #7: Add a comment to describe attributes structure.
* Patch #9: Add a comment above spin_lock_bh().

[1] https://github.com/idosch/iproute2/tree/submit/mdb_get_v1

Ido Schimmel (13):
  bridge: mcast: Dump MDB entries even when snooping is disabled
  bridge: mcast: Account for missing attributes
  bridge: mcast: Factor out a helper for PG entry size calculation
  bridge: mcast: Rename MDB entry get function
  vxlan: mdb: Adjust function arguments
  vxlan: mdb: Factor out a helper for remote entry size calculation
  bridge: add MDB get uAPI attributes
  net: Add MDB get device operation
  bridge: mcast: Add MDB get support
  vxlan: mdb: Add MDB get support
  rtnetlink: Add MDB get support
  selftests: bridge_mdb: Use MDB get instead of dump
  selftests: vxlan_mdb: Use MDB get instead of dump

 drivers/net/vxlan/vxlan_core.c                |   1 +
 drivers/net/vxlan/vxlan_mdb.c                 | 188 ++++++++++++++++--
 drivers/net/vxlan/vxlan_private.h             |   2 +
 include/linux/netdevice.h                     |   4 +
 include/uapi/linux/if_bridge.h                |  18 ++
 net/bridge/br_device.c                        |   3 +-
 net/bridge/br_input.c                         |   2 +-
 net/bridge/br_mdb.c                           | 184 ++++++++++++++++-
 net/bridge/br_multicast.c                     |   5 +-
 net/bridge/br_private.h                       |  19 +-
 net/core/rtnetlink.c                          |  89 ++++++++-
 .../selftests/net/forwarding/bridge_mdb.sh    | 184 +++++++----------
 tools/testing/selftests/net/test_vxlan_mdb.sh | 108 +++++-----
 13 files changed, 608 insertions(+), 199 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 27, 2023, 10 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 25 Oct 2023 15:30:07 +0300 you wrote:
> This patchset adds MDB get support, allowing user space to request a
> single MDB entry to be retrieved instead of dumping the entire MDB.
> Support is added in both the bridge and VXLAN drivers.
> 
> Patches #1-#6 are small preparations in both drivers.
> 
> Patches #7-#8 add the required uAPI attributes for the new functionality
> and the MDB get net device operation (NDO), respectively.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/13] bridge: mcast: Dump MDB entries even when snooping is disabled
    https://git.kernel.org/netdev/net-next/c/b9109b5b77f0
  - [net-next,v2,02/13] bridge: mcast: Account for missing attributes
    https://git.kernel.org/netdev/net-next/c/1b6d993509c1
  - [net-next,v2,03/13] bridge: mcast: Factor out a helper for PG entry size calculation
    https://git.kernel.org/netdev/net-next/c/62ef9cba98a2
  - [net-next,v2,04/13] bridge: mcast: Rename MDB entry get function
    https://git.kernel.org/netdev/net-next/c/6d0259dd6c53
  - [net-next,v2,05/13] vxlan: mdb: Adjust function arguments
    https://git.kernel.org/netdev/net-next/c/ff97d2a956a1
  - [net-next,v2,06/13] vxlan: mdb: Factor out a helper for remote entry size calculation
    https://git.kernel.org/netdev/net-next/c/14c32a46d992
  - [net-next,v2,07/13] bridge: add MDB get uAPI attributes
    https://git.kernel.org/netdev/net-next/c/83c1bbeb864f
  - [net-next,v2,08/13] net: Add MDB get device operation
    https://git.kernel.org/netdev/net-next/c/62f47bf9e2c0
  - [net-next,v2,09/13] bridge: mcast: Add MDB get support
    https://git.kernel.org/netdev/net-next/c/68b380a395a7
  - [net-next,v2,10/13] vxlan: mdb: Add MDB get support
    https://git.kernel.org/netdev/net-next/c/32d9673e96dc
  - [net-next,v2,11/13] rtnetlink: Add MDB get support
    https://git.kernel.org/netdev/net-next/c/ddd17a54e692
  - [net-next,v2,12/13] selftests: bridge_mdb: Use MDB get instead of dump
    https://git.kernel.org/netdev/net-next/c/e8bba9e83c88
  - [net-next,v2,13/13] selftests: vxlan_mdb: Use MDB get instead of dump
    https://git.kernel.org/netdev/net-next/c/0514dd05939a

You are awesome, thank you!