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 ABBDFA04B5; Thu, 10 Sep 2020 21:37:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3E15E1C1CC; Thu, 10 Sep 2020 21:35:17 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 50BAA1C0D7 for ; Thu, 10 Sep 2020 21:35:15 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193515euoutp02babe214974faf41def44e0365d96e050~zgytppBSV0499204992euoutp02e; Thu, 10 Sep 2020 19:35:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200910193515euoutp02babe214974faf41def44e0365d96e050~zgytppBSV0499204992euoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766515; bh=6qXnbzIjmvFRgAFmouzzB/qKJMLERwKTl8zUKg8Pv5k=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=MTDtdLoYhx4POzje1GiCEml60+97Y+KN9V1OPu6ukLjFe5kjpXHD7kjXiFQSQ163X PSDtijcjO3lVL6X+3koGsulCkgDYgAPM8oN96F57x+7hDm3A5PhCduGsFpLRwuVaja KU6wM0KFOHNDZvy6hGif0YdA5z9gVR0cWehyTRkM= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200910193514eucas1p27bf6910ff198693d2ef858aed2d33b1d~zgytI8FsC2625226252eucas1p2g; Thu, 10 Sep 2020 19:35:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 39.E5.05997.2FF7A5F5; Thu, 10 Sep 2020 20:35:14 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200910193513eucas1p18b7abcd3b05c1b9c7ad68c99e573b5c7~zgysl1DLW2933129331eucas1p1l; Thu, 10 Sep 2020 19:35:13 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200910193513eusmtrp231facabd0908d9e663319ad97c4616c3~zgyskY0o-1027210272eusmtrp2-; Thu, 10 Sep 2020 19:35:13 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-d4-5f5a7ff2fafe Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AC.19.06314.1FF7A5F5; Thu, 10 Sep 2020 20:35:13 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193512eusmtip202fc64d40fd682f03293185a8ad332e0~zgyqx-1iV1654016540eusmtip2L; Thu, 10 Sep 2020 19:35:11 +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: Thu, 10 Sep 2020 22:33:54 +0300 Message-Id: <20200910193400.15326-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200910193400.15326-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUxTZxTGd+69vfdS7XJXzThxilmTGWb83FxyQlDnptmNf+hispiQKKtw AyitpgU3F+OITIZVGEXiFEipEoeigsxSCn4EqlKwIIHIxAwUzTZFZy2lynAgo9ya/XfO7znP +5ycvCKrP8LPETPMWYrFbMw08FrO3TrWtTj0fVLyskv34qi2wwH08F4lS4MlAzwdCv7AUF/1 arrcUK6h4vs5DBUWDzPUcNrG09+D+zkKhBoY6r/iF6i0Z79AIe8jgQq6yoAejT9h6bhzBKjL Ua+hsZYmnp6Pn+So8FUv0E+uNiDf4WGOSho9QHk2iYJnqgSq7I+j0GAbR/67FwU696KbpfqO CSC7rxaoM29S8+n78ivnKY1ceXmIkY+c6Gbl1rtHBflwu4OR6wIeRn5+tZeXC13VIN98eIiV z/7xD/+lNkmbmKpkZuxWLEtXfa1NL6/asKt8xrcX8tfmgD3GBjEiSiuwqPE6awOtqJdOA94P /MKpTRgwb8wFajMC6Mi9JryxBGsmeFWoAhwd6Y5aXgC23XZMT/FSPPrzHUxEmC3V8dgwfoeJ CLOkjdg7elMTqTnpA7x6u2ua66QEHPizkFMj5uPZC81TW4lizBR/0L8lgvVSHN6pCE+/iVKH iDUvc6MrrcXQAYdGrWfhE58ryufiZGNF1PAjoN19UVCbIsDcsmfRqdXoenpLiKSx0odY27RU xWvwge3MNEbpbex79k4Es1NlsftnVsU6zM/Tq9MGbG7viWLEiX9nqljGumPHNOp9rgC6D04I RTC/9P8sJ0A1xCrZVlOaYv3IrHyzxGo0WbPNaUtSdpp+hamv6n/tC3ugaXybFyQRDDN1zQlJ yXqNcbd1j8kLKLKG2brPOv1b9bpU457vFMvOZEt2pmL1wnsiZ4jVfX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H/TP/4mWGTcqr17tGJ6s3mi aHtl74X4gUov7Y5x6+J8wv549mUrm+BRaD0QYq4PtAxfcbGc0W4aPSy6Bj2CO8dEiu1569ZQ uo7m025dyUtua5/P5TS8GMkyB+ZIuVLU3PE+YkzpsRewM4rHzpDsfrva+bUur1fjl5Eb2q/L lhJ8tFK+Ddfwyr/5tEVsBQMAAA== X-CMS-MailID: 20200910193513eucas1p18b7abcd3b05c1b9c7ad68c99e573b5c7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193513eucas1p18b7abcd3b05c1b9c7ad68c99e573b5c7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193513eucas1p18b7abcd3b05c1b9c7ad68c99e573b5c7 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 21/24] example/performance*: 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/performance-thread/l3fwd-thread/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 84c1d7b3a..956a1f48d 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -3433,6 +3433,7 @@ check_all_ports_link_status(uint32_t port_mask) uint8_t count, all_ports_up, print_flag = 0; struct rte_eth_link link; int ret; + char link_status_text[RTE_ETH_LINK_MAX_STR_LEN]; printf("\nChecking link status"); fflush(stdout); @@ -3452,14 +3453,10 @@ check_all_ports_link_status(uint32_t port_mask) } /* print link status if flag set */ if (print_flag == 1) { - if (link.link_status) - printf( - "Port%d Link Up. Speed %u Mbps - %s\n", - portid, link.link_speed, - (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); - else - printf("Port %d Link Down\n", portid); + rte_eth_link_to_str(link_status_text, + sizeof(link_status_text), &link); + printf("Port %d %s\n", portid, + link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1