diff --git a/netbpfload/loader.cpp b/netbpfload/loader.cpp index 30266556ac..8115008a4e 100644 --- a/netbpfload/loader.cpp +++ b/netbpfload/loader.cpp @@ -45,10 +45,6 @@ #include "bpf/bpf_map_def.h" #include "loader.h" -#if BPFLOADER_VERSION < COMPILE_FOR_BPFLOADER_VERSION -#error "BPFLOADER_VERSION is less than COMPILE_FOR_BPFLOADER_VERSION" -#endif - #include #include #include diff --git a/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h b/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h index ac922cdad2..92ddf4414d 100644 --- a/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h +++ b/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h @@ -39,7 +39,13 @@ // Android U / 14 (api level 34) - various new program types added #define BPFLOADER_U_VERSION 37u -// Android V / 15 (api level 35) - this bpfloader should eventually go back to T +// Android V / 15 (api level 35) - platform only +// (note: the platform bpfloader in V isn't really versioned at all, +// as there is no need as it can only load objects compiled at the +// same time as itself and the rest of the platform) +#define BPFLOADER_V_VERSION 41u + +// Android Mainline - this bpfloader should eventually go back to T #define BPFLOADER_MAINLINE_VERSION 42u /* For mainline module use, you can #define BPFLOADER_{MIN/MAX}_VER @@ -51,7 +57,7 @@ * In which case it's just best to use the default. */ #ifndef BPFLOADER_MIN_VER -#define BPFLOADER_MIN_VER COMPILE_FOR_BPFLOADER_VERSION +#define BPFLOADER_MIN_VER BPFLOADER_V_VERSION #endif #ifndef BPFLOADER_MAX_VER diff --git a/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h b/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h index ef03c4daad..00ef91a203 100644 --- a/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h +++ b/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h @@ -48,9 +48,6 @@ #define DEFAULT_SIZEOF_BPF_MAP_DEF 32 // v0.0 struct: enum (uint sized) + 7 uint #define DEFAULT_SIZEOF_BPF_PROG_DEF 20 // v0.0 struct: 4 uint + bool + 3 byte alignment pad -// By default, unless otherwise specified, allow the use of features only supported by v0.37. -#define COMPILE_FOR_BPFLOADER_VERSION 37u - /* * The bpf_{map,prog}_def structures are compiled for different architectures. * Once by the BPF compiler for the BPF architecture, and once by a C++