[v6,23/25] examples/qos_sched: new link status print format

Message ID 20200706203743.29416-24-i.dyukov@samsung.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: allow unknown link speed |

Checks

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

Commit Message

Ivan Dyukov July 6, 2020, 8:37 p.m. UTC
  Add usage of rte_eth_link_strf 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 --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,