From 8e7276b4828d69da7b93611a9923f833e5f7c53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Sat, 15 Jun 2024 06:36:57 -0700 Subject: [PATCH] Revert "Add a temporary hack to CS to report netbpfload result" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fe956d9189d17b3f221baeac3c87f8a2019df4fd. This is targetting mainline release M-2024-09. Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: If89337854d677fdef1389b85cea645715a5e8491 --- .../android/server/ConnectivityService.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java index 54fc32264c..3dee3050be 100755 --- a/service/src/com/android/server/ConnectivityService.java +++ b/service/src/com/android/server/ConnectivityService.java @@ -109,7 +109,6 @@ import static android.net.connectivity.ConnectivityCompatChanges.NETWORK_BLOCKED import static android.os.Process.INVALID_UID; import static android.os.Process.VPN_UID; import static android.system.OsConstants.ETH_P_ALL; -import static android.system.OsConstants.F_OK; import static android.system.OsConstants.IPPROTO_TCP; import static android.system.OsConstants.IPPROTO_UDP; @@ -279,7 +278,6 @@ import android.stats.connectivity.RequestType; import android.stats.connectivity.ValidatedState; import android.sysprop.NetworkProperties; import android.system.ErrnoException; -import android.system.Os; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; @@ -1844,28 +1842,6 @@ public class ConnectivityService extends IConnectivityManager.Stub new PermissionMonitor(mContext, mNetd, mBpfNetMaps, mHandlerThread); mHandlerThread.start(); mHandler = new InternalHandler(mHandlerThread.getLooper()); - // Temporary hack to report netbpfload result. - // TODO: remove in 2024-09 when netbpfload starts loading mainline bpf programs. - mHandler.postDelayed(() -> { - // Did netbpfload create the map? - try { - Os.access("/sys/fs/bpf/net_shared/map_gentle_test", F_OK); - } catch (ErrnoException e) { - Log.wtf(TAG, "netbpfload did not create map", e); - } - // Did netbpfload create the program? - try { - Os.access("/sys/fs/bpf/net_shared/prog_gentle_skfilter_accept", F_OK); - } catch (ErrnoException e) { - Log.wtf(TAG, "netbpfload did not create program", e); - } - // Did netbpfload run to completion? - try { - Os.access("/sys/fs/bpf/netd_shared/mainline_done", F_OK); - } catch (ErrnoException e) { - Log.wtf(TAG, "netbpfload did not run to completion", e); - } - }, 30_000 /* delayMillis */); mTrackerHandler = new NetworkStateTrackerHandler(mHandlerThread.getLooper()); mConnectivityDiagnosticsHandler = new ConnectivityDiagnosticsHandler(mHandlerThread.getLooper());