aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/act_api.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-15 03:03:05 -0400
committerDavid S. Miller <davem@davemloft.net>2007-07-15 03:03:05 -0400
commitc3bc7cff8fddb6ff9715be8bfc3d911378c4d69d (patch)
treee23946fb3583ee17e95c07f6e04b5dcc498fa581 /include/net/act_api.h
parent73ca4918fbb98311421259d82ef4ab44feeace43 (diff)
[NET_SCHED]: Kill CONFIG_NET_CLS_POLICE
The NET_CLS_ACT option is now a full replacement for NET_CLS_POLICE, remove the old code. The config option will be kept around to select the equivalent NET_CLS_ACT options for a short time to allow easier upgrades. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r--include/net/act_api.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 2f0273feabd3..68b4eaf7719d 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -121,34 +121,4 @@ extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, in
121extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); 121extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
122extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); 122extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int);
123#endif /* CONFIG_NET_CLS_ACT */ 123#endif /* CONFIG_NET_CLS_ACT */
124
125extern int tcf_police(struct sk_buff *skb, struct tcf_police *p);
126extern void tcf_police_destroy(struct tcf_police *p);
127extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est);
128extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p);
129extern int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *p);
130
131static inline int
132tcf_police_release(struct tcf_police *p, int bind)
133{
134 int ret = 0;
135#ifdef CONFIG_NET_CLS_ACT
136 if (p) {
137 if (bind)
138 p->tcf_bindcnt--;
139
140 p->tcf_refcnt--;
141 if (p->tcf_refcnt <= 0 && !p->tcf_bindcnt) {
142 tcf_police_destroy(p);
143 ret = 1;
144 }
145 }
146#else
147 if (p && --p->tcf_refcnt == 0)
148 tcf_police_destroy(p);
149
150#endif /* CONFIG_NET_CLS_ACT */
151 return ret;
152}
153
154#endif 124#endif