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 7F3DAA0528; Sat, 11 Jul 2020 12:45:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CE0941DA10; Sat, 11 Jul 2020 12:44:53 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id C4AAC1DA10 for ; Sat, 11 Jul 2020 12:44:52 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104452euoutp0130ca4742f6203c12f24123b9ec403a90~grNOGzOar0814708147euoutp01W; Sat, 11 Jul 2020 10:44:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200711104452euoutp0130ca4742f6203c12f24123b9ec403a90~grNOGzOar0814708147euoutp01W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464292; bh=mRx7pBLZbpt5Gw+L5M5nsQty4a6+A6cQBxZj077yqMU=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=Cdsruwkj9Qwp/a6ImhBWi3XbEgGBgvYpnNAufUkMAk+IDdc36InNeyPGvsB9cnMzu SSAuPym0tA4RAh29TnLnRxh1rc/h3q3LBcAyquKVSPclguRfzce8MXpr5zxl/AnYel iRlTVT6Fh3yeI6FJY+rzEeGFTv5qVU4+9e3HyW+c= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200711104451eucas1p166905ede5ced1aeede492435de7e155f~grNNAeXsv1560515605eucas1p1e; Sat, 11 Jul 2020 10:44:51 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 89.1F.05997.328990F5; Sat, 11 Jul 2020 11:44:51 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200711104450eucas1p25d8dcf9ccbddff8d3525c294a3b5b585~grNMTH3XJ2331023310eucas1p2F; Sat, 11 Jul 2020 10:44:50 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200711104450eusmtrp1e0ae689c1e5e4e921252cd7eebcc8fd5~grNMSU9FO2954729547eusmtrp15; Sat, 11 Jul 2020 10:44:50 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-48-5f0998230f79 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D5.86.06017.228990F5; Sat, 11 Jul 2020 11:44:50 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104448eusmtip19252a07872670e744c593036a62dccea~grNKi3Tf51304313043eusmtip1i; Sat, 11 Jul 2020 10:44:48 +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:56 +0300 Message-Id: <20200711104414.15422-10-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: H4sIAAAAAAAAA0WSbUxTZxTHc+69vfe2s+ZadT5Boq6LUUkEX7bkzBh1U7P7zQU/yaLY6Q2i FLVX2NgSA4jIKgMHbAqbpbRRsKBdpQp2OLGJvBXlZSolQyWdkeAbWiEKFlzprdm33/mf//85 OScPT+t+YWP41PRDkindkKZnNczllvFbyz8+pU5e0V41F52dFsDAfTuNg2X3WDz+Io9Cv2M9 NjX8rsKSB9kUFpW8pLChxszi08FcBp8HGygcuOrjsKI3l8Ogd4jDn7p+AxwKPaax3PoKsMty SYXj1z0sjoRsDBZN3AEsdrcBtha+ZLDsSiNgvlnAF+eqObQPLMDgYBuDvv56DuvGemi81DkJ +HOrE/Bm/jvVho/ECesZlWhvGqbE0qoeWmzp/5UTC9stlOh63kiJI3/dYcUitwPEjsBxWqx9 +Ib9SpOkWbtbSkvNlEwJ63Zq9lwby4EDLvV3/mIrZEMHZwY1T4RPyLMzAZUZNLxOqAFyu/ws pxSjQPoddaxSvAJy/+w4/T7S6B6mlEY1kJC3OpofA3IjcIqadrHCUuIrsERccwQXSxpCfZHG bGEzyXO2sNPMCItJ0FysmmatsIb0XLhLKSMWkto/miPj1GF9cqQ7wjphAemrHI08SoRunvT4 b4AS2ER6c2xRnk0et7qj68USX2kho/AP5PXFPk4JF4QXsh2NmtYT95NbYeZ5WlhGnJ4ERf6c DDy4G5GJMJP4n82alukwllw+SSuylhTk6xS3njS390ZlQibfzlBkkVgcj6LHugrk/NQ9OAEL K/6fZQVwwDwpQzamSPKqdOnbeNlglDPSU+J37TdehPBn9U21jjaCJ/SNFwQe9DO0VgOfrFMZ MuUsoxcIT+vnaL+46duh0+42ZH0vmfYnmzLSJNkL83lGP0+72ja8XSekGA5J+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VbF+dFLHte7S2OvTM+RVH Ynz8ViX8oPdWdUdNv15/YDd6FFk+3DxiPs4T0bvctlrSR8tO1Jt3ZpfnZhf67R8nwqTuT05W Xd/3J9Ka6OwMKfjgYTfXDeSJfb0Lu7qG86YmX6ybq7XrNhjcH+7K35F8Wa8O+pYTGp6uvlyn dfQ55QQfr1GuxY285h+SBxwiCQMAAA== X-CMS-MailID: 20200711104450eucas1p25d8dcf9ccbddff8d3525c294a3b5b585 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104450eucas1p25d8dcf9ccbddff8d3525c294a3b5b585 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104450eucas1p25d8dcf9ccbddff8d3525c294a3b5b585 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 09/24] examples/ioat: 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/ioat/ioatfwd.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c index b66ee73bc..7d1164ebd 100644 --- a/examples/ioat/ioatfwd.c +++ b/examples/ioat/ioatfwd.c @@ -700,6 +700,7 @@ check_link_status(uint32_t port_mask) uint16_t portid; struct rte_eth_link link; int ret, link_status = 0; + char link_status_text[60]; printf("\nChecking link status\n"); RTE_ETH_FOREACH_DEV(portid) { @@ -715,15 +716,11 @@ check_link_status(uint32_t port_mask) } /* Print link status */ - 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")); + rte_eth_link_to_str(link_status_text, 60, NULL, &link); + printf("Port %d %s", portid, link_status_text); + + if (link.link_status) link_status = 1; - } else - printf("Port %d Link Down\n", portid); } return link_status; } -- 2.17.1