From 5e5432fc19c04982309ddf59f21a40075360bee5 Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Mon, 18 Oct 2021 09:14:08 +0200 Subject: [PATCH] bump tethering tc prio to make room for rate limiting There is currently a priority gap at 3. We need to bump tethering prios to 2 and 3 to make room for rate limiting, which should have the top priority. Test: m Bug: 157552970 Change-Id: I6e1087b232a8235e5cd42953470c72e2ae643bdc --- .../src/com/android/networkstack/tethering/BpfUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tethering/src/com/android/networkstack/tethering/BpfUtils.java b/Tethering/src/com/android/networkstack/tethering/BpfUtils.java index 0b44249458..cd6733a18d 100644 --- a/Tethering/src/com/android/networkstack/tethering/BpfUtils.java +++ b/Tethering/src/com/android/networkstack/tethering/BpfUtils.java @@ -51,11 +51,11 @@ public class BpfUtils { static final boolean DOWNSTREAM = true; static final boolean UPSTREAM = false; - // The priority of clat/tether hooks - smaller is higher priority. + // The priority of tether hooks - smaller is higher priority. // TC tether is higher priority then TC clat to match XDP winning over TC. - // Sync from system/netd/server/OffloadUtils.h. - static final short PRIO_TETHER6 = 1; - static final short PRIO_TETHER4 = 2; + // Sync from system/netd/server/TcUtils.h. + static final short PRIO_TETHER6 = 2; + static final short PRIO_TETHER4 = 3; // note that the above must be lower than PRIO_CLAT from netd's OffloadUtils.cpp private static String makeProgPath(boolean downstream, int ipVersion, boolean ether) {