Lines Matching +full:lan966x +full:- +full:switch

1 // SPDX-License-Identifier: GPL-2.0+
15 return max_t(u32, 1, res) - 1; in lan966x_ets_hw_cost()
22 struct lan966x *lan966x = port->lan966x; in lan966x_ets_add() local
29 if (qopt->parent != TC_H_ROOT) in lan966x_ets_add()
30 return -EINVAL; in lan966x_ets_add()
32 params = &qopt->replace_params; in lan966x_ets_add()
33 if (params->bands != NUM_PRIO_QUEUES) in lan966x_ets_add()
34 return -EINVAL; in lan966x_ets_add()
36 for (i = 0; i < params->bands; ++i) { in lan966x_ets_add()
37 /* In the switch the DWRR is always on the lowest consecutive in lan966x_ets_add()
41 if (params->priomap[i] != (7 - i)) in lan966x_ets_add()
42 return -EINVAL; in lan966x_ets_add()
44 if (params->quanta[i] && params->weights[i] == 0) in lan966x_ets_add()
45 return -EINVAL; in lan966x_ets_add()
48 se_idx = SE_IDX_PORT + port->chip_port; in lan966x_ets_add()
51 for (i = 0; i < params->bands; ++i) { in lan966x_ets_add()
52 if (params->quanta[i] == 0) in lan966x_ets_add()
55 w_min = min(w_min, params->weights[i]); in lan966x_ets_add()
58 for (i = 0; i < params->bands; ++i) { in lan966x_ets_add()
59 if (params->quanta[i] == 0) in lan966x_ets_add()
64 lan_wr(lan966x_ets_hw_cost(w_min, params->weights[i]), in lan966x_ets_add()
65 lan966x, QSYS_SE_DWRR_CFG(se_idx, 7 - i)); in lan966x_ets_add()
72 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_ets_add()
80 struct lan966x *lan966x = port->lan966x; in lan966x_ets_del() local
84 se_idx = SE_IDX_PORT + port->chip_port; in lan966x_ets_del()
87 lan_wr(0, lan966x, QSYS_SE_DWRR_CFG(se_idx, i)); in lan966x_ets_del()
93 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_ets_del()