From f63140e7c6cd50691c0c99031fbc024a01754db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Mon, 2 May 2022 00:43:51 -0700 Subject: [PATCH 1/2] remove _mainline suffix from {clatd,netd}.o_mainline targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this hack is no longer needed now that duplicate target in system/netd is no longer an issue due to automerger to sc-mainline-prod being turned off Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: Id2c1dfac3bc4e6a8f5376a41ca2d1432b838da38 (cherry picked from commit d72a5a7a7007e8b0004bb9d2c82ffed52659ddf2) Bug: 232017472 Merged-In: Id2c1dfac3bc4e6a8f5376a41ca2d1432b838da38 --- Tethering/apex/Android.bp | 4 ++-- bpf_progs/Android.bp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp index d79edb4cb4..9076dcaf3b 100644 --- a/Tethering/apex/Android.bp +++ b/Tethering/apex/Android.bp @@ -70,9 +70,9 @@ apex { canned_fs_config: "canned_fs_config", bpfs: [ "block.o", - "clatd.o_mainline", + "clatd.o", "dscp_policy.o", - "netd.o_mainline", + "netd.o", "offload.o", "test.o", ], diff --git a/bpf_progs/Android.bp b/bpf_progs/Android.bp index 1fe0e9acc0..0e7b22d611 100644 --- a/bpf_progs/Android.bp +++ b/bpf_progs/Android.bp @@ -97,7 +97,7 @@ bpf { } bpf { - name: "clatd.o_mainline", + name: "clatd.o", srcs: ["clatd.c"], cflags: [ "-Wall", @@ -110,7 +110,7 @@ bpf { } bpf { - name: "netd.o_mainline", + name: "netd.o", srcs: ["netd.c"], cflags: [ "-Wall", From 749be0964685613558db4bc8be9f8f90c5cdc109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Sat, 23 Apr 2022 12:09:51 -0700 Subject: [PATCH 2/2] remove unused #defines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: Ifa1b254db3def23f06c0013182b6c6df627745e5 (cherry picked from commit 6e9ab78727cc229cb3f2b38e1d35e4f2fa61c115) Bug: 232017472 Merged-In: Ifa1b254db3def23f06c0013182b6c6df627745e5 --- bpf_progs/bpf_tethering.h | 53 --------------------------------------- 1 file changed, 53 deletions(-) diff --git a/bpf_progs/bpf_tethering.h b/bpf_progs/bpf_tethering.h index b0ec8f6f03..f9ef6ef774 100644 --- a/bpf_progs/bpf_tethering.h +++ b/bpf_progs/bpf_tethering.h @@ -73,10 +73,6 @@ static const char *bpf_tether_errors[] = { #define STRUCT_SIZE(name, size) _Static_assert(sizeof(name) == (size), "Incorrect struct size.") -#define BPF_PATH_TETHER BPF_PATH "tethering/" - -#define TETHER_STATS_MAP_PATH BPF_PATH_TETHER "map_offload_tether_stats_map" - typedef uint32_t TetherStatsKey; // upstream ifindex typedef struct { @@ -89,19 +85,9 @@ typedef struct { } TetherStatsValue; STRUCT_SIZE(TetherStatsValue, 6 * 8); // 48 -#define TETHER_LIMIT_MAP_PATH BPF_PATH_TETHER "map_offload_tether_limit_map" - typedef uint32_t TetherLimitKey; // upstream ifindex typedef uint64_t TetherLimitValue; // in bytes -#define TETHER_DOWNSTREAM6_TC_PROG_RAWIP_NAME "prog_offload_schedcls_tether_downstream6_rawip" -#define TETHER_DOWNSTREAM6_TC_PROG_ETHER_NAME "prog_offload_schedcls_tether_downstream6_ether" - -#define TETHER_DOWNSTREAM6_TC_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM6_TC_PROG_RAWIP_NAME -#define TETHER_DOWNSTREAM6_TC_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM6_TC_PROG_ETHER_NAME - -#define TETHER_DOWNSTREAM6_MAP_PATH BPF_PATH_TETHER "map_offload_tether_downstream6_map" - // For now tethering offload only needs to support downstreams that use 6-byte MAC addresses, // because all downstream types that are currently supported (WiFi, USB, Bluetooth and // Ethernet) have 6-byte MAC addresses. @@ -121,8 +107,6 @@ typedef struct { } Tether6Value; STRUCT_SIZE(Tether6Value, 4 + 14 + 2); // 20 -#define TETHER_DOWNSTREAM64_MAP_PATH BPF_PATH_TETHER "map_offload_tether_downstream64_map" - typedef struct { uint32_t iif; // The input interface index uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) @@ -146,14 +130,6 @@ typedef struct { } TetherDownstream64Value; STRUCT_SIZE(TetherDownstream64Value, 4 + 14 + 2 + 4 + 4 + 2 + 2 + 8); // 40 -#define TETHER_UPSTREAM6_TC_PROG_RAWIP_NAME "prog_offload_schedcls_tether_upstream6_rawip" -#define TETHER_UPSTREAM6_TC_PROG_ETHER_NAME "prog_offload_schedcls_tether_upstream6_ether" - -#define TETHER_UPSTREAM6_TC_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_UPSTREAM6_TC_PROG_RAWIP_NAME -#define TETHER_UPSTREAM6_TC_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_UPSTREAM6_TC_PROG_ETHER_NAME - -#define TETHER_UPSTREAM6_MAP_PATH BPF_PATH_TETHER "map_offload_tether_upstream6_map" - typedef struct { uint32_t iif; // The input interface index uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) @@ -162,23 +138,6 @@ typedef struct { } TetherUpstream6Key; STRUCT_SIZE(TetherUpstream6Key, 12); -#define TETHER_DOWNSTREAM4_TC_PROG_RAWIP_NAME "prog_offload_schedcls_tether_downstream4_rawip" -#define TETHER_DOWNSTREAM4_TC_PROG_ETHER_NAME "prog_offload_schedcls_tether_downstream4_ether" - -#define TETHER_DOWNSTREAM4_TC_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM4_TC_PROG_RAWIP_NAME -#define TETHER_DOWNSTREAM4_TC_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM4_TC_PROG_ETHER_NAME - -#define TETHER_DOWNSTREAM4_MAP_PATH BPF_PATH_TETHER "map_offload_tether_downstream4_map" - - -#define TETHER_UPSTREAM4_TC_PROG_RAWIP_NAME "prog_offload_schedcls_tether_upstream4_rawip" -#define TETHER_UPSTREAM4_TC_PROG_ETHER_NAME "prog_offload_schedcls_tether_upstream4_ether" - -#define TETHER_UPSTREAM4_TC_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_UPSTREAM4_TC_PROG_RAWIP_NAME -#define TETHER_UPSTREAM4_TC_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_UPSTREAM4_TC_PROG_ETHER_NAME - -#define TETHER_UPSTREAM4_MAP_PATH BPF_PATH_TETHER "map_offload_tether_upstream4_map" - typedef struct { uint32_t iif; // The input interface index uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) @@ -202,16 +161,4 @@ typedef struct { } Tether4Value; STRUCT_SIZE(Tether4Value, 4 + 14 + 2 + 16 + 16 + 2 + 2 + 8); // 64 -#define TETHER_DOWNSTREAM_XDP_PROG_RAWIP_NAME "prog_offload_xdp_tether_downstream_rawip" -#define TETHER_DOWNSTREAM_XDP_PROG_ETHER_NAME "prog_offload_xdp_tether_downstream_ether" - -#define TETHER_DOWNSTREAM_XDP_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM_XDP_PROG_RAWIP_NAME -#define TETHER_DOWNSTREAM_XDP_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_DOWNSTREAM_XDP_PROG_ETHER_NAME - -#define TETHER_UPSTREAM_XDP_PROG_RAWIP_NAME "prog_offload_xdp_tether_upstream_rawip" -#define TETHER_UPSTREAM_XDP_PROG_ETHER_NAME "prog_offload_xdp_tether_upstream_ether" - -#define TETHER_UPSTREAM_XDP_PROG_RAWIP_PATH BPF_PATH_TETHER TETHER_UPSTREAM_XDP_PROG_RAWIP_NAME -#define TETHER_UPSTREAM_XDP_PROG_ETHER_PATH BPF_PATH_TETHER TETHER_UPSTREAM_XDP_PROG_ETHER_NAME - #undef STRUCT_SIZE