Merge "rename: @btf.o -> @mainline.o" into main

This commit is contained in:
Treehugger Robot 2024-03-12 06:45:41 +00:00 • committed by Gerrit Code Review
commit 37bb9b247e
6 changed files with 14 additions and 14 deletions

View file

@ -103,9 +103,9 @@ apex {
"dscpPolicy.o",
"netd.o",
"offload.o",
"offload@btf.o",
"offload@mainline.o",
"test.o",
"test@btf.o",
"test@mainline.o",
],
apps: [
"ServiceConnectivityResources",

View file

@ -94,13 +94,13 @@ bpf {
}
bpf {
name: "offload@btf.o",
srcs: ["offload@btf.c"],
name: "offload@mainline.o",
srcs: ["offload@mainline.c"],
btf: true,
cflags: [
"-Wall",
"-Werror",
"-DBTF",
"-DMAINLINE",
],
}
@ -114,13 +114,13 @@ bpf {
}
bpf {
name: "test@btf.o",
srcs: ["test@btf.c"],
name: "test@mainline.o",
srcs: ["test@mainline.c"],
btf: true,
cflags: [
"-Wall",
"-Werror",
"-DBTF",
"-DMAINLINE",
],
}

View file

@ -24,16 +24,16 @@
#define __kernel_udphdr udphdr
#include <linux/udp.h>
#ifdef BTF
#ifdef MAINLINE
// 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_OBJ_AT_VER_VERSION
#else /* BTF */
#else /* MAINLINE */
// The resulting .o needs to load on the Android S bpfloader
#define BPFLOADER_MIN_VER BPFLOADER_S_VERSION
#define BPFLOADER_MAX_VER BPFLOADER_OBJ_AT_VER_VERSION
#endif /* BTF */
#endif /* MAINLINE */
// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21
#define TETHERING_UID AID_ROOT

View file

@ -0,0 +1 @@
offload.c

View file

@ -18,16 +18,16 @@
#include <linux/in.h>
#include <linux/ip.h>
#ifdef BTF
#ifdef MAINLINE
// 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_OBJ_AT_VER_VERSION
#else /* BTF */
#else /* MAINLINE */
// The resulting .o needs to load on the Android S bpfloader
#define BPFLOADER_MIN_VER BPFLOADER_S_VERSION
#define BPFLOADER_MAX_VER BPFLOADER_OBJ_AT_VER_VERSION
#endif /* BTF */
#endif /* MAINLINE */
// Warning: values other than AID_ROOT don't work for map uid on BpfLoader < v0.21
#define TETHERING_UID AID_ROOT

1
bpf_progs/test@mainline.c Symbolic link
View file

@ -0,0 +1 @@
test.c