20 Star 0 Fork 76

openEuler-RISC-V/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0245-net-hns3-separate-setting-hash-key.patch 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
From 8ca08cd0671207b57d934b439d7b245966fbbfe8 Mon Sep 17 00:00:00 2001
From: Huisong Li <[email protected]>
Date: Fri, 10 Mar 2023 17:35:09 +0800
Subject: net/hns3: separate setting hash key
[ upstream commit fe9cc8b88babd0911d91dc194b35c7c352e2bf7b ]
The settings of hash key comes from the ethdev ops (like, dev_configure
and rss_hash_update) and rte_flow API. For the ethdev ops, driver has
to save it to rss_info::key in hns3_hw structure so as to it can be
restored when reset is triggered. While rte_flow API no need to use
this field to save, they has a global flow_rss_list to maintain all
rules which save hash key. And hash key can be restored by this rule
information during the reset phase.
Signed-off-by: Huisong Li <[email protected]>
Signed-off-by: Dongdong Liu <[email protected]>
---
drivers/net/hns3/hns3_rss.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index dcd42b554a..401e3adfdf 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -376,8 +376,7 @@ hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
return ret;
}
}
- /* Update the shadow RSS key with user specified */
- memcpy(hw->rss_info.key, key, hw->rss_key_size);
+
return 0;
}
@@ -672,6 +671,8 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
key, hw->rss_key_size);
if (ret)
goto set_algo_key_fail;
+ /* Update the shadow RSS key with user specified */
+ memcpy(hw->rss_info.key, key, hw->rss_key_size);
}
rte_spinlock_unlock(&hw->lock);
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/dpdk.git
[email protected]:openeuler-risc-v/dpdk.git
openeuler-risc-v
dpdk
dpdk
master

搜索帮助