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 6F9F9A04C7; Tue, 15 Sep 2020 21:10:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D56301C1BE; Tue, 15 Sep 2020 21:08:21 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id B77301C1BC for ; Tue, 15 Sep 2020 21:08:19 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200915190819euoutp0100c900ddae00f4925c2f1be3018fb818~1CpoWBK5S0530105301euoutp01Z; Tue, 15 Sep 2020 19:08:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200915190819euoutp0100c900ddae00f4925c2f1be3018fb818~1CpoWBK5S0530105301euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600196899; bh=O0RMdSfG+AOCpq5MldeMzJL75/V6GLjvklL2HbHCXdQ=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=Ey3mN+dEY/cDDPK/1DmnJZ38WvHwZX4tzSsTs3Le3G9pzNNfc8BHXa5fMdeqPn900 sariUILOKEb7rEQpna1o2eYihGjSMFyCu/P2RoRbLFnQV5tjcK2JAke3PKzUnRzoD4 5aimaECPOPlwyN1VbImm7qlw7pUI43QEeKt/IvWQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200915190819eucas1p288779dbce6b9119226db49762dd17d29~1CpoBzGT01703717037eucas1p2O; Tue, 15 Sep 2020 19:08:19 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id EE.53.06456.321116F5; Tue, 15 Sep 2020 20:08:19 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200915190818eucas1p2ce297ae5bed8ea506af740a738f411f8~1Cpnoc4Yh2576625766eucas1p2o; Tue, 15 Sep 2020 19:08:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915190818eusmtrp15d283be3c82945c1ba30a736dd6f0237~1CpnntkSd3148631486eusmtrp1X; Tue, 15 Sep 2020 19:08:18 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-76-5f611123dc2d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4C.EB.06314.221116F5; Tue, 15 Sep 2020 20:08:18 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915190816eusmtip29bc84787e7d94202ebdb4e2b41cc0999~1Cpl2Kj6U0503105031eusmtip2N; Tue, 15 Sep 2020 19:08:16 +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:09 +0300 Message-Id: <20200915190728.18143-15-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: H4sIAAAAAAAAA0WSa0wUZxSGc2ZmZ4aNa4ZVy4k2GNeYiMZb9cdJNdJaEyehKTYxaWq1OOqI F26dAaz9RdRSs6xbWa9gu1I2KqINdxYJq7hRVrorhDVbNPWyNSZeEJRVGrGo3XUw/fee5z3v +c735RNZq4ufKm7LK1S1PCXHxpu51q7R3nkzk5WshdcreaoLuYHu3fGwFD10m6eyZ3sZulGb Th3eX0zkulvCkNM1zJC3xs7Tk+hujoZiXoZu+YICVYZ3CxTzPxBof+9xoAdjj1mqqHoO1Otu MdHopXaeno5Vc+R8FQH6ufkqUMAxzNGh821ApXaJnp05LZDnVirFolc5Ct5sEujcSB9LLaHX QOWBOqBrpW9Nn8yQX1WdNMmejkeMfPC3PlbuunlEkB3dbkZuGGpj5KcXIrzsbK4F+Y97Zax8 9v5LfrV5rXnZZjVnW7GqLVi+wbz11J7LbIHP/H3vkRBfAo2iHUQRpSX4z93FdjCLVqkGMOi7 yBjFC8Afz1WAHZLixXNA59HZ7wOB/gyj5zRg97E/xwMjgAPxLRIBXpqNwX3ud8ZkqYFH71g/ kzAmSZno8A0xiUmcNAtbYt8lsEX6GOtrHnIJjdJ0PFvfySZ0UpyHz0cEY4lU7D/x4t1MlEIi 3nHs5Y3ASry9/8J4eBI+DjQLhv4QgwcdnBH4CbC8tUkwigOAe44PjnelY/NAj5DYiJXSsK59 gYE/xYuHY5xx5Yl4YzA5gdm4dLUeZQ1swX2lVqPbhp3d4XGM+PrfCQaW8UT1FcF4Hx9gKNbI HYDplf+fVQVQCylqkZ6breqL8tSd83UlVy/Ky56/KT+3EeI/NfgmEGuDkfBGP0gi2CZYqv7a kGU1KcX6rlw/oMjaJltWXAt+a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YJIpSpMFbYe5Euk5+mnB2V0Mqfn03g+g9f9n8MoL38j4haIg3q7ncX5xuxTMyfZ7LVG NOpf8DAsqLHc8f2lLjjB3B+YvjTLslEabd8KjXYnm5O2Sh1TWJcUTXUvkrhOtWouJwZtHxtM StjnWJu20Lbj8ZYK09wuQ17G7S2fZ67uWdZrqTrq7EyK+v0wOmuTz+7T5riGpd65hr1tlmv7 3vnKCSGFU67BdQL3F48/lPgHAwAA X-CMS-MailID: 20200915190818eucas1p2ce297ae5bed8ea506af740a738f411f8 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200915190818eucas1p2ce297ae5bed8ea506af740a738f411f8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915190818eucas1p2ce297ae5bed8ea506af740a738f411f8 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200915190728.18143-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 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 | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 827da9b3e..820470db5 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[RTE_ETH_LINK_MAX_STR_LEN]; printf("\nChecking link status"); fflush(stdout); @@ -1753,14 +1754,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