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 8748D41EAF; Thu, 16 Mar 2023 10:39:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6812A42B7E; Thu, 16 Mar 2023 10:39:15 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 85D5240FDF for ; Thu, 16 Mar 2023 10:39:14 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4PchwG2dB6z17LF8; Thu, 16 Mar 2023 17:36:14 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 16 Mar 2023 17:38:46 +0800 From: Chengwen Feng To: , , Aman Singh , Yuying Zhang CC: Subject: [PATCH v2] app/testpmd: dump private info in 'show port info' Date: Thu, 16 Mar 2023 09:32:16 +0000 Message-ID: <20230316093216.18516-1-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230314115035.33356-1-fengchengwen@huawei.com> References: <20230314115035.33356-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500024.china.huawei.com (7.185.36.10) 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 This patch adds dump private info in 'show port info [port_id]' cmd. Signed-off-by: Chengwen Feng Acked-by: Aman Singh --- v2: add identify ENOTSUP retcode according Thomas's comment. --- app/test-pmd/config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 018536f177..22b88c67b9 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -938,6 +938,13 @@ port_infos_display(portid_t port_id) printf("unknown\n"); break; } + printf("Device private info:\n"); + ret = rte_eth_dev_priv_dump(port_id, stdout); + if (ret == -ENOTSUP) + printf(" none\n"); + else if (ret < 0) + fprintf(stderr, " Failed to dump private info with error (%d): %s\n", + ret, strerror(-ret)); } void -- 2.17.1