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 3C8EAA04C7; Tue, 15 Sep 2020 21:11:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 801861C11C; Tue, 15 Sep 2020 21:08:41 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 525E11C0DB for ; Tue, 15 Sep 2020 21:08:40 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200915190840euoutp0115cf836c07170f83070f71647c0a23b1~1Cp7j_CJu0530105301euoutp01e; Tue, 15 Sep 2020 19:08:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200915190840euoutp0115cf836c07170f83070f71647c0a23b1~1Cp7j_CJu0530105301euoutp01e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600196920; bh=6qXnbzIjmvFRgAFmouzzB/qKJMLERwKTl8zUKg8Pv5k=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=eT7gGvZPoCyaWX/Ma8LW7h/3JpXz+tCOZrcdnsj6EOmo68h55qglwDIChu025vuuQ tsIMWvhNfYP4f/SMZtuGOCiZgAIzEfPjRFinkShd+1iKXBnXydmAY9Vxkr3NlEUqzi 2dDRuHawYIychsLp/j6CrvKiiHK23yCGD3Ppmi/w= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200915190839eucas1p2b54b2475087d6270e4217facc63b5210~1Cp6yOkSp1703717037eucas1p2i; Tue, 15 Sep 2020 19:08:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 2D.56.06318.731116F5; Tue, 15 Sep 2020 20:08:39 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200915190838eucas1p1adaabef8ead06d5220e3091a94dedf37~1Cp6dWV4S0047600476eucas1p1k; Tue, 15 Sep 2020 19:08:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915190838eusmtrp1e937cb75fcfd1cf08e6d9116d7096398~1Cp6chCq43148631486eusmtrp1s; Tue, 15 Sep 2020 19:08:38 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-a6-5f6111379c03 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 99.FB.06314.631116F5; Tue, 15 Sep 2020 20:08:38 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915190837eusmtip21af50c51d2a69bdc42b661dcb70d0264~1Cp4ueyHl1759817598eusmtip2R; Tue, 15 Sep 2020 19:08:37 +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, 15 Sep 2020 22:07:16 +0300 Message-Id: <20200915190728.18143-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915190728.18143-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTcRjG+Z9zds7ZanVahi8VVoOgguwKvXQvIk596PJFLCpbdbKL09jS bgR2M1mmuUQrxzIlZrow23Rq2kVqm25mSaOsLLtAZVmpGWnTch6jb8/ze5/nfeHPn6c1ZnYs vzt+v2SI18VpWRVT7u5pnD5vlC5m5on+kVjitxJ8+6qAxtasFhbPfD9J4bOiJVjtsijQ/DqZ wnRzB4WuQhOLX1qPM/i100Xhyxofh5eajnPYWfuBw7ONuQQ/BNtovJjXRbDRWqbAnntVLH4L 5jOY3hsgmOH0EvSkdTCYVVlBMMUk4PdrNg4LXkZgZ6uXQV+zg0N792May/x9BDM9JQQbUv4o lk4Se/OuKsSC6k+UeP7KY1p0N2dzYlqdlRJLv1ZQ4rfbAVZMdxYRsf7tGVosfv+LXafaqFq4 Q4rbnSQZZizeqtplsa3ZZxl28EbqimSSqTQRJQ/CXMjOzmFMRMVrhEICGR3JlGx+EGi4cozI pouAN7+A+lfxZJTR8sBGoKOxZch0E/BlWRWhFCtMAV+qdXBXmFDKgiv4dLA+WlgLp7zX2JBm hMkQqPQPcJ5XC/Mh/+cY+cIEKL5xlw5p5QBuqgxwIa0RIuDp5R+DO0Hw81DpLmZDXRBWgNe8 SO6OhjaPk5P1ePCdT2Pk/GkCmeUOTjbnCJzIbR9KLQHn54dcaBEtTIWSqhkyXgZvqp5z8v4R 8Kx9VAjTA9JcnkPLWA2pKRo5rYW7dU1DGKDv93AZi/C5zTH0iDUEbvW6FefIhEv/b+URUkTC pUSjPlYyzomXDkQadXpjYnxs5PYE/U0y8FN9/Z7uCnI7uK2WCDzRDlfnvdgao1HokoyH9LUE eFobpl7e4NuiUe/QHTosG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m+4+K6UTVTr+As+n8dr/fRjl4pOBRIPPNjRXdPmfKIsqsmeVGgeW E/ya9UcLZkwB8Ts7S6MzYyTkgeOKvD+z3sWH6SiF67XYtpVFuzb7bJfp1tHlg+mdN4tDsJgc +5O76dsDS158OnXI8vPpyVHRpLt7pjGgPSpyDTU2QM2VzbXR22aOuJnNmW+8PlJXzewP+3zZ rwoZISSp2B24VlD9BUKydEYGAwAA X-CMS-MailID: 20200915190838eucas1p1adaabef8ead06d5220e3091a94dedf37 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200915190838eucas1p1adaabef8ead06d5220e3091a94dedf37 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915190838eucas1p1adaabef8ead06d5220e3091a94dedf37 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200915190728.18143-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 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