Commit 3a15eb9d authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: Cleanup cls_set_class

Clean up a really messy cross reference where a macro cls_set_class
in pkt_sched.h would point to a function tcf_set_class in cls_api.c
that uses a inlined function __cls_set_class in pkt_sched.h again.

Make tcf_set_class be cls_set_class since it was never used and
inline it as well.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c9d123f2
......@@ -18,4 +18,29 @@ extern int register_tcf_proto_ops(struct tcf_proto_ops *ops);
extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
extern int ing_filter(struct sk_buff *skb);
static inline unsigned long
__cls_set_class(unsigned long *clp, unsigned long cl)
{
unsigned long old_cl;
old_cl = *clp;
*clp = cl;
return old_cl;
}
static inline long
cls_set_class(struct tcf_proto *tp, unsigned long *clp,
unsigned long cl)
{
unsigned long old_cl;
qdisc_lock_tree(tp->q->dev);
tcf_tree_lock(tp);
old_cl = __cls_set_class(clp, cl);
tcf_tree_unlock(tp);
return old_cl;
}
#endif
......@@ -22,18 +22,6 @@ static inline void *qdisc_priv(struct Qdisc *q)
& ~QDISC_ALIGN_CONST);
}
#define cls_set_class(tp, clp, cl) tcf_set_class(tp, clp, cl)
static inline unsigned long
__cls_set_class(unsigned long *clp, unsigned long cl)
{
unsigned long old_cl;
old_cl = *clp;
*clp = cl;
return old_cl;
}
/*
Timer resolution MUST BE < 10% of min_schedulable_packet_size/bandwidth
......
......@@ -297,19 +297,6 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
return err;
}
unsigned long tcf_set_class(struct tcf_proto *tp, unsigned long *clp,
unsigned long cl)
{
unsigned long old_cl;
tcf_tree_lock(tp);
old_cl = __cls_set_class(clp, cl);
tcf_tree_unlock(tp);
return old_cl;
}
static int
tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh,
u32 pid, u32 seq, unsigned flags, int event)
......@@ -475,4 +462,3 @@ subsys_initcall(tc_filter_init);
EXPORT_SYMBOL(register_tcf_proto_ops);
EXPORT_SYMBOL(unregister_tcf_proto_ops);
EXPORT_SYMBOL(tcf_set_class);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment