From 9f1acbbbe8050c3b8794d45a4af610f9e0774211 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 16 Mar 2023 09:32:16 +0000
Subject: app/testpmd: show private info in port info

[ upstream commit d0aa6cd7a43d737797ba139a7f18b879cc44dac3 ]

This patch adds dump private info in 'show port info [port_id]' cmd.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 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 12386c4d82..873d1f1357 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -891,6 +891,13 @@ port_infos_display(portid_t port_id)
 			printf("Switch Rx domain: %u\n",
 			       dev_info.switch_info.rx_domain);
 	}
+	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.23.0

