From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A3FB1A04AF; Tue, 11 Aug 2020 10:55:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A52D51C124; Tue, 11 Aug 2020 10:53:19 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 910641C0B1 for ; Tue, 11 Aug 2020 10:53:17 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200811085317euoutp0210d442c78a21706427ba5f15b314f60e~qKrpD1aca0724507245euoutp02Y; Tue, 11 Aug 2020 08:53:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200811085317euoutp0210d442c78a21706427ba5f15b314f60e~qKrpD1aca0724507245euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1597135997; bh=0M5Z/0O/tlUlQAEPKCdBM4aV4GGJpfe6kt6DsPfxqak=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=WIMeyVLM2SQgtkMQC4S1y1IzdaST8E5cA0o/+Eyw0kCMQbQ2djZMaxI8Z4uZI/jfp DKWuDS2P9WndHEbTlrQ8yOnIevT/6aJrVHWuh64pMTQt6V/YRzoNr8VPf9Gy+VshXN pTS45z0G60Of6FmvElf1iSU0DWyeHiN9ZEXZpks4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200811085316eucas1p175f9fdb9f730b3df78d38d83b5eb3649~qKromVoWk1187911879eucas1p1R; Tue, 11 Aug 2020 08:53:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EE.1C.05997.C7C523F5; Tue, 11 Aug 2020 09:53:16 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200811085316eucas1p255142c8a00f15cba187e92509c2196cc~qKroQid8N0326203262eucas1p2u; Tue, 11 Aug 2020 08:53:16 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200811085316eusmtrp13d7f863dee904e635eaeaa533ebddaa0~qKroPowzL1606216062eusmtrp1a; Tue, 11 Aug 2020 08:53:16 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-b3-5f325c7ce02d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id ED.4D.06017.C7C523F5; Tue, 11 Aug 2020 09:53:16 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200811085314eusmtip117df5c030f4a994420c83a40a534d1cf~qKrmek3OY1849018490eusmtip13; Tue, 11 Aug 2020 08:53:14 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, i.dyukov@samsung.com, v.kuramshin@samsung.com, thomas@monjalon.net, david.marchand@redhat.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, wei.zhao1@intel.com, jia.guo@intel.com, beilei.xing@intel.com, qiming.yang@intel.com, wenzhuo.lu@intel.com, mb@smartsharesystems.com, stephen@networkplumber.org, nicolas.chautru@intel.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, cristian.dumitrescu@intel.com, radu.nicolau@intel.com, akhil.goyal@nxp.com, declan.doherty@intel.com, skori@marvell.com, pbhagavatula@marvell.com, jerinj@marvell.com, kirankumark@marvell.com, david.hunt@intel.com, anatoly.burakov@intel.com, xiaoyun.li@intel.com, jingjing.wu@intel.com, john.mcnamara@intel.com, jasvinder.singh@intel.com, byron.marohn@intel.com, yipeng1.wang@intel.com Date: Tue, 11 Aug 2020 11:52:27 +0300 Message-Id: <20200811085246.28735-9-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811085246.28735-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSbUxTZxTHc+69vfe2sXqtZhxfG7uY6BZ1usU908W3aHLjJ/lgzJwTu3GH OiisV9w0GhEQCW8KJaAUEMEJgwlzILAOGZJAYa0iZKY62SDEpC9ooYA6sKiUi/rt9///z3nO ycnD07o8diF/yHREMpuM0QZWw9S3j99ZdWLfuoiPCrtXkRpnMZCB/8po0p/7L0vSh5Mpcr9y M2lqKFSRnL4EimTlBCjSUJHGksf9iQzxjzRQpPemgyMFPYkcGWl1cySzywrEHfTR5GLJKJCu 4hsqMn7LxpKhYClDsibuATlX1wHEnhFgSO7vjUBS0gQy/HM5R8p6l5KR/g6GOB7UcuSXp900 ueGcBJJtrwFyO+WVassycaLkJ5VY1uSlRMvlblpsf5DHiRmdxZR43d9IiUPN91gxq64SxL8G 0mmx6tH/7C7NXs3nkVL0oaOSec2mA5qDac5cVdyf6h8tIx4qATxcGqh5FD5Bb7pvijW8TqgA 7Kq4BooYA3RcG2IUMQro6hh829Li62GVoBzw1rlmlSKeArYleahQFSusQEdqMRUK5gvXWWwI uqaDecJOtPmtTIgZYTleshRAiLXCZ3jBk08rI/RY9WvLNKuFDVhl7ZtmnbAUXZfGph9F4S6P SbWumZ22Y2WRj1V4HvrsdTP+YnRYMhil4Sxgdn0tp4jzgEnWJzNVm7Fu8M4U8zwtrMQa2xrF 3or5mc8gZKMwG+8/mRuy6SnMqQ8tGrK1mJqiU6oN2NLZM2MjTr6YpdgiXvXcpZUD3QQM+Pvg POgL3s0qAaiEMClejomS5HUm6YfVsjFGjjdFrf4mNuY3mPqtjpf2sUawBb9uBYEHwyxt3Ma1 ETqV8ah8LKYVkKcN87Xbbjv267SRxmPHJXNshDk+Wp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PcVOhS8ZAgOtcVVpr 7X1enVj42KZzKhGEo/WawB0rjYfNY/HlR3a1HGlfv9Fp5sDEydQbag+vztNnf2RFJQQkPXRY 4SeYDh08XzHUtjszeP8sG9lmCQox1RS7znckOlwf8e/5srdBMbT2DriFh3k4+z65VLMuJc8z bd4gp/gIrXIjaeC1fwE0QYnjCQMAAA== X-CMS-MailID: 20200811085316eucas1p255142c8a00f15cba187e92509c2196cc X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200811085316eucas1p255142c8a00f15cba187e92509c2196cc X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200811085316eucas1p255142c8a00f15cba187e92509c2196cc References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200811085246.28735-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v9 08/24] examples/bbdev_app: new link status print format X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: i.dyukov@samsung.com List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add usage of rte_eth_link_to_str function to example applications Signed-off-by: Ivan Dyukov --- examples/bbdev_app/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 68a46050c..2eff5441a 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -313,6 +313,7 @@ check_port_link_status(uint16_t port_id) uint8_t count; struct rte_eth_link link; int link_get_err = -EINVAL; + char link_status_text[ETH_LINK_MAX_STR_LEN]; printf("\nChecking link status."); fflush(stdout); @@ -323,11 +324,9 @@ check_port_link_status(uint16_t port_id) link_get_err = rte_eth_link_get_nowait(port_id, &link); if (link_get_err >= 0 && link.link_status) { - 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); + rte_eth_link_to_str(link_status_text, + sizeof(link_status_text), NULL, &link); + printf("\nPort %u %s\n", port_id, link_status_text); return 0; } printf("."); -- 2.17.1