Add dummy tethering offload eBPF map

Preparation for eBPF tethering offload

Test:
  build and check that the eBPF objects exist in sysfs:
  $ adb shell ls /sys/fs/bpf | grep offload
  map_offload_tether_ingress_map
  prog_offload_schedcls_ingress_tether

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Hungming Chen <nuccachen@google.com>
Change-Id: I47004fde644a697bd9c2979603c7bbc9eadd807f
diff --git a/bpf_progs/Android.bp b/bpf_progs/Android.bp
index 7b1f015..8ce924b 100644
--- a/bpf_progs/Android.bp
+++ b/bpf_progs/Android.bp
@@ -47,3 +47,16 @@
         "system/netd/libnetdutils/include",
     ],
 }
+
+bpf {
+    name: "offload.o",
+    srcs: ["offload.c"],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    include_dirs: [
+        "system/netd/libnetdbpf/include",
+        "system/netd/libnetdutils/include",
+    ],
+}
diff --git a/bpf_progs/offload.c b/bpf_progs/offload.c
new file mode 100644
index 0000000..95765ff
--- /dev/null
+++ b/bpf_progs/offload.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <linux/if.h>
+#include <linux/pkt_cls.h>
+
+#include "bpf_helpers.h"
+#include "netdbpf/bpf_shared.h"
+
+DEFINE_BPF_MAP(tether_ingress_map, HASH, TetherIngressKey, TetherIngressValue, 64)
+
+SEC("schedcls/ingress/tether_ether")
+int sched_cls_ingress_tether_ether(struct __sk_buff* skb) {
+    // TODO
+    return TC_ACT_OK;
+}
+
+SEC("schedcls/ingress/tether_rawip")
+int sched_cls_ingress_tether_rawip(struct __sk_buff* skb) {
+    // TODO
+    return TC_ACT_OK;
+}
+
+char _license[] SEC("license") = "Apache 2.0";