[v8,22/24] examples/qos_sched: new link status print format
diff mbox series

Message ID 20200711104414.15422-23-i.dyukov@samsung.com
State Superseded
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: allow unknown link speed
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ivan Dyukov July 11, 2020, 10:44 a.m. UTC
Add usage of rte_eth_link_to_str function to example
applications

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
---
 examples/qos_sched/init.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 9626c15b8..4bb975fc9 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -160,14 +160,8 @@  app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_link_get: err=%d, port=%u: %s\n",
 			 ret, portid, rte_strerror(-ret));
 
-	if (link.link_status) {
-		printf(" Link Up - speed %u Mbps - %s\n",
-			(uint32_t) link.link_speed,
-			(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-			("full-duplex") : ("half-duplex"));
-	} else {
-		printf(" Link Down\n");
-	}
+	rte_eth_link_printf(NULL, &link);
+
 	ret = rte_eth_promiscuous_enable(portid);
 	if (ret != 0)
 		rte_exit(EXIT_FAILURE,