Lines Matching refs:lg
196 struct sparx5_lg *lg; in sparx5_lg_get_group_by_rate() local
200 lg = &l->leak_groups[i]; in sparx5_lg_get_group_by_rate()
201 if (rate <= lg->max_rate) { in sparx5_lg_get_group_by_rate()
390 struct sparx5_lg *lg; in sparx5_leak_groups_init() local
399 lg = &layer->leak_groups[ii]; in sparx5_leak_groups_init()
400 lg->max_rate = spx5_hsch_max_group_rate[ii]; in sparx5_leak_groups_init()
405 leak_time_us = (SPX5_SE_RATE_MAX * 1000) / lg->max_rate; in sparx5_leak_groups_init()
408 lg->leak_time = 1000 * leak_time_us; in sparx5_leak_groups_init()
411 lg->resolution = 1000 / leak_time_us; in sparx5_leak_groups_init()
416 lg->max_ses = (1000 * leak_time_us) / sys_clk_per_100ps; in sparx5_leak_groups_init()
498 struct sparx5_lg *lg; in sparx5_tc_tbf_add() local
508 lg = &layers[layer].leak_groups[group]; in sparx5_tc_tbf_add()
510 pr_debug("Found matching group (speed: %d)\n", lg->max_rate); in sparx5_tc_tbf_add()
516 sh.rate = DIV_ROUND_UP(sh.rate, lg->resolution); in sparx5_tc_tbf_add()