Lines Matching refs:pol
19 struct lan966x_tc_policer *pol, in lan966x_police_add() argument
25 pol->rate = DIV_ROUND_UP(pol->rate * 3, 100); in lan966x_police_add()
27 pol->burst = pol->burst ?: 1; in lan966x_police_add()
29 pol->burst = DIV_ROUND_UP(pol->burst, 4096); in lan966x_police_add()
31 if (pol->rate > GENMASK(15, 0) || in lan966x_police_add()
32 pol->burst > GENMASK(6, 0)) in lan966x_police_add()
45 lan_wr(ANA_POL_PIR_CFG_PIR_RATE_SET(pol->rate) | in lan966x_police_add()
46 ANA_POL_PIR_CFG_PIR_BURST_SET(pol->burst), in lan966x_police_add()
141 struct lan966x_tc_policer pol; in lan966x_police_port_add() local
150 memset(&pol, 0, sizeof(pol)); in lan966x_police_port_add()
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()
155 err = lan966x_police_add(port, &pol, POL_IDX_PORT + port->chip_port); in lan966x_police_port_add()