]> git.ipfire.org Git - thirdparty/linux.git/commit
rtnetlink: add RTEXT_FILTER_NAME_ONLY support
authorEric Dumazet <edumazet@google.com>
Mon, 11 May 2026 07:02:44 +0000 (07:02 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 May 2026 01:30:26 +0000 (18:30 -0700)
commitb588019e85f490696bf19f0747e93f14b1563927
tree69616dcd4929fdcd3e3e65bf7d2324210e4639c3
parent9edbdd2c9d02667b3953997440036ea2ba932b4d
rtnetlink: add RTEXT_FILTER_NAME_ONLY support

iproute2 can spend considerable amount of time in ll_init_map()
or ll_link_get() to dump verbose netdev attributes, contributing
to RTNL pressure.

Add RTEXT_FILTER_NAME_ONLY new flag so that rtnl_fill_ifinfo()
limits its output to:

- struct nlmsghdr
- IFLA_IFNAME
- IFLA_PROP_LIST (alternate names)

We can later avoid using RTNL when RTEXT_FILTER_NAME_ONLY
is requested, as none of these attributes need RTNL.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260511070244.971028-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/rtnetlink.h
net/core/rtnetlink.c