Home
last modified time | relevance | path

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

12

/linux-6.1.9/net/sched/
Dact_police.c48 struct tcf_police *police; in tcf_police_init() local
97 police = to_police(*a); in tcf_police_init()
113 err = gen_replace_estimator(&police->tcf_bstats, in tcf_police_init()
114 police->common.cpu_bstats, in tcf_police_init()
115 &police->tcf_rate_est, in tcf_police_init()
116 &police->tcf_lock, in tcf_police_init()
122 !gen_estimator_active(&police->tcf_rate_est))) { in tcf_police_init()
201 spin_lock_bh(&police->tcf_lock); in tcf_police_init()
202 spin_lock_bh(&police->tcfp_lock); in tcf_police_init()
203 police->tcfp_t_c = ktime_get_ns(); in tcf_police_init()
[all …]
Dact_api.c1301 struct tc_action_ops *tc_action_load_ops(struct nlattr *nla, bool police, in tc_action_load_ops() argument
1311 if (!police) { in tc_action_load_ops()
1367 bool police = flags & TCA_ACT_FLAGS_POLICE; in tcf_action_init_1() local
1376 if (!police) { in tcf_action_init_1()
1408 if (!police && tb[TCA_ACT_COOKIE]) in tcf_action_init_1()
1411 if (!police) in tcf_action_init_1()
Dcls_api.c3057 if (exts->police && tb[exts->police]) { in tcf_exts_validate_ex()
3060 a_o = tc_action_load_ops(tb[exts->police], true, in tcf_exts_validate_ex()
3066 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate_ex()
3092 (exts->police && tb[exts->police])) { in tcf_exts_validate_ex()
3152 } else if (exts->police) { in tcf_exts_dump()
3154 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
/linux-6.1.9/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.1.9/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.1.9/drivers/net/ethernet/microchip/lan966x/
Dlan966x_police.c81 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in lan966x_police_validate()
87 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in lan966x_police_validate()
88 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in lan966x_police_validate()
94 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in lan966x_police_validate()
101 if (act->police.peakrate_bytes_ps || in lan966x_police_validate()
102 act->police.avrate || act->police.overhead) { in lan966x_police_validate()
108 if (act->police.rate_pkt_ps) { in lan966x_police_validate()
155 pol.rate = div_u64(act->police.rate_bytes_ps, 1000) * 8; in lan966x_police_port_add()
156 pol.burst = act->police.burst; in lan966x_police_port_add()
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/
Dpolice.c13 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in tc_act_can_offload_police()
14 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in tc_act_can_offload_police()
31 if (act->police.rate_bytes_ps) { in fill_meter_params_from_act()
34 params->rate = act->police.rate_bytes_ps << 3; in fill_meter_params_from_act()
35 params->burst = act->police.burst; in fill_meter_params_from_act()
36 } else if (act->police.rate_pkt_ps) { in fill_meter_params_from_act()
38 params->rate = act->police.rate_pkt_ps; in fill_meter_params_from_act()
39 params->burst = act->police.burst_pkt; in fill_meter_params_from_act()
/linux-6.1.9/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.1.9/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.1.9/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.1.9/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_tc.c231 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in otx2_policer_validate()
237 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in otx2_policer_validate()
238 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in otx2_policer_validate()
244 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in otx2_policer_validate()
251 if (act->police.peakrate_bytes_ps || in otx2_policer_validate()
252 act->police.avrate || act->police.overhead) { in otx2_policer_validate()
287 if (entry->police.rate_pkt_ps) { in otx2_tc_egress_matchall_install()
292 rate = entry->police.rate_bytes_ps * 8; in otx2_tc_egress_matchall_install()
294 err = otx2_set_matchall_egress_rate(nic, entry->police.burst, rate); in otx2_tc_egress_matchall_install()
435 if (act->police.rate_bytes_ps > 0) { in otx2_tc_parse_actions()
[all …]
/linux-6.1.9/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.1.9/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.1.9/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.1.9/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()
243 burst = roundup_pow_of_two(act->police.burst); in mlxsw_sp_flower_parse_actions()
246 act->police.rate_bytes_ps, in mlxsw_sp_flower_parse_actions()
/linux-6.1.9/drivers/net/ethernet/ti/
Dam65-cpsw-qos.c650 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in am65_cpsw_qos_clsflower_policer_validate()
656 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in am65_cpsw_qos_clsflower_policer_validate()
657 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in am65_cpsw_qos_clsflower_policer_validate()
663 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in am65_cpsw_qos_clsflower_policer_validate()
670 if (act->police.rate_bytes_ps || act->police.peakrate_bytes_ps || in am65_cpsw_qos_clsflower_policer_validate()
671 act->police.avrate || act->police.overhead) { in am65_cpsw_qos_clsflower_policer_validate()
696 act->police.rate_pkt_ps); in am65_cpsw_qos_configure_clsflower()
Dcpsw_priv.c1449 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in cpsw_qos_clsflower_policer_validate()
1455 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in cpsw_qos_clsflower_policer_validate()
1456 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in cpsw_qos_clsflower_policer_validate()
1462 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in cpsw_qos_clsflower_policer_validate()
1469 if (act->police.rate_bytes_ps || act->police.peakrate_bytes_ps || in cpsw_qos_clsflower_policer_validate()
1470 act->police.avrate || act->police.overhead) { in cpsw_qos_clsflower_policer_validate()
1494 act->police.rate_pkt_ps); in cpsw_qos_configure_clsflower()
/linux-6.1.9/drivers/net/ethernet/freescale/enetc/
Denetc_qos.c1032 if (act->police.exceed.act_id != FLOW_ACTION_DROP) { in enetc_psfp_policer_validate()
1038 if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && in enetc_psfp_policer_validate()
1039 act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { in enetc_psfp_policer_validate()
1045 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && in enetc_psfp_policer_validate()
1052 if (act->police.peakrate_bytes_ps || in enetc_psfp_policer_validate()
1053 act->police.avrate || act->police.overhead) { in enetc_psfp_policer_validate()
1059 if (act->police.rate_pkt_ps) { in enetc_psfp_policer_validate()
1228 if (entryp->police.burst) { in enetc_psfp_parse_clsflower()
1235 fmi->cir = entryp->police.rate_bytes_ps; in enetc_psfp_parse_clsflower()
1236 fmi->cbs = entryp->police.burst; in enetc_psfp_parse_clsflower()
[all …]
/linux-6.1.9/include/net/
Dpkt_cls.h237 int police; member
241 int action, int police) in tcf_exts_init() argument
256 exts->police = police; in tcf_exts_init()
/linux-6.1.9/tools/testing/selftests/drivers/net/ocelot/
Dtc_flower_chains.sh175 action police rate 50mbit burst 64k conform-exceed drop/pipe \
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/
DMakefile58 en/tc/act/redirect_ingress.o en/tc/act/police.o

12