[V2,11/11] ethdev: display capability values in hexadecimal format
Checks
Commit Message
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
--> now display
"dev_flags": "0x3",
"rx_offloads": "0x80000",
"tx_offloads": "0x10000",
"ethdev_rss_hf": "0x238c"
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
lib/ethdev/rte_ethdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
@@ -6068,12 +6068,13 @@ 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_u32(d, "dev_flags", eth_dev->data->dev_flags);
- rte_tel_data_add_dict_u64(d, "rx_offloads",
+ rte_tel_data_add_dict_hex_u32_str(d, "dev_flags",
+ eth_dev->data->dev_flags);
+ rte_tel_data_add_dict_hex_u64_str(d, "rx_offloads",
eth_dev->data->dev_conf.rxmode.offloads);
- rte_tel_data_add_dict_u64(d, "tx_offloads",
+ rte_tel_data_add_dict_hex_u64_str(d, "tx_offloads",
eth_dev->data->dev_conf.txmode.offloads);
- rte_tel_data_add_dict_u64(d, "ethdev_rss_hf",
+ rte_tel_data_add_dict_hex_u64_str(d, "ethdev_rss_hf",
eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf);
return 0;