diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-01-07 09:50:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-10 17:54:28 -0500 |
commit | fdc5432a7b44ab7de17141beec19d946b9344e91 (patch) | |
tree | 51330d75653ca85574e463c2e40ff60ab95e0774 /include/net/sch_generic.h | |
parent | 4156afafcc4c522adfd59c694126edc30247b7ad (diff) |
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 <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b2a8e6338576..636a362a0e03 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -407,6 +407,15 @@ bool tcf_destroy(struct tcf_proto *tp, bool force); | |||
407 | void tcf_destroy_chain(struct tcf_proto __rcu **fl); | 407 | void tcf_destroy_chain(struct tcf_proto __rcu **fl); |
408 | int skb_do_redirect(struct sk_buff *); | 408 | int skb_do_redirect(struct sk_buff *); |
409 | 409 | ||
410 | static inline bool skb_at_tc_ingress(const struct sk_buff *skb) | ||
411 | { | ||
412 | #ifdef CONFIG_NET_CLS_ACT | ||
413 | return G_TC_AT(skb->tc_verd) & AT_INGRESS; | ||
414 | #else | ||
415 | return false; | ||
416 | #endif | ||
417 | } | ||
418 | |||
410 | /* Reset all TX qdiscs greater then index of a device. */ | 419 | /* Reset all TX qdiscs greater then index of a device. */ |
411 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) | 420 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) |
412 | { | 421 | { |