Move BPF offload program from netd to mainline
Test: as the follows.
$ adb shell ls sys/fs/bpf | grep offload
map_offload_tether_ingress_map
map_offload_tether_limit_map
map_offload_tether_stats_map
prog_offload_schedcls_ingress_tether_ether
prog_offload_schedcls_ingress_tether_rawip
$ adb shell dumpsys netd --short
TetherController
BPF ingress map: iif(iface) v6addr -> oif(iface) srcmac ..
13(rmnet_data3) 2401:e180:8842:6e3:bc6a:2e45:c30:f418 -> ..
BPF stats (downlink): iif(iface) -> packets bytes errors
13(rmnet_data3) -> 7 488 0
BPF limit: iif(iface) -> bytes
13(rmnet_data3) -> 9223372036854775807
Log:
bpfloader: Loaded object: /apex/com.android.tethering/etc/bpf/offload.o
Change-Id: I71b7efb1f4bd6eb1cd469a0e1e4a56342dc6e579
diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp
index 67097a7..0524374 100644
--- a/Tethering/apex/Android.bp
+++ b/Tethering/apex/Android.bp
@@ -19,6 +19,7 @@
updatable: true,
min_sdk_version: "current",
java_libs: ["framework-tethering"],
+ bpfs: ["offload.o"],
apps: ["Tethering"],
manifest: "manifest.json",
key: "com.android.tethering.key",