From 6b7829f2c1c0059300ad905504dc530244d0ce57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Mon, 18 Jan 2021 00:03:37 -0800 Subject: [PATCH] switch from SEC() to DEFINE_BPF_PROG() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I keep on failing to find this using grep because it doesn't match how all the other programs are defined, so change it for consistency. Test: builds, atest, TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: Ib61b375bef84d2b489080866b2411c84880e4ef2 --- Tethering/bpf_progs/offload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tethering/bpf_progs/offload.c b/Tethering/bpf_progs/offload.c index cc5af3127b..c66bb5cf65 100644 --- a/Tethering/bpf_progs/offload.c +++ b/Tethering/bpf_progs/offload.c @@ -162,8 +162,9 @@ static inline __always_inline int do_forward(struct __sk_buff* skb, bool is_ethe return bpf_redirect(v->oif, 0 /* this is effectively BPF_F_EGRESS */); } -SEC("schedcls/ingress/tether_ether") -int sched_cls_ingress_tether_ether(struct __sk_buff* skb) { +DEFINE_BPF_PROG("schedcls/ingress/tether_ether", AID_ROOT, AID_ROOT, + sched_cls_ingress_tether_ether) +(struct __sk_buff* skb) { return do_forward(skb, true); }