[dpdk-dev] [PATCH v11 08/24] examples/bbdev_app: new link status print format

Ivan Dyukov i.dyukov at samsung.com
Tue Sep 15 21:07:03 CEST 2020


Add usage of rte_eth_link_to_str function to example
applications

Signed-off-by: Ivan Dyukov <i.dyukov at samsung.com>
---
 examples/bbdev_app/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 68a46050c..fe9d8e0a5 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -326,8 +326,10 @@ check_port_link_status(uint16_t port_id)
 			const char *dp = (link.link_duplex ==
 				ETH_LINK_FULL_DUPLEX) ?
 				"full-duplex" : "half-duplex";
-			printf("\nPort %u Link Up - speed %u Mbps - %s\n",
-				port_id, link.link_speed, dp);
+			printf("\nPort %u Link Up - speed %s Mbps - %s\n",
+				port_id,
+				rte_eth_link_speed_to_str(link.link_speed),
+				dp);
 			return 0;
 		}
 		printf(".");
-- 
2.17.1



More information about the dev mailing list