brcm2708: update linux 4.4 patches to latest version
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.4 / 0220-net-sched-add-skb_at_tc_ingress-helper.patch
1 From 21d7bc4d1c4680d8c1e8f14b314c3f232db3b6aa 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
5
6 Add a skb_at_tc_ingress() as this will be needed elsewhere as well and
7 can hide the ugly ifdef.
8
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>
12 ---
13 net/sched/cls_bpf.c | 6 +-----
14 1 file changed, 1 insertion(+), 5 deletions(-)
15
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)
20 {
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;
26 -#else
27 - bool at_ingress = false;
28 -#endif
29 int ret = -1;
30
31 if (unlikely(!skb_mac_header_was_set(skb)))