Commit 9e5157ba authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller

net: hns3: fix for shaper not setting when TC num changes

Shaper setting does not change currently, when TC num changes,
which may cause shaper parameter not setting problem.

This patch fixes it by setting the shaper parameter when TC num
changes.

Fixes: cacde272 ("net: hns3: Add hclge_dcb module for the support of DCB feature")
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90c68a41
...@@ -162,11 +162,7 @@ static int hclge_map_update(struct hnae3_handle *h) ...@@ -162,11 +162,7 @@ static int hclge_map_update(struct hnae3_handle *h)
struct hclge_dev *hdev = vport->back; struct hclge_dev *hdev = vport->back;
int ret; int ret;
ret = hclge_tm_map_cfg(hdev); ret = hclge_tm_schd_setup_hw(hdev);
if (ret)
return ret;
ret = hclge_tm_schd_mode_hw(hdev);
if (ret) if (ret)
return ret; return ret;
......
...@@ -1005,7 +1005,7 @@ static int hclge_tm_pri_dwrr_cfg(struct hclge_dev *hdev) ...@@ -1005,7 +1005,7 @@ static int hclge_tm_pri_dwrr_cfg(struct hclge_dev *hdev)
return 0; return 0;
} }
int hclge_tm_map_cfg(struct hclge_dev *hdev) static int hclge_tm_map_cfg(struct hclge_dev *hdev)
{ {
int ret; int ret;
...@@ -1120,7 +1120,7 @@ static int hclge_tm_lvl34_schd_mode_cfg(struct hclge_dev *hdev) ...@@ -1120,7 +1120,7 @@ static int hclge_tm_lvl34_schd_mode_cfg(struct hclge_dev *hdev)
return 0; return 0;
} }
int hclge_tm_schd_mode_hw(struct hclge_dev *hdev) static int hclge_tm_schd_mode_hw(struct hclge_dev *hdev)
{ {
int ret; int ret;
...@@ -1131,7 +1131,7 @@ int hclge_tm_schd_mode_hw(struct hclge_dev *hdev) ...@@ -1131,7 +1131,7 @@ int hclge_tm_schd_mode_hw(struct hclge_dev *hdev)
return hclge_tm_lvl34_schd_mode_cfg(hdev); return hclge_tm_lvl34_schd_mode_cfg(hdev);
} }
static int hclge_tm_schd_setup_hw(struct hclge_dev *hdev) int hclge_tm_schd_setup_hw(struct hclge_dev *hdev)
{ {
int ret; int ret;
......
...@@ -144,11 +144,10 @@ struct hclge_port_shapping_cmd { ...@@ -144,11 +144,10 @@ struct hclge_port_shapping_cmd {
int hclge_tm_schd_init(struct hclge_dev *hdev); int hclge_tm_schd_init(struct hclge_dev *hdev);
int hclge_tm_vport_map_update(struct hclge_dev *hdev); int hclge_tm_vport_map_update(struct hclge_dev *hdev);
int hclge_pause_setup_hw(struct hclge_dev *hdev); int hclge_pause_setup_hw(struct hclge_dev *hdev);
int hclge_tm_schd_mode_hw(struct hclge_dev *hdev); int hclge_tm_schd_setup_hw(struct hclge_dev *hdev);
void hclge_tm_prio_tc_info_update(struct hclge_dev *hdev, u8 *prio_tc); void hclge_tm_prio_tc_info_update(struct hclge_dev *hdev, u8 *prio_tc);
void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc); void hclge_tm_schd_info_update(struct hclge_dev *hdev, u8 num_tc);
int hclge_tm_dwrr_cfg(struct hclge_dev *hdev); int hclge_tm_dwrr_cfg(struct hclge_dev *hdev);
int hclge_tm_map_cfg(struct hclge_dev *hdev);
int hclge_tm_init_hw(struct hclge_dev *hdev); int hclge_tm_init_hw(struct hclge_dev *hdev);
int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx); int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx);
int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr); int hclge_pause_addr_cfg(struct hclge_dev *hdev, const u8 *mac_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment