Lines Matching refs:p
253 struct tcf_police_params *p; in tcf_police_act() local
260 p = rcu_dereference_bh(police->params); in tcf_police_act()
262 if (p->tcfp_ewma_rate) { in tcf_police_act()
266 sample.bps >= p->tcfp_ewma_rate) in tcf_police_act()
270 if (tcf_police_mtu_check(skb, p->tcfp_mtu)) { in tcf_police_act()
271 if (!p->rate_present && !p->pps_present) { in tcf_police_act()
272 ret = p->tcfp_result; in tcf_police_act()
278 toks = min_t(s64, now - police->tcfp_t_c, p->tcfp_burst); in tcf_police_act()
279 if (p->peak_present) { in tcf_police_act()
281 if (ptoks > p->tcfp_mtu_ptoks) in tcf_police_act()
282 ptoks = p->tcfp_mtu_ptoks; in tcf_police_act()
283 ptoks -= (s64)psched_l2t_ns(&p->peak, in tcf_police_act()
286 if (p->rate_present) { in tcf_police_act()
288 if (toks > p->tcfp_burst) in tcf_police_act()
289 toks = p->tcfp_burst; in tcf_police_act()
290 toks -= (s64)psched_l2t_ns(&p->rate, qdisc_pkt_len(skb)); in tcf_police_act()
291 } else if (p->pps_present) { in tcf_police_act()
292 ppstoks = min_t(s64, now - police->tcfp_t_c, p->tcfp_pkt_burst); in tcf_police_act()
294 if (ppstoks > p->tcfp_pkt_burst) in tcf_police_act()
295 ppstoks = p->tcfp_pkt_burst; in tcf_police_act()
296 ppstoks -= (s64)psched_pkt2t_ns(&p->ppsrate, 1); in tcf_police_act()
304 ret = p->tcfp_result; in tcf_police_act()
322 struct tcf_police_params *p; in tcf_police_cleanup() local
324 p = rcu_dereference_protected(police->params, 1); in tcf_police_cleanup()
325 if (p) in tcf_police_cleanup()
326 kfree_rcu(p, rcu); in tcf_police_cleanup()
345 struct tcf_police_params *p; in tcf_police_dump() local
355 p = rcu_dereference_protected(police->params, in tcf_police_dump()
357 opt.mtu = p->tcfp_mtu; in tcf_police_dump()
358 opt.burst = PSCHED_NS2TICKS(p->tcfp_burst); in tcf_police_dump()
359 if (p->rate_present) { in tcf_police_dump()
360 psched_ratecfg_getrate(&opt.rate, &p->rate); in tcf_police_dump()
361 if ((p->rate.rate_bytes_ps >= (1ULL << 32)) && in tcf_police_dump()
363 p->rate.rate_bytes_ps, in tcf_police_dump()
367 if (p->peak_present) { in tcf_police_dump()
368 psched_ratecfg_getrate(&opt.peakrate, &p->peak); in tcf_police_dump()
369 if ((p->peak.rate_bytes_ps >= (1ULL << 32)) && in tcf_police_dump()
371 p->peak.rate_bytes_ps, in tcf_police_dump()
375 if (p->pps_present) { in tcf_police_dump()
377 p->ppsrate.rate_pkts_ps, in tcf_police_dump()
381 PSCHED_NS2TICKS(p->tcfp_pkt_burst), in tcf_police_dump()
387 if (p->tcfp_result && in tcf_police_dump()
388 nla_put_u32(skb, TCA_POLICE_RESULT, p->tcfp_result)) in tcf_police_dump()
390 if (p->tcfp_ewma_rate && in tcf_police_dump()
391 nla_put_u32(skb, TCA_POLICE_AVRATE, p->tcfp_ewma_rate)) in tcf_police_dump()
445 struct tcf_police_params *p; in tcf_police_offload_act_setup() local
448 p = rcu_dereference_protected(police->params, in tcf_police_offload_act_setup()
471 act_id = tcf_police_act_to_flow_act(p->tcfp_result, in tcf_police_offload_act_setup()