Home
last modified time | relevance | path

Searched refs:police (Results 1 – 25 of 40) sorted by relevance

12

/linux-6.6.21/net/sched/
Dact_police.c50 struct tcf_police *police; in tcf_police_init() local
99 police = to_police(*a); in tcf_police_init()
115 err = gen_replace_estimator(&police->tcf_bstats, in tcf_police_init()
116 police->common.cpu_bstats, in tcf_police_init()
117 &police->tcf_rate_est, in tcf_police_init()
118 &police->tcf_lock, in tcf_police_init()
124 !gen_estimator_active(&police->tcf_rate_est))) { in tcf_police_init()
203 spin_lock_bh(&police->tcf_lock); in tcf_police_init()
204 spin_lock_bh(&police->tcfp_lock); in tcf_police_init()
205 police->tcfp_t_c = ktime_get_ns(); in tcf_police_init()
[all …]
Dact_api.c1297 struct tc_action_ops *tc_action_load_ops(struct nlattr *nla, bool police, in tc_action_load_ops() argument
1307 if (!police) { in tc_action_load_ops()
1363 bool police = flags & TCA_ACT_FLAGS_POLICE; in tcf_action_init_1() local
1372 if (!police) { in tcf_action_init_1()
1404 if (!police && tb[TCA_ACT_COOKIE]) in tcf_action_init_1()
1407 if (!police) in tcf_action_init_1()
Dcls_api.c3215 int police, struct tcf_proto *tp, u32 handle, in tcf_exts_init_ex() argument
3235 exts->police = police; in tcf_exts_init_ex()
3279 if (exts->police && tb[exts->police]) { in tcf_exts_validate_ex()
3282 a_o = tc_action_load_ops(tb[exts->police], true, in tcf_exts_validate_ex()
3288 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate_ex()
3314 (exts->police && tb[exts->police])) { in tcf_exts_validate_ex()
3374 } else if (exts->police) { in tcf_exts_dump()
3376 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
/linux-6.6.21/include/net/tc_act/
Dtc_police.h58 struct tcf_police *police = to_police(act); in tcf_police_rate_bytes_ps() local
61 params = rcu_dereference_protected(police->params, in tcf_police_rate_bytes_ps()
62 lockdep_is_held(&police->tcf_lock)); in tcf_police_rate_bytes_ps()
68 struct tcf_police *police = to_police(act); in tcf_police_burst() local
72 params = rcu_dereference_protected(police->params, in tcf_police_burst()
73 lockdep_is_held(&police->tcf_lock)); in tcf_police_burst()
106 struct tcf_police *police = to_police(act); in tcf_police_rate_pkt_ps() local
109 params = rcu_dereference_protected(police->params, in tcf_police_rate_pkt_ps()
110 lockdep_is_held(&police->tcf_lock)); in tcf_police_rate_pkt_ps()
116 struct tcf_police *police = to_police(act); in tcf_police_burst_pkt() local
[all …]
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/
Dpolice.c26 if (!police_act_validate_control(act->police.exceed.act_id, extack) || in police_act_validate()
27 !police_act_validate_control(act->police.notexceed.act_id, extack)) in police_act_validate()
30 if (act->police.peakrate_bytes_ps || in police_act_validate()
31 act->police.avrate || act->police.overhead) { in police_act_validate()
60 if (act->police.rate_bytes_ps) { in fill_meter_params_from_act()
63 params->rate = act->police.rate_bytes_ps << 3; in fill_meter_params_from_act()
64 params->burst = act->police.burst; in fill_meter_params_from_act()
65 } else if (act->police.rate_pkt_ps) { in fill_meter_params_from_act()
67 params->rate = act->police.rate_pkt_ps; in fill_meter_params_from_act()
68 params->burst = act->police.burst_pkt; in fill_meter_params_from_act()
[all …]
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/flower/
Dqos_conf.c125 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in nfp_policer_validate()
132 if (act->police.notexceed.act_id != FLOW_ACTION_CONTINUE && in nfp_policer_validate()
133 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in nfp_policer_validate()
139 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in nfp_policer_validate()
140 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in nfp_policer_validate()
147 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in nfp_policer_validate()
154 if (act->police.peakrate_bytes_ps || in nfp_policer_validate()
155 act->police.avrate || act->police.overhead) { in nfp_policer_validate()
234 if (action->police.rate_bytes_ps > 0) { in nfp_flower_install_rate_limiter()
241 if (action->police.rate_pkt_ps > 0) { in nfp_flower_install_rate_limiter()
[all …]
/linux-6.6.21/drivers/net/ethernet/microchip/lan966x/
Dlan966x_police.c78 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in lan966x_police_validate()
84 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in lan966x_police_validate()
85 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in lan966x_police_validate()
91 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in lan966x_police_validate()
98 if (act->police.peakrate_bytes_ps || in lan966x_police_validate()
99 act->police.avrate || act->police.overhead) { in lan966x_police_validate()
105 if (act->police.rate_pkt_ps) { in lan966x_police_validate()
152 pol.rate = div_u64(act->police.rate_bytes_ps, 1000) * 8; in lan966x_police_port_add()
153 pol.burst = act->police.burst; in lan966x_police_port_add()
/linux-6.6.21/drivers/net/ethernet/mscc/
Docelot_police.c165 if (a->police.exceed.act_id != FLOW_ACTION_DROP) { in ocelot_policer_validate()
171 if (a->police.notexceed.act_id != FLOW_ACTION_PIPE && in ocelot_policer_validate()
172 a->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in ocelot_policer_validate()
178 if (a->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in ocelot_policer_validate()
185 if (a->police.peakrate_bytes_ps || in ocelot_policer_validate()
186 a->police.avrate || a->police.overhead) { in ocelot_policer_validate()
192 if (a->police.rate_pkt_ps) { in ocelot_policer_validate()
/linux-6.6.21/drivers/net/ethernet/marvell/prestera/
Dprestera_acl.c40 } police; member
609 if (e->police.valid) { in __prestera_acl_rule_entry2hw_add()
611 act_hw[act_num].police = e->police.i; in __prestera_acl_rule_entry2hw_add()
639 if (e->police.valid) in __prestera_acl_rule_entry_act_destruct()
640 prestera_hw_policer_release(sw, e->police.i.id); in __prestera_acl_rule_entry_act_destruct()
675 if (arg->police.valid) { in __prestera_acl_rule_entry_act_construct()
676 u8 type = arg->police.ingress ? PRESTERA_POLICER_TYPE_INGRESS : in __prestera_acl_rule_entry_act_construct()
679 err = prestera_hw_policer_create(sw, type, &e->police.i.id); in __prestera_acl_rule_entry_act_construct()
683 err = prestera_hw_policer_sr_tcm_set(sw, e->police.i.id, in __prestera_acl_rule_entry_act_construct()
684 arg->police.rate, in __prestera_acl_rule_entry_act_construct()
[all …]
Dprestera_flower.c113 if (rule->re_arg.police.valid) in prestera_flower_parse_actions()
116 rule->re_arg.police.valid = 1; in prestera_flower_parse_actions()
117 rule->re_arg.police.rate = in prestera_flower_parse_actions()
118 act->police.rate_bytes_ps; in prestera_flower_parse_actions()
119 rule->re_arg.police.burst = act->police.burst; in prestera_flower_parse_actions()
120 rule->re_arg.police.ingress = block->ingress; in prestera_flower_parse_actions()
Dprestera_acl.h94 struct prestera_acl_action_police police; member
119 } police; member
/linux-6.6.21/drivers/net/dsa/sja1105/
Dsja1105_flower.c307 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in sja1105_policer_validate()
313 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in sja1105_policer_validate()
314 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in sja1105_policer_validate()
320 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in sja1105_policer_validate()
327 if (act->police.peakrate_bytes_ps || in sja1105_policer_validate()
328 act->police.avrate || act->police.overhead) { in sja1105_policer_validate()
334 if (act->police.rate_pkt_ps) { in sja1105_policer_validate()
370 act->police.rate_bytes_ps, in sja1105_cls_flower_add()
371 act->police.burst); in sja1105_cls_flower_add()
/linux-6.6.21/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_tc_matchall.c15 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in cxgb4_policer_validate()
21 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in cxgb4_policer_validate()
22 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in cxgb4_policer_validate()
28 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in cxgb4_policer_validate()
35 if (act->police.peakrate_bytes_ps || in cxgb4_policer_validate()
36 act->police.avrate || act->police.overhead) { in cxgb4_policer_validate()
42 if (act->police.rate_pkt_ps) { in cxgb4_policer_validate()
96 if (entry->police.rate_bytes_ps * 8 > max_link_rate) { in cxgb4_matchall_egress_validate()
198 p.u.params.maxrate = div_u64(entry->police.rate_bytes_ps * 8, 1000); in cxgb4_matchall_alloc_tc()
/linux-6.6.21/tools/testing/selftests/drivers/net/mlxsw/
Dtc_police_occ.sh72 action police rate 100mbit burst 100k conform-exceed drop/ok
82 action police rate 100mbit burst 100k conform-exceed drop/ok \
85 flower skip_sw action police index 10
Dtc_restrictions.sh320 action police rate 0.5kbit burst 1m conform-exceed drop/ok
325 action police rate 2.5tbit burst 1g conform-exceed drop/ok
330 action police rate 1.5kbit burst 1m conform-exceed drop/ok
337 action police rate 1.9tbit burst 1g conform-exceed drop/ok
344 action police rate 1.5kbit burst 512b conform-exceed drop/ok
349 action police rate 1.5kbit burst 2k conform-exceed drop/ok
370 action police rate 100mbit burst 100k conform-exceed drop/ok
377 action police rate 100mbit burst 100k conform-exceed drop/pipe \
378 action police rate 200mbit burst 200k conform-exceed drop/ok
Dtc_police_scale.sh47 action police rate 10mbit burst 100k \
/linux-6.6.21/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_tc.c198 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in otx2_policer_validate()
204 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in otx2_policer_validate()
205 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in otx2_policer_validate()
211 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in otx2_policer_validate()
218 if (act->police.peakrate_bytes_ps || in otx2_policer_validate()
219 act->police.avrate || act->police.overhead) { in otx2_policer_validate()
253 if (entry->police.rate_pkt_ps) { in otx2_tc_egress_matchall_install()
257 err = otx2_set_matchall_egress_rate(nic, entry->police.burst, in otx2_tc_egress_matchall_install()
258 otx2_convert_rate(entry->police.rate_bytes_ps)); in otx2_tc_egress_matchall_install()
419 if (act->police.rate_bytes_ps > 0) { in otx2_tc_parse_actions()
[all …]
/linux-6.6.21/tools/testing/selftests/net/forwarding/
Dtc_police.sh160 action police rate 80mbit burst 16k conform-exceed drop/ok
172 action police rate 80mbit burst 16k conform-exceed drop/ok
214 action police rate 80mbit burst 16k conform-exceed drop/ok \
221 action police index 10
253 action police rate 80mbit burst 16k conform-exceed drop/pipe \
332 action police pkts_rate 2000 pkts_burst 400 conform-exceed drop/ok
344 action police pkts_rate 2000 pkts_burst 400 conform-exceed drop/ok
360 action police mtu 1042 conform-exceed drop/ok
/linux-6.6.21/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_flower.c22 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in mlxsw_sp_policer_validate()
28 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in mlxsw_sp_policer_validate()
29 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in mlxsw_sp_policer_validate()
35 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in mlxsw_sp_policer_validate()
42 if (act->police.peakrate_bytes_ps || in mlxsw_sp_policer_validate()
43 act->police.avrate || act->police.overhead) { in mlxsw_sp_policer_validate()
49 if (act->police.rate_pkt_ps) { in mlxsw_sp_policer_validate()
253 burst = roundup_pow_of_two(act->police.burst); in mlxsw_sp_flower_parse_actions()
256 act->police.rate_bytes_ps, in mlxsw_sp_flower_parse_actions()
/linux-6.6.21/drivers/net/ethernet/ti/
Dam65-cpsw-qos.c676 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in am65_cpsw_qos_clsflower_policer_validate()
682 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in am65_cpsw_qos_clsflower_policer_validate()
683 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in am65_cpsw_qos_clsflower_policer_validate()
689 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in am65_cpsw_qos_clsflower_policer_validate()
696 if (act->police.rate_bytes_ps || act->police.peakrate_bytes_ps || in am65_cpsw_qos_clsflower_policer_validate()
697 act->police.avrate || act->police.overhead) { in am65_cpsw_qos_clsflower_policer_validate()
722 act->police.rate_pkt_ps); in am65_cpsw_qos_configure_clsflower()
Dcpsw_priv.c1450 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in cpsw_qos_clsflower_policer_validate()
1456 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in cpsw_qos_clsflower_policer_validate()
1457 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in cpsw_qos_clsflower_policer_validate()
1463 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in cpsw_qos_clsflower_policer_validate()
1470 if (act->police.rate_bytes_ps || act->police.peakrate_bytes_ps || in cpsw_qos_clsflower_policer_validate()
1471 act->police.avrate || act->police.overhead) { in cpsw_qos_clsflower_policer_validate()
1495 act->police.rate_pkt_ps); in cpsw_qos_configure_clsflower()
/linux-6.6.21/drivers/net/ethernet/freescale/enetc/
Denetc_qos.c1089 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in enetc_psfp_policer_validate()
1095 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in enetc_psfp_policer_validate()
1096 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in enetc_psfp_policer_validate()
1102 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in enetc_psfp_policer_validate()
1109 if (act->police.peakrate_bytes_ps || in enetc_psfp_policer_validate()
1110 act->police.avrate || act->police.overhead) { in enetc_psfp_policer_validate()
1116 if (act->police.rate_pkt_ps) { in enetc_psfp_policer_validate()
1285 if (entryp->police.burst) { in enetc_psfp_parse_clsflower()
1292 fmi->cir = entryp->police.rate_bytes_ps; in enetc_psfp_parse_clsflower()
1293 fmi->cbs = entryp->police.burst; in enetc_psfp_parse_clsflower()
[all …]
/linux-6.6.21/include/net/
Dpkt_cls.h63 int police, struct tcf_proto *tp, u32 handle, bool used_action_miss);
227 int police; member
231 int action, int police) in tcf_exts_init() argument
234 return tcf_exts_init_ex(exts, net, action, police, NULL, 0, false); in tcf_exts_init()
/linux-6.6.21/drivers/net/ethernet/microchip/sparx5/
Dsparx5_tc_flower.c727 pol->rate = div_u64(act->police.rate_bytes_ps, 1000) * 8; in sparx5_tc_flower_parse_act_police()
728 pol->burst = act->police.burst; in sparx5_tc_flower_parse_act_police()
737 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in sparx5_tc_flower_parse_act_police()
742 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in sparx5_tc_flower_parse_act_police()
743 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in sparx5_tc_flower_parse_act_police()
1144 sf.max_sdu = act->police.mtu; in sparx5_tc_flower_replace()
/linux-6.6.21/tools/testing/selftests/drivers/net/ocelot/
Dtc_flower_chains.sh175 action police rate 50mbit burst 64k conform-exceed drop/pipe \

12