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 DDF9CA0528; Sat, 11 Jul 2020 12:46:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 162281DA63; Sat, 11 Jul 2020 12:45:01 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id C865B1DA5F for ; Sat, 11 Jul 2020 12:44:59 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104459euoutp017469f32e91d18c9421996d05eee0877e~grNUoqbHx0814708147euoutp01X; Sat, 11 Jul 2020 10:44:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200711104459euoutp017469f32e91d18c9421996d05eee0877e~grNUoqbHx0814708147euoutp01X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464299; bh=bHXcIc3rVA86PY8Cp4TbQNC86tRauFvjduaiZR2Y8o8=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=FQ7KKlyfoT+Azo5Qzrf94Uqb3eTVPu+nqZU269CZhDun18OKmKLRy2SlHi2B7Ikfg lF8D8CL9c6QmnMKGa28bcKqkah85AsHZm8+zNUKCTa3Owj4DAy0NVvy9UWC3dCkVxF 9pfbwUD2oC2/TNiqX9ORzn51K+8HgFsxUxMmq+BI= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200711104459eucas1p101b08cf831f0b7ea39a261e0de4b07ed~grNUXiSfn1558215582eucas1p1n; Sat, 11 Jul 2020 10:44:59 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 56.87.06318.B28990F5; Sat, 11 Jul 2020 11:44:59 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200711104458eucas1p103bc1f711ed17c9007c7ef9afa11738f~grNUCKKDb1567615676eucas1p1k; Sat, 11 Jul 2020 10:44:58 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200711104458eusmtrp261b6e31a3edc3baf8400164962e92657~grNUBQEZl1628816288eusmtrp2T; Sat, 11 Jul 2020 10:44:58 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-5a-5f09982b97b9 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1A.86.06017.A28990F5; Sat, 11 Jul 2020 11:44:58 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104457eusmtip12782a9b6748c62da5394920f40265227~grNSQ4EvG0946309463eusmtip11; Sat, 11 Jul 2020 10:44:57 +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:43:59 +0300 Message-Id: <20200711104414.15422-13-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: H4sIAAAAAAAAA0VSb1AUdRied3dvdzk9207NNymdLh3F8u/14R3HUWtq2pl0xi/2IcdwjQ1I OJ070MgvDGMXHUJ4WRLlcUGXBk4gAXeIMnrTCXQQYNpB/oFhmhBJQORGgbuIdWn69vyeP7/3 mXdekTWf4JeK6bYs1W5TMiy8kWu4Otm59qWShOQN5c6nqLrdAzRwp4Kl/pO3eSoYO8ZQT+U2 uuj/xkDuvlyGitwPGPKfdfH0d38eRyPjfoZuXQoLVHotT6Dx4KBAhZ1fAw3G7rH0lfchUKen 3kCTVy7wNBor56ho6gbQZ3WtQC3HH3B0sjEA5HRJNPbDGYEqbi2j8f5WjsK9Pwl0LtrNUn17 HOhESzVQh3PGsP0FecrrM8gVF4cY+fNvu1n5au+Xgny8zcPI50cCjDzafIOXi+oqQf5loICV q/58zO8yvmPckqJmpB9W7eu37jOmBYs/gUPVxg/jTWVcLnwnukAUUXoFfx5+ywVG0SydBfR3 lLIuSJh9TAA6I1t14SHgwOQUaIIWiMT6eN10BnC6YaduigLGpms4TeCl1RjO9zCasEg6z6M/ FmE0YaG0AyNul6BhTlqJPV0Bg1bDJG3G2mlWH7Acq2ouP8EJs3R8tGuu0TKMlE08+ROldhGH 8ibnAq+j9/RNg44X4r2WOkHHz+FMYxmj46P4qDYi6OF8wDvlH8+ZtmHd8K+CVoKVkrD6wnqd fhULPU2MvqIF2HP/aY1mZ6G74RSr0ybMd5p1twUvt12boxHj0/N1WkZfSQ3o67kEeP3TDrYY lpf+P8sLUAlL1GxHZqrqsNrUI+scSqYj25a67r2DmbUwe6jhf1qiAWiO7Q+CJIJlvsmriMlm g3LYkZMZBBRZyyLTax3hd82mFCXnI9V+MNmenaE6gpAocpYlJ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ctwxzvB/D6NEvslo5arJfm1N8mapgVZGfNwic+3V lHVL791tqgqEGwsz6mNviq1ou21W5FKfzz7fe6JKH+6Q+lQ3bL0TbdqamtM5uaEWdMYUf7vf nmWWb67W3vC826ebf23b5xScyozavDN/7pFiiNh9eDDg+OWqcue5yGipqWbBk9FQP5Ndlf+m JE5G8Bq1wh838Oo/+kjUPAcDAAA= X-CMS-MailID: 20200711104458eucas1p103bc1f711ed17c9007c7ef9afa11738f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104458eucas1p103bc1f711ed17c9007c7ef9afa11738f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104458eucas1p103bc1f711ed17c9007c7ef9afa11738f References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 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 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index f777ce2af..de10dfe0e 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[60]; printf("\nChecking link status"); fflush(stdout); @@ -1794,14 +1795,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