12345678910111213141516171819202122232425262728293031 |
- From cb795ee030d3ed4b792e795e545b81c00254df25 Mon Sep 17 00:00:00 2001
- From: Daniel Borkmann <[email protected]>
- Date: Thu, 7 Jan 2016 15:50:22 +0100
- Subject: [PATCH] net, sched: add skb_at_tc_ingress helper
- Add a skb_at_tc_ingress() as this will be needed elsewhere as well and
- can hide the ugly ifdef.
- Signed-off-by: Daniel Borkmann <[email protected]>
- Acked-by: Alexei Starovoitov <[email protected]>
- Signed-off-by: David S. Miller <[email protected]>
- ---
- net/sched/cls_bpf.c | 6 +-----
- 2 files changed, 10 insertions(+), 5 deletions(-)
- --- a/net/sched/cls_bpf.c
- +++ b/net/sched/cls_bpf.c
- @@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_bu
- struct tcf_result *res)
- {
- struct cls_bpf_head *head = rcu_dereference_bh(tp->root);
- + bool at_ingress = skb_at_tc_ingress(skb);
- struct cls_bpf_prog *prog;
- -#ifdef CONFIG_NET_CLS_ACT
- - bool at_ingress = G_TC_AT(skb->tc_verd) & AT_INGRESS;
- -#else
- - bool at_ingress = false;
- -#endif
- int ret = -1;
-
- if (unlikely(!skb_mac_header_was_set(skb)))
|