1 From 4395275fcbb80f1e312d75b20a68aabcb7c0dc74 Mon Sep 17 00:00:00 2001
2 From: Daniel Borkmann <daniel@iogearbox.net>
3 Date: Thu, 7 Jan 2016 15:50:22 +0100
4 Subject: [PATCH] net, sched: add skb_at_tc_ingress helper
6 Add a skb_at_tc_ingress() as this will be needed elsewhere as well and
7 can hide the ugly ifdef.
9 Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
10 Acked-by: Alexei Starovoitov <ast@kernel.org>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 net/sched/cls_bpf.c | 6 +-----
14 1 file changed, 1 insertion(+), 5 deletions(-)
16 --- a/net/sched/cls_bpf.c
17 +++ b/net/sched/cls_bpf.c
18 @@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_bu
19 struct tcf_result *res)
21 struct cls_bpf_head *head = rcu_dereference_bh(tp->root);
22 + bool at_ingress = skb_at_tc_ingress(skb);
23 struct cls_bpf_prog *prog;
24 -#ifdef CONFIG_NET_CLS_ACT
25 - bool at_ingress = G_TC_AT(skb->tc_verd) & AT_INGRESS;
27 - bool at_ingress = false;
31 if (unlikely(!skb_mac_header_was_set(skb)))