aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-05-17 11:07:59 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-17 15:22:13 -0400
commit2190d1d0944f84c55cdfdb89c7920f8f9311bdde (patch)
tree0518f2849f7be8b42a1e3a8603b683e4317db728 /include
parentnet: sched: move TC_H_MAJ macro call into tcf_auto_prio (diff)
downloadlinux-dev-2190d1d0944f84c55cdfdb89c7920f8f9311bdde.tar.xz
linux-dev-2190d1d0944f84c55cdfdb89c7920f8f9311bdde.zip
net: sched: introduce helpers to work with filter chains
Introduce struct tcf_chain object and set of helpers around it. Wraps up insertion, deletion and search in the filter chain. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sch_generic.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 98cf2f23602d..52bceede534b 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -248,10 +248,15 @@ struct qdisc_skb_cb {
unsigned char data[QDISC_CB_PRIV_LEN];
};
-struct tcf_block {
+struct tcf_chain {
+ struct tcf_proto __rcu *filter_chain;
struct tcf_proto __rcu **p_filter_chain;
};
+struct tcf_block {
+ struct tcf_chain *chain;
+};
+
static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
{
struct qdisc_skb_cb *qcb;