Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	Eric Dumazet <edumazet@google.com>
Subject: [PATCH v5 net-next 0/8] vxlan: convert configuration to RCU and enable lockless dumps
Date: Mon, 21 Sep 2026 10:01:31 +0000	[thread overview]
Message-ID: <20260921100139.508191-1-edumazet@google.com> (raw)

This patch series converts struct vxlan_config to RCU protection, eliminates
redundant destination fields, and enables lockless RTNL-free link dumping
in vxlan_fill_info().

Changes in v5:
- Widen vxlan_multicast_leave() and vxlan_multicast_join() conditions in
  vxlan_changelink() to also run when VXLAN_F_VNIFILTER is set, so per-VNI
  multicast memberships are migrated across lower-device changes even when
  the device-default remote_ip is 0.0.0.0 (patches 1, 6, 7).
- Unwind already-updated per-VNI entries and the device-wide default FDB
  entry if vxlan_vnilist_update_group() fails partway through in
  vxlan_changelink() (patches 1, 7).
- Bump the vnifilter dump generation counter inside vxlan_vni_update_group()
  as soon as vninode->remote_ip is overwritten, so concurrent dumps still
  observe NLM_F_DUMP_INTR if a subsequent IGMP leave/join fails (patch 3).
- In vxlan_config_validate(), reject clearing IFLA_VXLAN_LINK when
  VXLAN_F_VNIFILTER has per-VNI multicast groups configured (patch 7).
- In vxlan_config_apply(), reset dev->needed_tailroom when detaching a
  lower device and use READ_ONCE()/WRITE_ONCE() for dev->mtu (patch 7).
- Link to v4: https://lore.kernel.org/netdev/20260915175501.391567-1-edumazet@google.com/

Changes in v4:
- Split out the default FDB update fix when the lower device changes into
  patch 1 with a Fixes: tag, and updated vxlan_vnilist_update_group() to
  refresh all VNIs (including those with explicit per-VNI multicast groups)
  so their FDB entries do not retain a stale remote_ifindex. Kept in this
  series rather than routing through net to avoid a cross-tree conflict
  with the default_dst removal in patch 7.
- Added patch 3 to signal interrupted RTM_GETTUNNEL dumps to user space via
  a per-netns atomic generation counter and nl_dump_check_consistent(), per
  Paolo's suggestion.
- Added an explicit VXLAN_DEV_F_MDB check in mlxsw_sp_nve_vxlan_can_offload()
  so moving VXLAN_F_MDB out of cfg->flags does not silently relax mlxsw's
  deny-by-default flag validation (patch 5).
- In vxlan_config_apply(), gated the MTU clamp on lowerdev_changed so that
  unrelated changelink operations do not shrink dev->mtu (patch 7).
- Documented in patch 7's changelog that cfg->remote_ifindex is now committed
  unconditionally and that IFLA_VXLAN_LINK=0 tears down the upper/lower
  adjacency.
- Link to v3: https://lore.kernel.org/netdev/20260911033945.164207-1-edumazet@google.com/

Changes in v3:
- Folded configuration conversion patches into a single patch to maintain
  clean bisectability and avoid intermediate mutable state.
- In vxlan_changelink(), pass lowerdev to vxlan_config_apply() to prevent
  truncating dev->needed_headroom and dev->needed_tailroom when lowerdev
  does not change.
- Cleaned up redundant NULL checks and unreachable error paths.

Eric Dumazet (8):
  vxlan: update default fdb entries when the lower device changes
  vxlan: vnifilter: use list_for_each_entry_rcu() in
    vxlan_vnifilter_dump_dev()
  vxlan: vnifilter: signal interrupted RTM_GETTUNNEL dumps
  vxlan: pass vxlan_config pointer to helper functions
  vxlan: move VXLAN_F_MDB to struct vxlan_dev flags
  vxlan: convert configuration to RCU protection
  vxlan: remove default_dst and use vxlan_config and lowerdev
  vxlan: no longer rely on RTNL in vxlan_fill_info()

 .../mellanox/mlx5/core/en/tc_tun_vxlan.c      |  11 +-
 .../mellanox/mlxsw/spectrum_nve_vxlan.c       |  19 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       |  57 +-
 drivers/net/vxlan/vxlan_core.c                | 754 +++++++++++-------
 drivers/net/vxlan/vxlan_mdb.c                 |  45 +-
 drivers/net/vxlan/vxlan_multicast.c           |  76 +-
 drivers/net/vxlan/vxlan_private.h             |  34 +-
 drivers/net/vxlan/vxlan_vnifilter.c           | 191 +++--
 include/net/vxlan.h                           |  12 +-
 9 files changed, 769 insertions(+), 430 deletions(-)

-- 
2.55.0.1082.g2b9226bbc0-goog


             reply	other threads:[~2026-09-21 10:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 10:01 Eric Dumazet [this message]
2026-09-21 10:01 ` [PATCH v5 net-next 1/8] vxlan: update default fdb entries when the lower device changes Eric Dumazet
2026-09-22 16:02   ` netdev-bot+sashiko
2026-09-21 10:01 ` [PATCH v5 net-next 2/8] vxlan: vnifilter: use list_for_each_entry_rcu() in vxlan_vnifilter_dump_dev() Eric Dumazet
2026-09-22 16:02   ` netdev-bot+sashiko
2026-09-21 10:01 ` [PATCH v5 net-next 3/8] vxlan: vnifilter: signal interrupted RTM_GETTUNNEL dumps Eric Dumazet
2026-09-21 10:01 ` [PATCH v5 net-next 4/8] vxlan: pass vxlan_config pointer to helper functions Eric Dumazet
2026-09-21 10:01 ` [PATCH v5 net-next 5/8] vxlan: move VXLAN_F_MDB to struct vxlan_dev flags Eric Dumazet
2026-09-21 10:01 ` [PATCH v5 net-next 6/8] vxlan: convert configuration to RCU protection Eric Dumazet
2026-09-21 10:01 ` [PATCH v5 net-next 7/8] vxlan: remove default_dst and use vxlan_config and lowerdev Eric Dumazet
2026-09-22 16:02   ` netdev-bot+sashiko
2026-09-21 10:01 ` [PATCH v5 net-next 8/8] vxlan: no longer rely on RTNL in vxlan_fill_info() Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260921100139.508191-1-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox