Lines Matching refs:ets

12 				     struct ieee_ets *ets)
17 switch (ets->tc_tsa[i]) {
27 ets->tc_tx_bw[i];
39 hclge_tm_prio_tc_info_update(hdev, ets->prio_tc);
45 struct ieee_ets *ets)
49 memset(ets, 0, sizeof(*ets));
50 ets->willing = 1;
51 ets->ets_cap = hdev->tc_max;
54 ets->prio_tc[i] = hdev->tm_info.prio_tc[i];
56 ets->tc_tx_bw[i] = hdev->tm_info.pg_info[0].tc_dwrr[i];
58 ets->tc_tx_bw[i] = 0;
62 ets->tc_tsa[i] = IEEE_8021QAZ_TSA_STRICT;
64 ets->tc_tsa[i] = IEEE_8021QAZ_TSA_ETS;
69 static int hclge_ieee_getets(struct hnae3_handle *h, struct ieee_ets *ets)
74 hclge_tm_info_to_ieee_ets(hdev, ets);
110 static u8 hclge_ets_tc_changed(struct hclge_dev *hdev, struct ieee_ets *ets,
117 if (ets->prio_tc[i] != hdev->tm_info.prio_tc[i])
120 if (ets->prio_tc[i] > max_tc_id)
121 max_tc_id = ets->prio_tc[i];
129 struct ieee_ets *ets, bool *changed,
137 switch (ets->tc_tsa[i]) {
146 "tc%u is disabled, cannot set ets bw\n",
152 * 0, so limit ets bandwidth must be greater than 0.
154 if (!ets->tc_tx_bw[i]) {
156 "tc%u ets bw cannot be 0\n", i);
164 total_ets_bw += ets->tc_tx_bw[i];
178 static int hclge_ets_validate(struct hclge_dev *hdev, struct ieee_ets *ets,
184 tc_num = hclge_ets_tc_changed(hdev, ets, changed);
186 ret = hclge_dcb_common_validate(hdev, tc_num, ets->prio_tc);
190 ret = hclge_ets_sch_mode_validate(hdev, ets, changed, tc_num);
252 static int hclge_ieee_setets(struct hnae3_handle *h, struct ieee_ets *ets)
265 ret = hclge_ets_validate(hdev, ets, &num_tc, &map_changed);
270 netif_dbg(h, drv, netdev, "set ets\n");
280 ret = hclge_ieee_ets_to_tm_info(hdev, ets);