1 Star 0 Fork 76

chenjiji09/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0288-net-hns3-fix-never-set-MAC-flow-control.patch 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
From 68c936210f151e6359bb770026a2d6b7a3bed43a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 22 May 2023 21:17:36 +0800
Subject: net/hns3: fix never set MAC flow control
[ upstream commit 73b4f0011f09c5a57776c9f4edaf2d88a3065053 ]
When some hardware and firmware support speed auto-negotiation
but do not support flow control auto-negotiation, driver can
never successfully set MAC flow control by flow_ctrl_set() API.
So only tell user driver doesn't support flow control autoneg
when user enable it.
Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 12e7a72c36..e01d5f76db 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5304,16 +5304,7 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
if (!pf->support_fc_autoneg) {
if (autoneg != 0) {
- hns3_err(hw, "unsupported fc auto-negotiation setting.");
- return -EOPNOTSUPP;
- }
-
- /*
- * Flow control auto-negotiation of the NIC is not supported,
- * but other auto-negotiation features may be supported.
- */
- if (autoneg != hw->mac.link_autoneg) {
- hns3_err(hw, "please use 'link_speeds' in struct rte_eth_conf to disable autoneg!");
+ hns3_err(hw, "unsupported fc auto-negotiation.");
return -EOPNOTSUPP;
}
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenjiji09/dpdk.git
git@gitee.com:chenjiji09/dpdk.git
chenjiji09
dpdk
dpdk
master

搜索帮助