提交 5d4d17a6 编写于 作者: G Guangbin Huang 提交者: Zheng Zengkai

net: hns3: don't config TM DWRR twice when set ETS

mainline inclusion
from mainline-v5.15-rc1
commit 7f2f8cf6
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4BY3P
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7f2f8cf6ef668c1c745e229023f98663f47aa702

----------------------------------------------------------------------

The function hclge_tm_dwrr_cfg() will be called twice in function
hclge_ieee_setets() when map_changed is true, the calling flow is
hclge_ieee_setets()
    hclge_map_update()
    |   hclge_tm_schd_setup_hw()
    |       hclge_tm_dwrr_cfg()
    hclge_notify_init_up()
    hclge_tm_dwrr_cfg()

It is no need to call hclge_tm_dwrr_cfg() twice actually, so just
return after calling hclge_notify_init_up().
Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 4396d0b6
...@@ -234,9 +234,7 @@ static int hclge_ieee_setets(struct hnae3_handle *h, struct ieee_ets *ets) ...@@ -234,9 +234,7 @@ static int hclge_ieee_setets(struct hnae3_handle *h, struct ieee_ets *ets)
if (ret) if (ret)
goto err_out; goto err_out;
ret = hclge_notify_init_up(hdev); return hclge_notify_init_up(hdev);
if (ret)
return ret;
} }
return hclge_tm_dwrr_cfg(hdev); return hclge_tm_dwrr_cfg(hdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册