1 Star 0 Fork 76

叶青龙/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0276-ethdev-get-capabilities-from-telemetry-in-hexadecima.patch 2.19 KB
一键复制 编辑 原始数据 按行查看 历史
From baa8bc0cc5736e2804e53c09b6cadf193993ce45 Mon Sep 17 00:00:00 2001
From: Huisong Li <[email protected]>
Date: Mon, 19 Dec 2022 15:06:48 +0800
Subject: ethdev: get capabilities from telemetry in hexadecimal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 796b031608d8d52e040f83304c676d3cda5af617 ]
The 'dev_flags', 'rx_offloads', 'tx_offloads' and 'rss_hf' are better
displayed in hexadecimal format.
Like:
--> old display by input /ethdev/info,0
"dev_flags": 3,
"rx_offloads": 524288,
"tx_offloads": 65536,
"ethdev_rss_hf": 9100
--> new display
"dev_flags": "0x3",
"rx_offloads": "0x80000",
"tx_offloads": "0x10000",
"ethdev_rss_hf": "0x238c"
Signed-off-by: Huisong Li <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
---
lib/ethdev/rte_ethdev.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index c216091e79..4e5499ad2d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6428,13 +6428,14 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_container(d, "rxq_state", rxq_state, 0);
rte_tel_data_add_dict_container(d, "txq_state", txq_state, 0);
rte_tel_data_add_dict_int(d, "numa_node", eth_dev->data->numa_node);
- rte_tel_data_add_dict_u64(d, "dev_flags", eth_dev->data->dev_flags);
- rte_tel_data_add_dict_u64(d, "rx_offloads",
- eth_dev->data->dev_conf.rxmode.offloads);
- rte_tel_data_add_dict_u64(d, "tx_offloads",
- eth_dev->data->dev_conf.txmode.offloads);
- rte_tel_data_add_dict_u64(d, "ethdev_rss_hf",
- eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf);
+ rte_tel_data_add_dict_uint_hex(d, "dev_flags",
+ eth_dev->data->dev_flags, 0);
+ rte_tel_data_add_dict_uint_hex(d, "rx_offloads",
+ eth_dev->data->dev_conf.rxmode.offloads, 0);
+ rte_tel_data_add_dict_uint_hex(d, "tx_offloads",
+ eth_dev->data->dev_conf.txmode.offloads, 0);
+ rte_tel_data_add_dict_uint_hex(d, "ethdev_rss_hf",
+ eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf, 0);
return 0;
}
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yeqinglong01/dpdk.git
[email protected]:yeqinglong01/dpdk.git
yeqinglong01
dpdk
dpdk
master

搜索帮助