public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2-next] ll_map: add RTEXT_FILTER_SKIP_STATS to ll_init_map()
@ 2026-04-28  7:56 Eric Dumazet
  0 siblings, 0 replies; only message in thread
From: Eric Dumazet @ 2026-04-28  7:56 UTC (permalink / raw)
  To: David Ahern, Stephen Hemminger
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, netdev,
	eric.dumazet, Eric Dumazet

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.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 lib/ll_map.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/ll_map.c b/lib/ll_map.c
index 8970c20f3cddedcdd1a6f522858fa350d2df8e5b..07937e27d4f6fb5506a3da6e9318270635224364 100644
--- a/lib/ll_map.c
+++ b/lib/ll_map.c
@@ -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);
 	}
-- 
2.54.0.545.g6539524ca2-goog


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-28  7:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28  7:56 [PATCH iproute2-next] ll_map: add RTEXT_FILTER_SKIP_STATS to ll_init_map() Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox