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 D4235A04C7; Tue, 15 Sep 2020 21:09:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0ED1D1C1B4; Tue, 15 Sep 2020 21:08:17 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id BF7A41C1AD for ; Tue, 15 Sep 2020 21:08:14 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200915190814euoutp01ae6919d3242b2bc6cb749002a0db2338~1Cpjpr0M30552405524euoutp01R; Tue, 15 Sep 2020 19:08:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200915190814euoutp01ae6919d3242b2bc6cb749002a0db2338~1Cpjpr0M30552405524euoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600196894; bh=2wNIFYHcmh4yCYEREX5OuVKRLboLxAKCyymFOQAhjOI=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=J4C+c3zh9EiLAMxta1qSXqEyyAlGiXuLFm383DFj+Bb5XI2CEidXAyeW5oFvPPOQo vmdiRD5alxedZXp+1BNwZY0Hfpk4eVKy1bCNvifkMkSUDJtKel+xqh1pLWcfgmgjc6 aHv1nDe685pgP27PesiTJLD6gb3hJvawBQmpFQyM= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200915190813eucas1p135079ff10232320bd2189a4912e401e7~1Cpiz1EKX0047600476eucas1p1P; Tue, 15 Sep 2020 19:08:13 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 1C.53.06456.D11116F5; Tue, 15 Sep 2020 20:08:13 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200915190813eucas1p2ead5e8c99461c1253b7407f1d0ef3c1e~1CpihQU1H1703717037eucas1p2J; Tue, 15 Sep 2020 19:08:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915190813eusmtrp1593108c17526e16d170f253e117706c4~1CpigZPdQ3148631486eusmtrp1T; Tue, 15 Sep 2020 19:08:13 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-6c-5f61111d93b2 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E9.EB.06017.D11116F5; Tue, 15 Sep 2020 20:08:13 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915190811eusmtip2bc5b3d59e9d6c8dc02aa3a9d76a02bcb~1CpgwgKp70503405034eusmtip2k; Tue, 15 Sep 2020 19:08:11 +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:07 +0300 Message-Id: <20200915190728.18143-13-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: H4sIAAAAAAAAA0WSbUwUdxDGO7t7u3sXz6yHxlEqpGcaWo1SW5NOaqu1Nc0m/VASXxKbWtzK iigcege24BeiFOiJvB3VVBSpBEGkPdCDA3xHwwmHWi8SJB4WpQnFKiJCfOGovXUx/fbMb555 Zv7JX2QtxfxcMcmWptptSrKVN3FN7c+vLZo3Q4l/r35kHrm7yoHu3alkqb+0j6e9I9kM3apd QWe8hwxU8mcWQwUljxny1jh5etC/m6PhUS9DwbN+gQ4Gdgs02jYo0L7rZUCDofss/VLxBOh6 eaOBnl9s5elR6ChHBS+6gQo9V4B8+Y85Km1pBspxSjRyvFqgymAUjfZf4cjfe0qguvEbLDV2 TQIV+9xAV3NeGj59S35RUWWQK88MMbLr1xus3N67X5DzO8oZuWG4mZEfnevm5QJPLcid9/ay 8om/nvFxpq9NHyeoyUk7VXvs8o2mLXmlQWH7XdMPewab2Cz4Q3SCUURpKXqHJg1OMIkWqQZw uLOD14sxwPM3g6zmskhPAIsPf/N64nC3E3RTNWBrbpmgm8YBR4ZJ07z0DvrzyhnNNFNq4NEb 6gkXohghfYU9nQs1Dye9jRNdfZyGzdJHeP7yGj0/Gk/UX3i11xjGgZbuqfgo7Dky9ioSpZsi Vr108vrAKjw0EGB1HYH3fR5B12+i35XP6QO54Qc0nRL0oghwT9nDKdcK9PxzTdCuYKV30d0a q+OVWOPbBxpGaTreejhDw2xYljQdYHVsxrwci+624oWOwBRGnJyYpmMZfzughWjnnwVsH9pR BNEH/19VAVALs9V0R0qi6lhiU79f7FBSHOm2xMWbUlNOQvij+v/1jTbDeOC7NpBEsE4zV9ze GG8xKDsdGSltgCJrnWn+7Kr/W4s5QcnIVO2p8f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YLpY+LglGpg1BEzK01Ke92U21LrtFvW+XRV18eU Cr5OOaHViTW/uJQFNk0xnp3o2XZ1Q/b5Z2/Pf8zzfFOfyF2t0sVuzRq0km9eCMOdv2Gnpz1r D5pzY/tsmxdtYpMXSrVxpppY6+7VTnkXeDCTz9Oq/82J86wX+P82zFnmx7j5QOQM2d+3X1y/ ckpdZ8kKJZbijERDLeai4kQAOyqYcwgDAAA= X-CMS-MailID: 20200915190813eucas1p2ead5e8c99461c1253b7407f1d0ef3c1e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200915190813eucas1p2ead5e8c99461c1253b7407f1d0ef3c1e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915190813eucas1p2ead5e8c99461c1253b7407f1d0ef3c1e References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200915190728.18143-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 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