Revert "Add a temporary hack to CS to report netbpfload result"

This reverts commit fe956d9189.

This is targetting mainline release M-2024-09.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If89337854d677fdef1389b85cea645715a5e8491
This commit is contained in:
Maciej Żenczykowski 2024-06-15 06:36:57 -07:00
commit 8e7276b482

View file

@ -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());