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 E790BA00C5; Mon, 6 Jul 2020 22:41:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 007FE1DDC1; Mon, 6 Jul 2020 22:39:01 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 40BCF1DD84 for ; Mon, 6 Jul 2020 22:38:53 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706203853euoutp018674466abcef1a9bb4d72536e328ec90~fRFbgwZ631241012410euoutp01F; Mon, 6 Jul 2020 20:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706203853euoutp018674466abcef1a9bb4d72536e328ec90~fRFbgwZ631241012410euoutp01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067933; bh=XtbX4XCFxTlmDt9RDrOth1o/sdpob+sTnBAjVCFknHA=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=lcJrFNGOmTH9NjhoOvEHna7pm4sws/W9YHYr6STMl2y/cXfJ0P6Pyq0njEWaVNjHj LX65AGSXeaX03f03z6wYpWlO/YdcLKK4gjW/p+BiGf6opcJKSZ47h6+gT/JcdtOYaT 2HKRO0NaSeeOAmdl6+89afXoWCH0IIQ+bKvZgWZU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706203852eucas1p2301d29759a202a8f824540ef8b9bf1d0~fRFbHYuRx2121221212eucas1p2-; Mon, 6 Jul 2020 20:38:52 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 91.D6.06318.CDB830F5; Mon, 6 Jul 2020 21:38:52 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706203851eucas1p1aeb631663772fc95d1fa11bb1873dbe7~fRFaheo8o2656026560eucas1p1I; Mon, 6 Jul 2020 20:38:51 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706203851eusmtrp2ef39420c24985f7b7f6fa350e76158a1~fRFagtDy40640206402eusmtrp2_; Mon, 6 Jul 2020 20:38:51 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-53-5f038bdc5e17 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F6.8E.06017.BDB830F5; Mon, 6 Jul 2020 21:38:51 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706203850eusmtip1e312f2420c6eca14abe8b24eabf2b843~fRFYuOZTj1560515605eusmtip1I; Mon, 6 Jul 2020 20:38:49 +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: Mon, 6 Jul 2020 23:37:36 +0300 Message-Id: <20200706203743.29416-23-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706203743.29416-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSb0wTdxjH89xd745q9VaNPuCm0sRkMxG2aeITwkAXYy7GbHu1ROKG3TyB CIX0QATfEEQkBVGRTMVREEJgxQR0CEgKYjMELUKAOSAi64gJoaj8kepEEKlX47vv83m+z/N9 8stPZI1FfIiYYElVrBZzoonXc413X/dsG8lnY7+cPP0Z1XXbgcZGK1nyFD/mKX86h6EhRzQ5 m37XUdG/WQwVFs0w1FRj4+mpJ5uj57NNDI20ugUq6c8WaNY1LtCZ3itA4wteli6XvwDqtd/U 0es7LTxNLVRwVDj/EOhsQxdQZ8EMR8W3moFybRJN/1EtUOXIRpr1dHHkHv5ToGu+PpZudi8C ne+sA3qQu6TbFSrPl1fp5ErnBCNfuNrHyneHfxPkgnt2Rr7+vJmRp9oe8nJhgwPk+2P5rFz7 5H/+B32MPvKwkphwTLGGRx3Sx3u81pSn+uMDOTlCFvwn2iBIRGkHtrypZ2ygF41SDWBfdoWg FXOAPV3NgeIFoNP5Uvgw0jbqAK1RDZjjnOO1wgc4U/WS87t46XN059nfL14rXeexaWGQ8TfW SPvxkm14WYsiJ23Bsu5MPzZIETjgnQEtYRPW1rezfkvQMi/tCPFjo7QRB8vm3q9EqVvEkqmx gH8P1i9d0Wl6DXo7GwKXfopLt8oYTZ/AVzcGBW04D3C04lTAFI0Nkz2CP4yVvsC6lnAN78a/ naOcH6O0CoeefeLH7LIsarzIatiAeblGzW3C9nv9AYy4+GalhmUcyK/mtNdpBSx3FcM52FTy MascwAHrlTQ1KU5Rt1uU9DDVnKSmWeLCfk1OugHLP9X9ttPXDG0Lv7hAEsG00uAR2VijznxM zUhyAYqsaa3h2wfun42Gw+aMTMWaHGtNS1R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2rDFEy01igcE4QEwfC/D6Od3JORj+ppxOc/Uwe+5Idq5EkyTS7k Ly3ftm/Vt2R1edr4spW/Ttf/Nuq5RzGmvKSB85rjJZsqttf6Cm4Wt/aQPS5z173DZj3bOl/d Xjx6YZuTWUo8y3UY36btn2o5aflSHbJj/syu5qDSqhqP2nWh5r9xZWuHPDCx+GWJb5Kn1XzU TxxQEmKMVrUON4jaf0YdVtgFAwAA X-CMS-MailID: 20200706203851eucas1p1aeb631663772fc95d1fa11bb1873dbe7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706203851eucas1p1aeb631663772fc95d1fa11bb1873dbe7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706203851eucas1p1aeb631663772fc95d1fa11bb1873dbe7 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706203743.29416-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 22/25] 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_strf function to example applications Signed-off-by: Ivan Dyukov --- examples/performance-thread/l3fwd-thread/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 84c1d7b3a..bd10014a0 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[60]; printf("\nChecking link status"); fflush(stdout); @@ -3452,14 +3453,9 @@ 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_strf(link_status_text, 60, NULL, + &link); + printf("Port %d %s", portid, link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1