From b345ffb23d6dcd7c89512cb70bf0d2dfaeebfd55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 15 Jul 2025 14:24:24 -0700 Subject: [PATCH] bpf: remove size_of_bpf_{map,prog}_def MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed, since there is no longer any possibility of .o vs loader version skew. 'git grep size_of_bpf_' finds nothing Test: TreeHugger Flag: EXEMPT mainline Signed-off-by: Maciej Żenczykowski Change-Id: Iba7799b5670008dfceeebca10fa42c3f6bd3273e --- bpf/progs/include/bpf_helpers.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bpf/progs/include/bpf_helpers.h b/bpf/progs/include/bpf_helpers.h index 942fa6b386..f1c23bd20c 100644 --- a/bpf/progs/include/bpf_helpers.h +++ b/bpf/progs/include/bpf_helpers.h @@ -68,18 +68,11 @@ * will simply ignore/skip this *entire* .o) * The [inclusive,exclusive) matches what we do for kernel ver dependencies. * - * The size_of_bpf_{map,prog}_def allow the bpfloader to load programs where - * these structures have been extended with additional fields (they will of - * course simply be ignored then). - * - * If missing, bpfloader_{min/max}_ver default to 0/0x10000 ie. [v0.0, v1.0), - * while size_of_bpf_{map/prog}_def default to 32/20 which are the v0.0 sizes. + * If missing, bpfloader_{min/max}_ver default to 0/0x10000 ie. [v0.0, v1.0) */ #define LICENSE(NAME) \ unsigned int _bpfloader_min_ver SECTION("bpfloader_min_ver") = BPFLOADER_MIN_VER; \ unsigned int _bpfloader_max_ver SECTION("bpfloader_max_ver") = BPFLOADER_MAX_VER; \ - size_t _size_of_bpf_map_def SECTION("size_of_bpf_map_def") = sizeof(struct bpf_map_def); \ - size_t _size_of_bpf_prog_def SECTION("size_of_bpf_prog_def") = sizeof(struct bpf_prog_def); \ char _license[] SECTION("license") = (NAME) // Helpers for writing kernel version specific bpf programs