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 8034AA0528; Sat, 11 Jul 2020 12:46:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00C4B1DA35; Sat, 11 Jul 2020 12:45:07 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 5135F1D9E0 for ; Sat, 11 Jul 2020 12:45:06 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104506euoutp01ead8d383e392ae3f296236265f6bc2aa~grNatS-UE0814408144euoutp01f; Sat, 11 Jul 2020 10:45:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200711104506euoutp01ead8d383e392ae3f296236265f6bc2aa~grNatS-UE0814408144euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464306; bh=AzTeM//HE10jA1C7ap6zAc35J8f1upFdUWdBJzKIaDA=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=BzNoO/oeSCqoN9ffkOCGXsR+eOoBsHAgjYV9i+MW9m+Ki2X8FgKKpjm3LWGLv73Zy yeO2PoVGH0FeoCpihlTlFYnzvvfE/IgXyN0NzBIodUUhUvsGF188oZq/iy0uouOI7j p81PV0pus6/ds5CyJ2BIpFnVsAC4OrOaiA/DEfNE= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200711104505eucas1p2140320bb679767dda9a8bb84b50c221d~grNaW0bPr2342023420eucas1p2L; Sat, 11 Jul 2020 10:45:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EF.1F.05997.138990F5; Sat, 11 Jul 2020 11:45:05 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200711104504eucas1p1b40755fcc466660a58782714025acb19~grNZY73Ki0930809308eucas1p1v; Sat, 11 Jul 2020 10:45:04 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200711104504eusmtrp208ddeb1034b8eed2bcb2b0ed6e6399fe~grNZYE36B1628816288eusmtrp2W; Sat, 11 Jul 2020 10:45:04 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-59-5f099831f72b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 39.17.06314.038990F5; Sat, 11 Jul 2020 11:45:04 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104502eusmtip1feb656c4c6fb69b4f7ac8ce4c8f8fd89~grNXmTlQH1304313043eusmtip1l; Sat, 11 Jul 2020 10:45:02 +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: Sat, 11 Jul 2020 13:44:01 +0300 Message-Id: <20200711104414.15422-15-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200711104414.15422-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa1BMYRjH5z3n7NnTshwbeiYmY13GNbc+PCPjNsycwbh8YTDJ0lFGW+x2 UXyohjSL1GqKlUoNXTCpNrubNCxKtouiqajEGLm2dHEttJ2Mb7/3/3/+z/+dd16OViWzntz+ kDBRF6IJVrMK5mblj7r5i865+S9Mfz4dC2syCL7qyKGxM6WdxZOfj1HYUrACyy3pMjS+iKEw 0fiFQkuegcWPnXEMdvdYKGy77ZCjqTFOjj32Ljmerr9AsGvgPY3ns3oJ1meUyvDH3TIWnQPZ DCb+bCJ4xvyQYNWpLwym2KwE4w08fs7PlWNOmxf2dD5k0NFaIsdr/Q00ltYMEkyuKiRYG/9H tnKq8DPrskzIKX9HCWcvNdBCZWuqXDhVnUEJRd1WSnBWNLFCormACI9enaSFq6+/s5sVOxTL AsTg/RGibsHy3YqgjqcrDyYrDt/r6qBiSDxnIG4c8D7wpNLCGoiCU/F5BIoaqlmXoeL7CFgL 9kjcS8CWF/ovUP/ryUggl0B3Sj6RDv0EHNYztGuK5WeBIyGDchnj+SIWLAPNlMtw5zeA05nP uJjhZ0DcA/twnZJfCvcsZ+VSxRS4euPO8CK3IX3Q+ZiWruEFzZl9w0uBr+HA0nSLSIE1YHL0 0RK7w/sq88iiyfDHlklJfAS+FTfLpXACgY7s4yNDK8D8oW6IOY7mZ0Nh2QJJXgXlmQbGJQM/ Blo+jXPJ9BAab6bRkqyEhHiVNK2GO9WNIzLA4K/REgqQl7pOep7bBI431LBJZIrpf1UWIQXE QwzXawNF/eIQMdJbr9Hqw0MCvfeGaovJ0Ed1/K7qs5KygT12wnNEPVqZpeH8VTJNhD5KayfA 0erxytW1jl0qZYAmKlrUhfrrwoN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4VxT3iab/OYJR+FmRr0a58M6seYcWRYxV3xCaHeZU d1fSecNDtaupNmlB7trM4W2Xda/L62O2PsyeV/uioi9grv+a6xua3s9EjdmBbw/0zPCdKmT8 CMvLONpmSV98uGiautRgqJkVDc0e+RZPT+R8bLV/aR4p4SrXa12ju9p+5r/alD/0oficJ3mg X3FfQ0mxAreQNEnCX5AvigUIAwAA X-CMS-MailID: 20200711104504eucas1p1b40755fcc466660a58782714025acb19 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104504eucas1p1b40755fcc466660a58782714025acb19 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104504eucas1p1b40755fcc466660a58782714025acb19 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 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 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 827da9b3e..cdb4f18ab 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[60]; printf("\nChecking link status"); fflush(stdout); @@ -1753,14 +1754,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_to_str(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