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 A3A0AA04B5; Thu, 10 Sep 2020 21:36:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF9B31C0CD; Thu, 10 Sep 2020 21:34:55 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 71DC21DB8 for ; Thu, 10 Sep 2020 21:34:54 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193454euoutp01034630a2f15b24c7d0e1deb157047aa7~zgyaOZksX0325703257euoutp01J; Thu, 10 Sep 2020 19:34:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200910193454euoutp01034630a2f15b24c7d0e1deb157047aa7~zgyaOZksX0325703257euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766494; bh=O0RMdSfG+AOCpq5MldeMzJL75/V6GLjvklL2HbHCXdQ=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=XmeMvuO4PtCIdpg6/ilnXJCjcORL6MPEsCHGODfGWt6xoyDE8uECkHCofY0EjLCwf Un8kci1Vdt4dE5yirkgHDZo8WTCTxrlUWtKiHcSDFBqJs/4+r+h33WQUXGbtlMQ3Rf nMERjj/ws0SgGbMTu13K9ydwWXl7gyC4BR7LWytE= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200910193453eucas1p2be15c36f4f7a247dfabee57b5d03dd6f~zgyZ5X7Da2392123921eucas1p2w; Thu, 10 Sep 2020 19:34:53 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 81.E5.05997.DDF7A5F5; Thu, 10 Sep 2020 20:34:53 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200910193453eucas1p1cccb329ab81bbe3c6c0d5ec5f6bf1ec9~zgyZhdfmp2933229332eucas1p1N; Thu, 10 Sep 2020 19:34:53 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200910193453eusmtrp1c043aa7d139aeeff56990d28a1de6f08~zgyZgph2m3165331653eusmtrp17; Thu, 10 Sep 2020 19:34:53 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-b9-5f5a7fdd26d6 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 63.19.06314.DDF7A5F5; Thu, 10 Sep 2020 20:34:53 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193451eusmtip2da5219477dc4099671ddba523f441487~zgyXvtUOr1532615326eusmtip2V; Thu, 10 Sep 2020 19:34:51 +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:47 +0300 Message-Id: <20200910193400.15326-15-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: H4sIAAAAAAAAA0WSbUxTZxTHd+69vffS0O1SWDxDprPZFpxRN+aHM7dMt+zD9cMyPxjiCA6q 3CAZRdICm4uJTISZCkyBaKSmFomD4jJ8KS/rhDCiBSwv06zBbiDMDTp0itSaCNYyyu2yb+f/ +5//Oc/z5BFZfR2fLOYVFCnmAmO+gddy7Z75kfXjBzOy3myoSqPWQTvQnduNLE3WjfN09OFh hm61bKErHac1VDNRylB1zRxDHc1Wnv6ZPMTRg2AHQ2NdXoHqbx4SKNgbEKhqxAYUCN9l6ZTj EdCIvU1D8z+7eZoNn+WoesEH9K2rH6ivco6juh87gSqsEj10NgnUOLaKgpP9HHn9lwX6/vEN ltoGnwEd72sFGqpY1GxdIy84zmnkxiszjFzbcIOVPf4Tglw5YGfkiw86GXm228fL1a4WkK/f OcrK5/96wm/XZmjfy1Hy80oU88b3s7V7vyu7yhZ2ab8cOTHIl8Il0QpxIkqbcPHen6wVtKJe agacODcoqCIE6Jg6HXMeATr7/YwVxOVIsGGnypsAT4bcnCoeAx7+7RpE5/JSKnqP2JmokSRd 5LEjPMpEjUTpExx3BoRozUmv4YL7p2WukzZjxdc+Vj3Uajx/oYeNbotb4n+M7YpivbQKR8+E lmei9IuIP/imBLX/I4xUeWLZRLzb54rxFPTWVnJq4BvA4+2XBVUcAyyz3Y91bUHXvWEhuo2V 1mKre6OKP8B5f4BTr/w83rqfEMXsUlnTfpJVsQ6PVOjVbgP2DNyMYcRnT+NVLOPAXFvsEbsA py40ccdgdf3/uxwALbBCKbaYchVLWoHyxQaL0WQpLsjdsGef6RIs/VVvpC/UCe7w7l6QRDDE 63o2Z2TpNcYSy35TL6D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3SO/8n wajhA/kgCOaD/IP8FwE7TZFOV21T0jFao7hTFBNFw/8+jHJXpaA0vqBIbW6Oomu+zfPlAjfP KmldmxbeU/gmO9LBvsubVNEWr1FV3tk0bWXk6iy30ume7H5f88CcpDt++3eqrHsUR8KLQrec jaUdPg3BO4YXj6d2lrsNhaVcmX/A2rHOd43hUW7WmgWmXR+sh2rEig3n072/vlcfbXVw4aMP 9xU/XeXHElKslvfFDZL2LwWsFssHAwAA X-CMS-MailID: 20200910193453eucas1p1cccb329ab81bbe3c6c0d5ec5f6bf1ec9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193453eucas1p1cccb329ab81bbe3c6c0d5ec5f6bf1ec9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193453eucas1p1cccb329ab81bbe3c6c0d5ec5f6bf1ec9 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 14/24] examples/l2fwd-crypt: 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/l2fwd-crypto/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 827da9b3e..820470db5 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -1734,6 +1734,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); @@ -1753,14 +1754,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