[v10,08/24] examples/bbdev_app: new link status print format

Message ID 20200910193400.15326-9-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

Commit Message

Ivan Dyukov Sept. 10, 2020, 7:33 p.m. UTC
  Add usage of rte_eth_link_to_str function to example
applications

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

Patch

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(".");