Lines Matching refs:lg
139 struct sparx5_lg *lg; in sparx5_lg_get_group_by_rate() local
143 lg = &l->leak_groups[i]; in sparx5_lg_get_group_by_rate()
144 if (rate <= lg->max_rate) { in sparx5_lg_get_group_by_rate()
333 struct sparx5_lg *lg; in sparx5_leak_groups_init() local
342 lg = &layer->leak_groups[ii]; in sparx5_leak_groups_init()
343 lg->max_rate = spx5_hsch_max_group_rate[ii]; in sparx5_leak_groups_init()
348 leak_time_us = (SPX5_SE_RATE_MAX * 1000) / lg->max_rate; in sparx5_leak_groups_init()
351 lg->leak_time = 1000 * leak_time_us; in sparx5_leak_groups_init()
354 lg->resolution = 1000 / leak_time_us; in sparx5_leak_groups_init()
359 lg->max_ses = (1000 * leak_time_us) / sys_clk_per_100ps; in sparx5_leak_groups_init()
435 struct sparx5_lg *lg; in sparx5_tc_tbf_add() local
445 lg = &layers[layer].leak_groups[group]; in sparx5_tc_tbf_add()
447 pr_debug("Found matching group (speed: %d)\n", lg->max_rate); in sparx5_tc_tbf_add()
453 sh.rate = DIV_ROUND_UP(sh.rate, lg->resolution); in sparx5_tc_tbf_add()