[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251028033812.2043964-1-kuniyu@google.com>
Date: Tue, 28 Oct 2025 03:36:55 +0000
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuniyu@...gle.com>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: [PATCH v1 net-next 00/13] mpls: Remove RTNL dependency.
MPLS uses RTNL
1) to guarantee the lifetime of struct mpls_nh.nh_dev
2) to protect net->mpls.platform_label
, but neither actually requires RTNL.
If struct mpls_nh holds a refcnt for nh_dev, we do not need RTNL,
and it can be replaced with a dedicated mutex.
The series removes RTNL from net/mpls/.
Overview:
Patch 1 is misc cleanup.
Patch 2 - 9 are prep to drop RTNL for RTM_{NEW,DEL,GET}ROUTE
handlers.
Patch 10 & 11 converts mpls_dump_routes() and RTM_GETNETCONF to RCU.
Patch 12 replaces RTNL with a new per-netns mutex.
Patch 13 drops RTNL from RTM_{NEW,DEL,GET}ROUTE.
Kuniyuki Iwashima (13):
mpls: Return early in mpls_label_ok().
mpls: Hold dev refcnt for mpls_nh.
mpls: Unify return paths in mpls_dev_notify().
ipv6: Add in6_dev_rcu().
mpls: Use in6_dev_rcu() and dev_net_rcu() in mpls_forward() and
mpls_xmit().
mpls: Add mpls_dev_rcu().
mpls: Pass net to mpls_dev_get().
mpls: Add mpls_route_input().
mpls: Use mpls_route_input() where appropriate.
mpls: Convert mpls_dump_routes() to RCU.
mpls: Convert RTM_GETNETCONF to RCU.
mpls: Protect net->mpls.platform_label with a per-netns mutex.
mpls: Drop RTNL for RTM_NEWROUTE, RTM_DELROUTE, and RTM_GETROUTE.
include/net/addrconf.h | 5 +
include/net/netns/mpls.h | 1 +
net/mpls/af_mpls.c | 320 ++++++++++++++++++++++++---------------
net/mpls/internal.h | 19 ++-
net/mpls/mpls_iptunnel.c | 6 +-
5 files changed, 224 insertions(+), 127 deletions(-)
--
2.51.1.838.g19442a804e-goog
Powered by blists - more mailing lists