From 21751050394542dbc63bf1ac29f4e89058489e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 15 Jul 2025 12:24:09 -0700 Subject: [PATCH] bpf/progs/netd.h: use defines for some map SIZE constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is better for libbpf... Test: TreeHugger Flag: EXEMPT mainline / comment only Signed-off-by: Maciej Żenczykowski Change-Id: Ie9ccb37498b89e638fba1e48535d1108536080f1 --- bpf/progs/netd.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bpf/progs/netd.h b/bpf/progs/netd.h index 7010d558a0..79c6e371ec 100644 --- a/bpf/progs/netd.h +++ b/bpf/progs/netd.h @@ -95,9 +95,8 @@ typedef struct { } SkStorageValue; STRUCT_SIZE(SkStorageValue, 8); -// 'static' - otherwise these constants end up in .rodata in the resulting .o post compilation -static const int STATS_MAP_SIZE = 5000; -static const int CONFIGURATION_MAP_SIZE = 2; +#define STATS_MAP_SIZE 5000 +#define CONFIGURATION_MAP_SIZE 2 #ifdef __cplusplus