mirror of https://gitee.com/openkylin/linux.git
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: cacde272dd
("net: hns3: Add hclge_dcb module for the support of DCB feature")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90c68a41db
commit
9e5157ba44
|
@ -162,11 +162,7 @@ static int hclge_map_update(struct hnae3_handle *h)
|
|||
struct hclge_dev *hdev = vport->back;
|
||||
int ret;
|
||||
|
||||
ret = hclge_tm_map_cfg(hdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = hclge_tm_schd_mode_hw(hdev);
|
||||
ret = hclge_tm_schd_setup_hw(hdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -1005,7 +1005,7 @@ static int hclge_tm_pri_dwrr_cfg(struct hclge_dev *hdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int hclge_tm_map_cfg(struct hclge_dev *hdev)
|
||||
static int hclge_tm_map_cfg(struct hclge_dev *hdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ static int hclge_tm_lvl34_schd_mode_cfg(struct hclge_dev *hdev)
|
|||
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;
|
||||
|
||||
|
@ -1131,7 +1131,7 @@ int hclge_tm_schd_mode_hw(struct hclge_dev *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;
|
||||
|
||||
|
|
|
@ -144,11 +144,10 @@ struct hclge_port_shapping_cmd {
|
|||
int hclge_tm_schd_init(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_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_schd_info_update(struct hclge_dev *hdev, u8 num_tc);
|
||||
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_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);
|
||||
|
|
Loading…
Reference in New Issue