]> www.infradead.org Git - users/dwmw2/linux.git/commit
rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 8 Nov 2024 00:48:23 +0000 (16:48 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 01:26:52 +0000 (17:26 -0800)
commit636af13f213bf9b28a34254327934bc72a797754
treec8efa0426bf9ca385af216b0449f8d04d63ae871
parentd91191ffe23f927b14b8e861f22037cf153c48cb
rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.

Currently, rtnl_setlink() and rtnl_dellink() cannot be fully converted
to per-netns RTNL due to a lack of handling peer/lower/upper devices in
different netns.

For example, when we change a device in rtnl_setlink() and need to
propagate that to its upper devices, we want to avoid acquiring all netns
locks, for which we do not know the upper limit.

The same situation happens when we remove a device.

rtnl_dellink() could be transformed to remove a single device in the
requested netns and delegate other devices to per-netns work, and
rtnl_setlink() might be ?

Until we come up with a better idea, let's use a new flag
RTNL_FLAG_DOIT_PERNET_WIP for rtnl_dellink() and rtnl_setlink().

This will unblock converting RTNL users where such devices are not related.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241108004823.29419-11-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/rtnetlink.h
net/core/rtnetlink.c