]> git.ipfire.org Git - thirdparty/linux.git/commit
rtnetlink: add RTEXT_FILTER_NAME_ONLY support to rtnl_dump_ifinfo()
authorEric Dumazet <edumazet@google.com>
Mon, 25 May 2026 08:35:42 +0000 (08:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 May 2026 02:20:15 +0000 (19:20 -0700)
commitd628604f7ea75a4dfe7ee3792f3c79c29ca81c04
tree0e34a03ee3cb6d6f4dea10bb11c8ce1343d4d121
parent6768c7c3d70f0d6f9cb6fad2b33357ec7379d952
rtnetlink: add RTEXT_FILTER_NAME_ONLY support to rtnl_dump_ifinfo()

When user requests RTEXT_FILTER_NAME_ONLY flag, we limit the dump
parts to:

 - struct nlmsghdr
 - IFLA_IFNAME
 - IFLA_PROP_LIST (alternate names)

- This saves space in the dump, pushing more devices per system call.
- This can be done without acquiring RTNL.

I still have a medium term goal to avoid RTNL in rtnl_dump_ifinfo()
regardless of RTEXT_FILTER_NAME_ONLY being used.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260525083542.1565964-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/rtnetlink.c