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 E0A5CA04B5; Thu, 10 Sep 2020 21:36:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B84411C191; Thu, 10 Sep 2020 21:34:50 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 0B8A11C190 for ; Thu, 10 Sep 2020 21:34:49 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193448euoutp01de71426e5b76f0752331150a62258184~zgyVJb2L23152731527euoutp01s; Thu, 10 Sep 2020 19:34:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200910193448euoutp01de71426e5b76f0752331150a62258184~zgyVJb2L23152731527euoutp01s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766488; bh=2wNIFYHcmh4yCYEREX5OuVKRLboLxAKCyymFOQAhjOI=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=OxUjp50ZjcjBb9u6+M5P5EL7GiTvuJckPwxFkLH/4mEc5rHtw6Fh0xpwYeSIT626W rgmB5kQg91pPbnK2JywCGJ1G1wYAWyKOKC8ec10VcZJJadKrsPsVVvHszboaEEPo3H 5klHpHZteTsn2kfHQfUsZ/y5d9cX3RTuvOQPDEcI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200910193448eucas1p25a6d770323d5ba1de9a6f3c2e5b8fcc3~zgyU0LURX2394423944eucas1p2t; Thu, 10 Sep 2020 19:34:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F4.1D.06456.8DF7A5F5; Thu, 10 Sep 2020 20:34:48 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200910193447eucas1p1bd00314c0c7f7d8554c9207038017bd8~zgyUQvGws2936529365eucas1p1T; Thu, 10 Sep 2020 19:34:47 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200910193447eusmtrp1b8235781cd28a3060d61a04908ab4752~zgyUP8fb13165331653eusmtrp13; Thu, 10 Sep 2020 19:34:47 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-a2-5f5a7fd84ade Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 16.9A.06017.7DF7A5F5; Thu, 10 Sep 2020 20:34:47 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193445eusmtip25e27aa38f9c60717a362657a27f79b90~zgyShdpj41532615326eusmtip2T; Thu, 10 Sep 2020 19:34:45 +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:45 +0300 Message-Id: <20200910193400.15326-13-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: H4sIAAAAAAAAA0WSbUxTdxTGc+69vffS2eWu1HnmjGx1MxMjzrgPJ2SZzOzDzbJEk2UmEhTL vAG1IOkVN/dhdrgwLAWloGTAuirbwGKGjBZYI4ZhBFwtL1UmLmWr7qXDDRGUTR3iKLdm357n d57zkn/+Ims8xi8VdxXsU2wFFquZ13PtvfcH1owezMx++XJgMbVccgPd+KmBpWj1GE9ltz9m aNS7gc521OvI9bOdoQrXFEMdTQ6e/ooWc3RruoOhSFdQoNpwsUDTPTGBygfrgGKzN1n61HMH aNDt19H97wI8Tc6e5KjiwQjQEV8/UJ9ziqPqbzuBShwS3T7VKFBDZDlNR/s5Cl5rE+j0zDBL /ksPgSr7WoBCJY90Gc/LDzxf6uSGs+OMXHVimJV7rx0XZOdFNyO33upk5MlzI7xc4fOC/P2N MlZu/vUev1mfqX91p2LdtV+xrX1thz6vtDoiFF7Xv38o1s7aYUh0QJKI0isY87QxDtCLRqkJ MFZVK2jmLuCAZxI0cwcw5O0UHreccAV0WqERsOmfSk4zM4DRqQkunuKllzBY6l4YbJJaeeyY vcrEC8nSJvzttJONa056Ef8YrFloMEjp2F9/HLQVKdh8pns+I4pJ8/x6ZFscG6XlePXzuwsz Uboi4ojPmTjpDXQ3zSR0Mt7s8yX0MgxWOTmt4RPAyvY2QTNHAQ/VTSRSG9D354AQ38ZKq7Al sFbDr+PceRcTxyg9iaMTT8UxOy9d7TWshg1YWmLU0mbsvhhOYMSH/y7SsIyRXy4n3rcL8ELI yx6FlNr/d3kAvLBEKVLzcxV1XYHyXppqyVeLCnLT3t2b/w3Mf9bgXN90J8yEc3pAEsG8yNCd nplt1Fn2qwfyewBF1mwybAwFtxsNOy0HPlBse7NtR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QJxNdxyU0GqVkTvMcSmc4X8dRvkGZCCzZPqXuKenzGjFqfC9hw23 cs4q43fMVL/PLDENF71Qt5WUxMW7llnX+2yJGu5sME+2xRwp6Msat+5vuTNanfio3//C4mWK 7WWpK3KvPk5/uWF/v3t1x9WCCL/Ipj8L64/XFGmHdT6bZHPtRR/th05EnQ2p3b05Zue2A5Ga raVpabnFUoLXqOSrcAOv+gsMuM1JCAMAAA== X-CMS-MailID: 20200910193447eucas1p1bd00314c0c7f7d8554c9207038017bd8 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193447eucas1p1bd00314c0c7f7d8554c9207038017bd8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193447eucas1p1bd00314c0c7f7d8554c9207038017bd8 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 12/24] examples/ipsec-secgw: 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/ipsec-secgw/ipsec-secgw.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index f777ce2af..e478fe359 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1775,6 +1775,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); @@ -1794,14 +1795,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