Skip to content

vxlan: RCU protect vxlan_config and enable RTNL-less fill_info

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vxlan: pass vxlan_config pointer to helper functionsdrivers/net/vxlan/vxlan_core.c drivers/net/vxlan/vxlan_mdb.c drivers/net/vxlan/vxlan_private.h +2 more+158 -1291 reply
2/3vxlan: convert configuration to RCU protectiondrivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c drivers/net/vxlan/vxlan_core.c +5 more+331 -1721 reply
3/3vxlan: no longer rely on RTNL in vxlan_fill_info()drivers/net/vxlan/vxlan_core.c+11 -21 reply

Reviews trailers per patch

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

PatchPavan Chebbi
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/3] vxlan: RCU protect vxlan_config and enable RTNL-less fill_info

This patch series converts VXLAN configuration (struct vxlan_config) to be RCU-protected, allowing lockless readers and enabling RTNL-less vxlan_fill_info() netlink link info dumping.

Work has been split into three distinct parts:

1. Refactor helper functions in RX, TX, MDB, VNIFILTER, and OVS paths to accept a const struct vxlan_config *cfg pointer (or pass specific fields such as flags/saddr_family) rather than accessing vxlan->cfg directly.

2. Convert vxlan->cfg from an embedded struct into an RCU-protected pointer (struct vxlan_config __rcu *cfg), dynamically allocated on device creation or changelink, and freed via kfree_rcu(). Update offload drivers (mlxsw) and OVS (vport-vxlan.c) accordingly.

3. Update vxlan_fill_info() to run under rcu_read_lock() instead of relying on RTNL lock, completing the transition to lockless link info dumping for VXLAN devices.

Eric Dumazet (3):
vxlan: pass vxlan_config pointer to helper functions
vxlan: convert configuration to RCU protection
vxlan: no longer rely on RTNL in vxlan_fill_info()

 .../mellanox/mlxsw/spectrum_nve_vxlan.c       |  14 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       |  57 +-
 drivers/net/vxlan/vxlan_core.c                | 566 +++++++++++-------
 drivers/net/vxlan/vxlan_mdb.c                 |  37 +-
 drivers/net/vxlan/vxlan_multicast.c           |  12 +-
 drivers/net/vxlan/vxlan_private.h             |   6 +-
 drivers/net/vxlan/vxlan_vnifilter.c           |  24 +-
 include/net/vxlan.h                           |   3 +-
 net/openvswitch/vport-vxlan.c                 |  34 +-
 9 files changed, 475 insertions(+), 278 deletions(-)
Signature · 1 line
2.55.0.795.g602f6c329a-goog