android_packages_modules_Co.../Tethering/jni
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hungming Chen 3dbd4a1cc4 [NFCT.TETHER.15] Attach BPF program in the mainline module
Migrate Maze's BPF program attaching and detaching functions from
system/netd/server/OffloadUtils.{c, h} to tethering module.

Test: atest TetheringCoverageTests
Test case #1:
Enable WiFi hotspot and check tc filters are added or removed on both
wlan1 and rmnet_data#.

$ adb shell tc filter show dev wlan1 ingress
filter protocol ipv6 pref 1 bpf chain 0
filter protocol ipv6 pref 1 bpf chain 0 handle 0x1
prog_offload_schedcls_tether_upstream6_ether:[*fsobj] direct-action
not_in_hw id 2 tag 7cf020cc09a7c982
filter protocol ip pref 2 bpf chain 0
filter protocol ip pref 2 bpf chain 0 handle 0x1
prog_offload_schedcls_tether_upstream4_ether:[*fsobj] direct-action
not_in_hw id 7 tag 2f87d55b636c082c

$ adb shell tc filter show dev rmnet_data2 ingress;
filter protocol ipv6 pref 1 bpf chain 0
filter protocol ipv6 pref 1 bpf chain 0 handle 0x1
prog_offload_schedcls_tether_downstream6_rawip:[*fsobj] direct-action
not_in_hw id 3 tag 8b3885b75bd261de
filter protocol ip pref 2 bpf chain 0
filter protocol ip pref 2 bpf chain 0 handle 0x1
prog_offload_schedcls_tether_downstream4_rawip:[*fsobj] direct-action
not_in_hw id 6 tag b1c9478c91f8df9a

Test case #2:
Enable USB tethering and check tc filters are added or removed on both
rndis0 and rmnet_data#.

Test case #3:
Enable WiFi and USB tethering and check tc filter are added or removed
on rndis0, wlan1 and rmnet_data#.

Change-Id: I3f9a65043271bc8f5bf1b82ae505c471625ca9de
2021-03-11 17:49:42 +08:00
..
android_net_util_TetheringUtils.cpp Provide a easy way to access bpf maps from java 2021-01-11 17:43:27 +08:00
com_android_networkstack_tethering_BpfCoordinator.cpp Dump counters in "dumpsys tethering bpf". 2021-02-10 04:43:03 +00:00
com_android_networkstack_tethering_BpfMap.cpp Use header module bpf_syscall_wrappers 2021-01-13 14:31:28 +08:00
com_android_networkstack_tethering_BpfUtils.cpp [NFCT.TETHER.15] Attach BPF program in the mainline module 2021-03-11 17:49:42 +08:00
onload.cpp [NFCT.TETHER.15] Attach BPF program in the mainline module 2021-03-11 17:49:42 +08:00