Skip to contentSkip to conversation

ll_map: add RTEXT_FILTER_SKIP_STATS to ll_init_map()

PATCH Applied Eric Dumazet 2 participants 2 messages Apr 28 – Apr 30

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ll_map: add RTEXT_FILTER_SKIP_STATS to ll_init_map()

ll_init_map() only cares about names and ifindex.

We can save ~300 bytes per device if we ask the kernel to skip stats, not counting many cpu cycles if per-cpu stats are involved.

---
 lib/ll_map.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/ll_map.c +3 -1
index 8970c20f3cddedcdd1a6f522858fa350d2df8e5b..07937e27d4f6fb5506a3da6e9318270635224364 100644
@@ -391,7 +391,9 @@ void ll_init_map(struct rtnl_handle *rth)
 	if (initialized)
 		return;
 
-	if (rtnl_linkdump_req(rth, AF_UNSPEC) < 0) {
+	if (rtnl_linkdump_req_filter(rth, AF_UNSPEC,
+				     RTEXT_FILTER_VF |
+				     RTEXT_FILTER_SKIP_STATS) < 0) {
 		perror("Cannot send dump request");
 		exit(1);
 	}
Signature · 1 line
2.54.0.545.g6539524ca2-goog
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 8 lines · On Tue, 28 Apr 2026 07:56:47 +0000 you wrote:

ll_init_map() only cares about names and ifindex.

We can save ~300 bytes per device if we ask the kernel to skip stats, not counting many cpu cycles if per-cpu stats are involved.

[...]

Here is the summary with links:
- [iproute2-next] ll_map: add RTEXT_FILTER_SKIP_STATS to ll_init_map()

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=7bd7f33509d0

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html