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 89CB5A0526; Fri, 10 Jul 2020 09:05:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A94F51DE13; Fri, 10 Jul 2020 09:03:18 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 532601DE09 for ; Fri, 10 Jul 2020 09:03:17 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070317euoutp010bf70db3b55d245f1484d8e71df64d80~gUideKVJu2063820638euoutp01R; Fri, 10 Jul 2020 07:03:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200710070317euoutp010bf70db3b55d245f1484d8e71df64d80~gUideKVJu2063820638euoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364597; bh=0KRTz2AP5FV+jHZTStTVbtq12s0MKBOah3XGntzISPk=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=M+ZEnQbik0iLTtqAzO02qBU3NDmJUxb3IpWVFSMIDtsTGjFdT0nTLw+0l7MQUDNPX dX6dHblqBfvJ1eKOWa7n0ldgoh4UUEgvud9b5pp9lm8+Zn9fB3xgA8zGZH6Q1v0Ht0 LMsp7yKM7qAC21x23QyyxebmeZwOrHyO0s7d2blY= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710070316eucas1p1ddf7cc869bec67040a88bdb1ab9cff60~gUidQ6L841630516305eucas1p1e; Fri, 10 Jul 2020 07:03:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A5.48.05997.4B2180F5; Fri, 10 Jul 2020 08:03:16 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200710070316eucas1p284d925e1ce4839ff2c850c5e82e6fc48~gUic0BqTR1909319093eucas1p2w; Fri, 10 Jul 2020 07:03:16 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070316eusmtrp1e8b8b6c8473233f88dba172738536985~gUiczJvB71176811768eusmtrp1f; Fri, 10 Jul 2020 07:03:16 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-58-5f0812b49d90 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B9.94.06314.4B2180F5; Fri, 10 Jul 2020 08:03:16 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070314eusmtip11471b4bba7690a3b80a4cc293b962803~gUia_7WDA1592215922eusmtip1U; Fri, 10 Jul 2020 07:03:14 +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: Fri, 10 Jul 2020 10:02:13 +0300 Message-Id: <20200710070226.6045-16-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710070226.6045-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSWUwTURSGc2emM0O1Og4mXnFBKySKKbg9HBL3mDgxrvHFaFiqjmDYtCOK +iASWSyLWoniQsXiwqKyFcrmRiIFCmJJsBhRG2LcEQQMQkGlDMa37/zn/P89ObksyV+gvdiD 0UdEXbQ2Uk0rqYr6oecaM8+GLOn5tgSKmo0Iut7mkuDMfENDau8ZAjoK1kCt5boCDO/iCcgw /CDAkqen4ZszgYLvfRYCOh/aGLjalsBAX91HBtJbryH4OPKFhCs5/QhajeUKGHpaTUPPiImC jOF2BOfMDQisaT8oyKyqRJCk56A3/y4DuZ1zoc/ZQIHtVRkD937aSShvHkVwwVqEoCXpj2Lt fGE457ZCyK39TAgXb9pJof7VJUZIazQSQsn3SkLoedROCxnmAiQ0daWSQuH7X/R25W7lyv1i 5MGjoi5gdagy3GmqYQ6lK+OedViIeJTA6pEHi7kVODnrpkKPlCzP5SF8w+Kg5GIAYaPz5UTR j7D901dGj9hxS3lWgKzfRTgzu5uRi58I5zfXUO5cmluIbSlGwt2YzpXQ2DLiINxuT24zHq0f n6E4XzxY4lC4WcUF4tvWLFreyRsXFj8h3ewxpifqTYybeW4udtwYGM/EXAOLm1r6JzbagDtr tsteT/zFamZkno1tF9MomU/iwVIHI3tTEH5rSpwYWoPNX5+P55DcIlxUHSBHrsPJ6TtknII7 uqe5h8kxNFRcJmVZhVOSeDlDjZ80tk3IGI+6JsuygF1lBkI+Tu3YpbpTqfPI++r/p3IQKkAz xFgpKkyUlkWLx/wlbZQUGx3mvy8mqhSNfVTbb+tAJaoe2VuHOBapJ6tCR+kQXqE9Kh2PqkOY JdXTVetbbMG8ar/2+AlRFxOii40UpTo0i6XUM1TLTZ+DeC5Me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jJpnoRmsjtfH3/lLv94zTjUrRw/bF61 i0oL6Rm+VFzqVx1yo+WYrnLhe2GJ+qqlcbSuPy/7yKPC+Zse+Mfs0DpqSjaUTlMrota2iXmK GWlTcX59i1y22Wrb5tvNjyeK+cKNxbMtYXosbmvuQGcn1+Y3N3igMT/DnLNP6F3HHrV2sYSY rFGF4YKo+QtNz7syBwMAAA== X-CMS-MailID: 20200710070316eucas1p284d925e1ce4839ff2c850c5e82e6fc48 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070316eucas1p284d925e1ce4839ff2c850c5e82e6fc48 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070316eucas1p284d925e1ce4839ff2c850c5e82e6fc48 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 15/25] 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_strf 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..7648ea027 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_strf(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