upd patches
This commit is contained in:
parent
9eb9627de2
commit
893946fe33
@ -1,26 +1,44 @@
|
||||
From b6eea3c624f846b90d1befa92604cddac1671be4 Mon Sep 17 00:00:00 2001
|
||||
From 50173432aab792769a56d2a7d451d1a65e831532 Mon Sep 17 00:00:00 2001
|
||||
From: nyyu <mail@nyyu.dev>
|
||||
Date: Fri, 2 Dec 2022 21:18:50 +0100
|
||||
Date: Sun, 25 Dec 2022 22:35:09 +0100
|
||||
Subject: [PATCH] NetworkStats: disable BPF
|
||||
|
||||
---
|
||||
service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp | 4 ++--
|
||||
service-t/src/com/android/server/net/NetworkStatsFactory.java | 2 +-
|
||||
.../native/libs/libnetworkstats/BpfNetworkStats.cpp | 10 +++++-----
|
||||
.../com/android/server/net/NetworkStatsFactory.java | 2 +-
|
||||
service/src/com/android/server/BpfNetMaps.java | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp b/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp
|
||||
index 0948598df..0ee628bb8 100644
|
||||
index ee30f3db3..a68407044 100644
|
||||
--- a/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp
|
||||
+++ b/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp
|
||||
@@ -100,13 +100,13 @@ int bpfGetIfaceStats(const char* iface, Stats* stats) {
|
||||
@@ -104,13 +104,13 @@ int bpfGetIfaceStats(const char* iface, Stats* stats) {
|
||||
int ret;
|
||||
if (!ifaceStatsMap.isValid()) {
|
||||
if (!ifaceStatsMap.isValid() || !ifaceStatsMap.isOk()) {
|
||||
ret = -errno;
|
||||
- ALOGE("get ifaceStats map fd failed: %s", strerror(errno));
|
||||
+ //ALOGE("get ifaceStats map fd failed: %s", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
BpfMapRO<uint32_t, IfaceValue> ifaceIndexNameMap(IFACE_INDEX_NAME_MAP_PATH);
|
||||
if (!ifaceIndexNameMap.isValid() || !ifaceStatsMap.isOk()) {
|
||||
ret = -errno;
|
||||
- ALOGE("get ifaceIndexName map fd failed: %s", strerror(errno));
|
||||
+ //ALOGE("get ifaceIndexName map fd failed: %s", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
return bpfGetIfaceStatsInternal(iface, stats, ifaceStatsMap, ifaceIndexNameMap);
|
||||
@@ -189,7 +189,7 @@ int parseBpfNetworkStatsDetail(std::vector<stats_line>* lines,
|
||||
BpfMapRO<uint32_t, IfaceValue> ifaceIndexNameMap(IFACE_INDEX_NAME_MAP_PATH);
|
||||
if (!ifaceIndexNameMap.isValid()) {
|
||||
int ret = -errno;
|
||||
- ALOGE("get ifaceIndexName map fd failed: %s", strerror(errno));
|
||||
+ //ALOGE("get ifaceIndexName map fd failed: %s", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -266,14 +266,14 @@ int parseBpfNetworkStatsDev(std::vector<stats_line>* lines) {
|
||||
BpfMapRO<uint32_t, IfaceValue> ifaceIndexNameMap(IFACE_INDEX_NAME_MAP_PATH);
|
||||
if (!ifaceIndexNameMap.isValid()) {
|
||||
ret = -errno;
|
||||
@ -28,7 +46,15 @@ index 0948598df..0ee628bb8 100644
|
||||
+ //ALOGE("get ifaceIndexName map fd failed: %s", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
return bpfGetIfaceStatsInternal(iface, stats, ifaceStatsMap, ifaceIndexNameMap);
|
||||
|
||||
BpfMapRO<uint32_t, StatsValue> ifaceStatsMap(IFACE_STATS_MAP_PATH);
|
||||
if (!ifaceStatsMap.isValid()) {
|
||||
ret = -errno;
|
||||
- ALOGE("get ifaceStats map fd failed: %s", strerror(errno));
|
||||
+ //ALOGE("get ifaceStats map fd failed: %s", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
return parseBpfNetworkStatsDevInternal(lines, ifaceStatsMap, ifaceIndexNameMap);
|
||||
diff --git a/service-t/src/com/android/server/net/NetworkStatsFactory.java b/service-t/src/com/android/server/net/NetworkStatsFactory.java
|
||||
index 3b93f1a19..191400841 100644
|
||||
--- a/service-t/src/com/android/server/net/NetworkStatsFactory.java
|
||||
@ -58,5 +84,3 @@ index c006bc605..3d1fc9b71 100644
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.38.1
|
6
sync.sh
6
sync.sh
@ -55,9 +55,9 @@ git am $CI_WORKSPACE/fix-bt-le.patch || git am --abort
|
||||
cd $TOPDIR
|
||||
|
||||
#connectivity
|
||||
#cd packages/modules/Connectivity
|
||||
#git am $CI_WORKSPACE/fix-NetworkStats-disable-BPF.patch || git am --abort
|
||||
#cd $TOPDIR
|
||||
cd packages/modules/Connectivity
|
||||
git am $CI_WORKSPACE/fix-NetworkStats-disable-BPF.patch || git am --abort
|
||||
cd $TOPDIR
|
||||
|
||||
#av
|
||||
cd frameworks/av
|
||||
|
Loading…
Reference in New Issue
Block a user