Browse Source

Disable BPF offload

main
Pekka Helenius 1 year ago
parent
commit
4fd9e67221
4 changed files with 76 additions and 0 deletions
  1. +4
    -0
      lineage_src_root/device/samsung/s5neolte/device.mk
  2. +24
    -0
      lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/Android.bp
  3. +11
    -0
      lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/AndroidManifest.xml
  4. +37
    -0
      lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/res/values/config.xml

+ 4
- 0
lineage_src_root/device/samsung/s5neolte/device.mk View File

@ -124,6 +124,10 @@ PRODUCT_COPY_FILES += \
# Overlays
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
# Tethering
PRODUCT_PACKAGES += \
TetheringConfigOverlay
# Vendor security patch level
PRODUCT_PROPERTY_OVERRIDES += \
ro.lineage.build.vendor_security_patch=2017-03-01


+ 24
- 0
lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/Android.bp View File

@ -0,0 +1,24 @@
//
// Copyright (C) 2020 The Android Open-Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
runtime_resource_overlay {
name: "TetheringConfigOverlay",
theme: "TetheringConfigOverlay",
resource_dirs: ["res"],
product_specific: true,
certificate: "platform",
sdk_version: "current"
}

+ 11
- 0
lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/AndroidManifest.xml View File

@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.networkstack.tethering.samsung_s5neolte"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.networkstack.tethering"
android:targetName="TetheringConfig"
android:isStatic="true"
android:priority="0"/>
</manifest>

+ 37
- 0
lineage_src_root/device/samsung/s5neolte/rro_overlays/TetheringOverlay/res/values/config.xml View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2020, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Use the BPF offload for tethering when the kernel has support. True by default.
If the device doesn't want to support tether BPF offload, this should be false.
Note that this setting could be overridden by device config.
-->
<!--
The new trafficController design is based on per-cgroup eBPF filter as well as xt_bpf netfilter module inside the kernel.
However, support for per-cgroup eBPF is available on only on kernels >=4.9 . Disable BPF offloading support completely
as without proper per-cgroup eBPF, the stats returns errors continuously.
E TetherController: Error processing tether stats from BPF maps: Get firstKey map -1 failed: Bad file descriptor
Ref:
[0]: https://source.android.com/devices/tech/datausage/ebpf-traffic-monitor
[1]: https://github.com/LineageOS/android_system_netd/blob/4e0a5f13fc1018d0d5f60616c32b863277937134/server/TetherController.cpp#L1047
-->
<bool translatable="false" name="config_tether_enable_bpf_offload">false</bool>
</resources>

Loading…
Cancel
Save