From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B58DAA0543; Wed, 14 Dec 2022 13:33:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2F5242D31; Wed, 14 Dec 2022 13:33:00 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 4EE0D4021D for ; Wed, 14 Dec 2022 13:32:54 +0100 (CET) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NXF9V394szFqqc; Wed, 14 Dec 2022 20:31:58 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 14 Dec 2022 20:32:52 +0800 From: Huisong Li To: CC: , , , , , , Subject: [PATCH V5 8/8] ethdev: display capability values in hexadecimal format Date: Wed, 14 Dec 2022 20:32:53 +0800 Message-ID: <20221214123253.29549-9-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20221214123253.29549-1-lihuisong@huawei.com> References: <20221208080540.62913-1-lihuisong@huawei.com> <20221214123253.29549-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Morten Brørup Acked-by: Chengwen Feng --- 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 a40d396677..3e3b7febaa 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -6068,13 +6068,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.33.0