Searched refs:police (Results 1 - 9 of 9) sorted by relevance

/linux-4.4.14/net/sched/
H A Dact_police.c2 * net/sched/act_police.c Input police filter
122 struct tcf_police *police; tcf_act_police_locate() local
143 police = to_police(a->priv); tcf_act_police_locate()
145 police->tcf_bindcnt += 1; tcf_act_police_locate()
146 police->tcf_refcnt += 1; tcf_act_police_locate()
156 police = kzalloc(sizeof(*police), GFP_KERNEL); tcf_act_police_locate()
157 if (police == NULL) tcf_act_police_locate()
160 police->tcf_refcnt = 1; tcf_act_police_locate()
161 spin_lock_init(&police->tcf_lock); tcf_act_police_locate()
163 police->tcf_bindcnt = 1; tcf_act_police_locate()
179 spin_lock_bh(&police->tcf_lock); tcf_act_police_locate()
181 err = gen_replace_estimator(&police->tcf_bstats, NULL, tcf_act_police_locate()
182 &police->tcf_rate_est, tcf_act_police_locate()
183 &police->tcf_lock, est); tcf_act_police_locate()
188 !gen_estimator_active(&police->tcf_bstats, tcf_act_police_locate()
189 &police->tcf_rate_est))) { tcf_act_police_locate()
195 police->tcfp_mtu = parm->mtu; tcf_act_police_locate()
196 if (police->tcfp_mtu == 0) { tcf_act_police_locate()
197 police->tcfp_mtu = ~0; tcf_act_police_locate()
199 police->tcfp_mtu = 255 << R_tab->rate.cell_log; tcf_act_police_locate()
202 police->rate_present = true; tcf_act_police_locate()
203 psched_ratecfg_precompute(&police->rate, &R_tab->rate, 0); tcf_act_police_locate()
206 police->rate_present = false; tcf_act_police_locate()
209 police->peak_present = true; tcf_act_police_locate()
210 psched_ratecfg_precompute(&police->peak, &P_tab->rate, 0); tcf_act_police_locate()
213 police->peak_present = false; tcf_act_police_locate()
217 police->tcfp_result = nla_get_u32(tb[TCA_POLICE_RESULT]); tcf_act_police_locate()
218 police->tcfp_burst = PSCHED_TICKS2NS(parm->burst); tcf_act_police_locate()
219 police->tcfp_toks = police->tcfp_burst; tcf_act_police_locate()
220 if (police->peak_present) { tcf_act_police_locate()
221 police->tcfp_mtu_ptoks = (s64) psched_l2t_ns(&police->peak, tcf_act_police_locate()
222 police->tcfp_mtu); tcf_act_police_locate()
223 police->tcfp_ptoks = police->tcfp_mtu_ptoks; tcf_act_police_locate()
225 police->tcf_action = parm->action; tcf_act_police_locate()
228 police->tcfp_ewma_rate = nla_get_u32(tb[TCA_POLICE_AVRATE]); tcf_act_police_locate()
230 spin_unlock_bh(&police->tcf_lock); tcf_act_police_locate()
234 police->tcfp_t_c = ktime_get_ns(); tcf_act_police_locate()
235 police->tcf_index = parm->index ? parm->index : tcf_act_police_locate()
237 h = tcf_hash(police->tcf_index, POL_TAB_MASK); tcf_act_police_locate()
239 hlist_add_head(&police->tcf_head, &hinfo->htab[h]); tcf_act_police_locate()
242 a->priv = police; tcf_act_police_locate()
246 spin_unlock_bh(&police->tcf_lock); tcf_act_police_locate()
251 kfree(police); tcf_act_police_locate()
258 struct tcf_police *police = a->priv; tcf_act_police() local
263 spin_lock(&police->tcf_lock); tcf_act_police()
265 bstats_update(&police->tcf_bstats, skb); tcf_act_police()
267 if (police->tcfp_ewma_rate && tcf_act_police()
268 police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { tcf_act_police()
269 police->tcf_qstats.overlimits++; tcf_act_police()
270 if (police->tcf_action == TC_ACT_SHOT) tcf_act_police()
271 police->tcf_qstats.drops++; tcf_act_police()
272 spin_unlock(&police->tcf_lock); tcf_act_police()
273 return police->tcf_action; tcf_act_police()
276 if (qdisc_pkt_len(skb) <= police->tcfp_mtu) { tcf_act_police()
277 if (!police->rate_present) { tcf_act_police()
278 spin_unlock(&police->tcf_lock); tcf_act_police()
279 return police->tcfp_result; tcf_act_police()
283 toks = min_t(s64, now - police->tcfp_t_c, tcf_act_police()
284 police->tcfp_burst); tcf_act_police()
285 if (police->peak_present) { tcf_act_police()
286 ptoks = toks + police->tcfp_ptoks; tcf_act_police()
287 if (ptoks > police->tcfp_mtu_ptoks) tcf_act_police()
288 ptoks = police->tcfp_mtu_ptoks; tcf_act_police()
289 ptoks -= (s64) psched_l2t_ns(&police->peak, tcf_act_police()
292 toks += police->tcfp_toks; tcf_act_police()
293 if (toks > police->tcfp_burst) tcf_act_police()
294 toks = police->tcfp_burst; tcf_act_police()
295 toks -= (s64) psched_l2t_ns(&police->rate, qdisc_pkt_len(skb)); tcf_act_police()
297 police->tcfp_t_c = now; tcf_act_police()
298 police->tcfp_toks = toks; tcf_act_police()
299 police->tcfp_ptoks = ptoks; tcf_act_police()
300 spin_unlock(&police->tcf_lock); tcf_act_police()
301 return police->tcfp_result; tcf_act_police()
305 police->tcf_qstats.overlimits++; tcf_act_police()
306 if (police->tcf_action == TC_ACT_SHOT) tcf_act_police()
307 police->tcf_qstats.drops++; tcf_act_police()
308 spin_unlock(&police->tcf_lock); tcf_act_police()
309 return police->tcf_action; tcf_act_police()
316 struct tcf_police *police = a->priv; tcf_act_police_dump() local
318 .index = police->tcf_index, tcf_act_police_dump()
319 .action = police->tcf_action, tcf_act_police_dump()
320 .mtu = police->tcfp_mtu, tcf_act_police_dump()
321 .burst = PSCHED_NS2TICKS(police->tcfp_burst), tcf_act_police_dump()
322 .refcnt = police->tcf_refcnt - ref, tcf_act_police_dump()
323 .bindcnt = police->tcf_bindcnt - bind, tcf_act_police_dump()
326 if (police->rate_present) tcf_act_police_dump()
327 psched_ratecfg_getrate(&opt.rate, &police->rate); tcf_act_police_dump()
328 if (police->peak_present) tcf_act_police_dump()
329 psched_ratecfg_getrate(&opt.peakrate, &police->peak); tcf_act_police_dump()
332 if (police->tcfp_result && tcf_act_police_dump()
333 nla_put_u32(skb, TCA_POLICE_RESULT, police->tcfp_result)) tcf_act_police_dump()
335 if (police->tcfp_ewma_rate && tcf_act_police_dump()
336 nla_put_u32(skb, TCA_POLICE_AVRATE, police->tcfp_ewma_rate)) tcf_act_police_dump()
350 .kind = "police",
H A Dcls_api.c526 if (exts->police && tb[exts->police]) { tcf_exts_validate()
527 act = tcf_action_init_1(net, tb[exts->police], rate_tlv, tcf_exts_validate()
528 "police", ovr, tcf_exts_validate()
546 (exts->police && tb[exts->police])) tcf_exts_validate()
591 } else if (exts->police) { tcf_exts_dump()
593 nest = nla_nest_start(skb, exts->police); tcf_exts_dump()
H A Dsch_cbq.c85 unsigned char police; member in struct:cbq_class
1315 cl->police = p->police; cbq_set_police()
1318 if (p->police == TC_POLICE_RECLASSIFY) cbq_set_police()
1509 if (cl->police) { cbq_dump_police()
1510 opt.police = cl->police; cbq_dump_police()
1623 if (cl->police == TC_POLICE_RECLASSIFY) cbq_graft()
H A Dsch_api.c98 NET_XMIT_POLICED - dropped by police.
/linux-4.4.14/include/net/
H A Dpkt_cls.h68 int police; member in struct:tcf_exts
71 static inline void tcf_exts_init(struct tcf_exts *exts, int action, int police) tcf_exts_init() argument
78 exts->police = police; tcf_exts_init()
H A Dact_api.h5 * Public police action API for classifiers/qdiscs
/linux-4.4.14/include/uapi/linux/
H A Dpkt_sched.h457 unsigned char police; member in struct:tc_cbq_police
/linux-4.4.14/sound/oss/dmasound/
H A Ddmasound_core.c1216 We do not police this (it is up to the ll driver to be honest).
/linux-4.4.14/include/linux/
H A Dnetdevice.h92 #define NET_XMIT_POLICED 0x03 /* skb is shot by police */

Completed in 376 milliseconds