diff options
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index 8b06c2f3657f..68b4eaf7719d 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -19,7 +19,6 @@ struct tcf_common { | |||
19 | struct gnet_stats_basic tcfc_bstats; | 19 | struct gnet_stats_basic tcfc_bstats; |
20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est tcfc_rate_est; |
22 | spinlock_t *tcfc_stats_lock; | ||
23 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
24 | }; | 23 | }; |
25 | #define tcf_next common.tcfc_next | 24 | #define tcf_next common.tcfc_next |
@@ -32,7 +31,6 @@ struct tcf_common { | |||
32 | #define tcf_bstats common.tcfc_bstats | 31 | #define tcf_bstats common.tcfc_bstats |
33 | #define tcf_qstats common.tcfc_qstats | 32 | #define tcf_qstats common.tcfc_qstats |
34 | #define tcf_rate_est common.tcfc_rate_est | 33 | #define tcf_rate_est common.tcfc_rate_est |
35 | #define tcf_stats_lock common.tcfc_stats_lock | ||
36 | #define tcf_lock common.tcfc_lock | 34 | #define tcf_lock common.tcfc_lock |
37 | 35 | ||
38 | struct tcf_police { | 36 | struct tcf_police { |
@@ -123,34 +121,4 @@ extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, in | |||
123 | 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); |
124 | 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); |
125 | #endif /* CONFIG_NET_CLS_ACT */ | 123 | #endif /* CONFIG_NET_CLS_ACT */ |
126 | |||
127 | extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); | ||
128 | extern void tcf_police_destroy(struct tcf_police *p); | ||
129 | extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est); | ||
130 | extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); | ||
131 | extern int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *p); | ||
132 | |||
133 | static inline int | ||
134 | tcf_police_release(struct tcf_police *p, int bind) | ||
135 | { | ||
136 | int ret = 0; | ||
137 | #ifdef CONFIG_NET_CLS_ACT | ||
138 | if (p) { | ||
139 | if (bind) | ||
140 | p->tcf_bindcnt--; | ||
141 | |||
142 | p->tcf_refcnt--; | ||
143 | if (p->tcf_refcnt <= 0 && !p->tcf_bindcnt) { | ||
144 | tcf_police_destroy(p); | ||
145 | ret = 1; | ||
146 | } | ||
147 | } | ||
148 | #else | ||
149 | if (p && --p->tcf_refcnt == 0) | ||
150 | tcf_police_destroy(p); | ||
151 | |||
152 | #endif /* CONFIG_NET_CLS_ACT */ | ||
153 | return ret; | ||
154 | } | ||
155 | |||
156 | #endif | 124 | #endif |