|
@@ -1280,10 +1280,15 @@ int hclge_tm_prio_tc_info_update(struct hclge_dev *hdev, u8 *prio_tc)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc)
|
|
|
+int hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc)
|
|
|
{
|
|
|
u8 i, bit_map = 0;
|
|
|
|
|
|
+ for (i = 0; i < hdev->num_alloc_vport; i++) {
|
|
|
+ if (num_tc > hdev->vport[i].alloc_tqps)
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
hdev->tm_info.num_tc = num_tc;
|
|
|
|
|
|
for (i = 0; i < hdev->tm_info.num_tc; i++)
|
|
@@ -1297,6 +1302,8 @@ void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc)
|
|
|
hdev->hw_tc_map = bit_map;
|
|
|
|
|
|
hclge_tm_schd_info_init(hdev);
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
int hclge_tm_init_hw(struct hclge_dev *hdev)
|