aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/act_api.h30
-rw-r--r--include/net/pkt_cls.h8
-rw-r--r--include/net/sch_generic.h2
3 files changed, 1 insertions, 39 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
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 6c29920cbe29..7968b1d66369 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -65,8 +65,6 @@ struct tcf_exts
65{ 65{
66#ifdef CONFIG_NET_CLS_ACT 66#ifdef CONFIG_NET_CLS_ACT
67 struct tc_action *action; 67 struct tc_action *action;
68#elif defined CONFIG_NET_CLS_POLICE
69 struct tcf_police *police;
70#endif 68#endif
71}; 69};
72 70
@@ -91,8 +89,6 @@ tcf_exts_is_predicative(struct tcf_exts *exts)
91{ 89{
92#ifdef CONFIG_NET_CLS_ACT 90#ifdef CONFIG_NET_CLS_ACT
93 return !!exts->action; 91 return !!exts->action;
94#elif defined CONFIG_NET_CLS_POLICE
95 return !!exts->police;
96#else 92#else
97 return 0; 93 return 0;
98#endif 94#endif
@@ -129,11 +125,7 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts,
129#ifdef CONFIG_NET_CLS_ACT 125#ifdef CONFIG_NET_CLS_ACT
130 if (exts->action) 126 if (exts->action)
131 return tcf_action_exec(skb, exts->action, res); 127 return tcf_action_exec(skb, exts->action, res);
132#elif defined CONFIG_NET_CLS_POLICE
133 if (exts->police)
134 return tcf_police(skb, exts->police);
135#endif 128#endif
136
137 return 0; 129 return 0;
138} 130}
139 131
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 0153cd9d1b8d..8a67f24cbe02 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -290,7 +290,7 @@ static inline int qdisc_reshape_fail(struct sk_buff *skb, struct Qdisc *sch)
290{ 290{
291 sch->qstats.drops++; 291 sch->qstats.drops++;
292 292
293#if defined(CONFIG_NET_CLS_ACT) || defined(CONFIG_NET_CLS_POLICE) 293#ifdef CONFIG_NET_CLS_ACT
294 if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) 294 if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch))
295 goto drop; 295 goto drop;
296 296