NetBpfLoad: disable mainline on < U QPR3
We stop calling 'service mdnsd_netbpfload' from libnetd_updatable.so.
To make this work we need to change all bpf .o minimum bpfloader versions
from mainline BPFLOADER_MAINLINE_X_VERSION to non-mainline
BPFLOADER_X_VERSION equivalents (at least for X < U QPR3).
The {offload,test}@mainline.o files are now misnamed, but we leave this be:
- 'mainline' now means 'U+ BTF enabled version',
- S and (official) T use the baseline non-BTF version.
However, there are *some* oem/vendor T's with @ supporting bpfloade,
so they will use the @mainline.o files instead... (this is harmless)
Bug: 335124875
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibe285aefc315e6cb224450d1487980df3cba0eff
diff --git a/bpf_progs/test.c b/bpf_progs/test.c
index fff3512..2b4a08f 100644
--- a/bpf_progs/test.c
+++ b/bpf_progs/test.c
@@ -22,11 +22,11 @@
// BTF is incompatible with bpfloaders < v0.10, hence for S (v0.2) we must
// ship a different file than for later versions, but we need bpfloader v0.25+
// for obj@ver.o support
-#define BPFLOADER_MIN_VER BPFLOADER_MAINLINE_T_VERSION
+#define BPFLOADER_MIN_VER BPFLOADER_OBJ_AT_VER_VERSION
#else /* MAINLINE */
-// The resulting .o needs to load on the Android S bpfloader
+// The resulting .o needs to load on the Android S & T bpfloaders
#define BPFLOADER_MIN_VER BPFLOADER_S_VERSION
-#define BPFLOADER_MAX_VER BPFLOADER_T_VERSION
+#define BPFLOADER_MAX_VER BPFLOADER_OBJ_AT_VER_VERSION
#endif /* MAINLINE */
// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21