diff options
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 30 |
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 | |||
121 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 121 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
122 | extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); | 122 | extern 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 | |||
125 | extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); | ||
126 | extern void tcf_police_destroy(struct tcf_police *p); | ||
127 | extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est); | ||
128 | extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); | ||
129 | extern int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *p); | ||
130 | |||
131 | static inline int | ||
132 | tcf_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 |