1 Star 0 Fork 76

baoxfusion/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0033-net-hns3-enable-PFC-for-all-user-priorities.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-03-22 17:48 . sync some patch from upstreaming
From e74722646fa7b51d82812be26e8ae24a5010f9da Mon Sep 17 00:00:00 2001
From: Jie Hai <[email protected]>
Date: Wed, 6 Mar 2024 17:20:47 +0800
Subject: [PATCH 31/33] net/hns3: enable PFC for all user priorities
[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]
When user set TC number to 4 and enable PFC and ETS by dev_configure,
driver only enable user priority 0-3.
The packet with user priority 4-7 cannot trigger PFC frame.
Fix by enabling PFC for all user priorities.
By the way, the nb_tcs from user can never be 0 because of the ahead
check in driver. So remove this redundant code.
Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
Signed-off-by: Jie Hai <[email protected]>
---
drivers/net/hns3/hns3_dcb.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 2831d3d..915e4eb 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1499,7 +1499,6 @@ hns3_dcb_info_update(struct hns3_adapter *hns, uint8_t num_tc)
static int
hns3_dcb_hw_configure(struct hns3_adapter *hns)
{
- struct rte_eth_dcb_rx_conf *dcb_rx_conf;
struct hns3_pf *pf = &hns->pf;
struct hns3_hw *hw = &hns->hw;
enum hns3_fc_status fc_status = hw->current_fc_status;
@@ -1519,12 +1518,8 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
}
if (hw->data->dev_conf.dcb_capability_en & RTE_ETH_DCB_PFC_SUPPORT) {
- dcb_rx_conf = &hw->data->dev_conf.rx_adv_conf.dcb_rx_conf;
- if (dcb_rx_conf->nb_tcs == 0)
- hw->dcb_info.pfc_en = 1; /* tc0 only */
- else
- hw->dcb_info.pfc_en =
- RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
+ hw->dcb_info.pfc_en =
+ RTE_LEN2MASK((uint8_t)HNS3_MAX_USER_PRIO, uint8_t);
hw->dcb_info.hw_pfc_map =
hns3_dcb_undrop_tc_map(hw, hw->dcb_info.pfc_en);
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/baoxfusion/dpdk.git
[email protected]:baoxfusion/dpdk.git
baoxfusion
dpdk
dpdk
master

搜索帮助