1 Star 0 Fork 72

叶青龙/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0263-app-testpmd-display-RSS-hash-key-of-flow-rule.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
From 491333ae684b8303e019536900bb931b9f64b1ce Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 16 Mar 2023 20:58:14 +0800
Subject: app/testpmd: display RSS hash key of flow rule
[ upstream commit f958bbe2210dcc888032e81ec1326c0df5e5c518 ]
There are two ways to set RSS hash key with rte flow rule:
1. 'key_len' isn't zero and 'key' is NULL.
2. 'key_len' isn't zero and 'key' isn't NULL.
This patch adds displaying for the hash key of rte flow rule.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/config.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 873d1f1357..78af232a8a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1651,6 +1651,21 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
return;
}
+ printf(" RSS key:\n");
+ if (rss_conf->key_len == 0) {
+ printf(" none");
+ } else {
+ printf(" key_len: %u\n", rss_conf->key_len);
+ printf(" key: ");
+ if (rss_conf->key == NULL) {
+ printf("none");
+ } else {
+ for (i = 0; i < rss_conf->key_len; i++)
+ printf("%02X", rss_conf->key[i]);
+ }
+ }
+ printf("\n");
+
printf(" types:\n");
if (rss_conf->types == 0) {
printf(" none\n");
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yeqinglong01/dpdk.git
git@gitee.com:yeqinglong01/dpdk.git
yeqinglong01
dpdk
dpdk
master

搜索帮助