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 30756A00C5; Mon, 6 Jul 2020 22:28:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 375CF1DCC4; Mon, 6 Jul 2020 22:27:06 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 982661DCA4 for ; Mon, 6 Jul 2020 22:27:05 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202705euoutp021718c05e275ce8baefc31c810d331aa4~fQ7IdDfKC1760117601euoutp020; Mon, 6 Jul 2020 20:27:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200706202705euoutp021718c05e275ce8baefc31c810d331aa4~fQ7IdDfKC1760117601euoutp020 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067225; bh=Mcy1FKB5X97xPHfABEMsRH14jwW9/cdD4WTM5f5JTOo=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=Fg5/YdxYK21bwQ7w96SppIsMnayQAwaryfK5kKQ7hZvCJZl8pvEON82M34txWEQ1P KowOidsLAcjsUhTlqDGTdKDieRY31sn+KAEEkFeplZzrZDHIJvxnOFxOW4NJSrDvYp sGsS73wh+51QCpceI7IPbKwcIfVynD2MSD/VZ4Eg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706202705eucas1p1864d756f5df71fa70595f414f72c2112~fQ7IGbvWd0893808938eucas1p1u; Mon, 6 Jul 2020 20:27:04 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 53.99.05997.819830F5; Mon, 6 Jul 2020 21:27:04 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706202704eucas1p2489800126a0327fa6b1696fac1a05b3f~fQ7HZICOB0116301163eucas1p2l; Mon, 6 Jul 2020 20:27:04 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200706202704eusmtrp1bb63a30ded0ebd59fdbee10befb8ffeb~fQ7HYSdlK2178321783eusmtrp1q; Mon, 6 Jul 2020 20:27:04 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-a8-5f0389185b81 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E6.AF.06314.819830F5; Mon, 6 Jul 2020 21:27:04 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202702eusmtip14ff0d02b2f47d14ada3f74ec147af5a3~fQ7FkZ_wZ2342423424eusmtip1b; Mon, 6 Jul 2020 20:27:02 +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: Mon, 6 Jul 2020 23:25:59 +0300 Message-Id: <20200706202626.28628-10-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706202626.28628-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSWUwTURSGc2emM9PG4lBMuEEjocZESQCtRk+MghAfJj4YNb64YtWRqgW0 IyqiAobNgoBI3AMVYsBigqxFBJdGQShgxCAQyyKasKgsBeLGIu1gfPvPd85/lpvLkqpM2os9 FnFaMERo9WpaQVXW/Wrxw1fI0FWjjeuguCkHQV93Pgm92V00pI4mENBhDoIayz0ZZPXEEZCe NUaApdBIw7feyxQMOywE2GttDNxpvcyAw9rPwNW3dxH0Tw2RcNs0juBtToUMfr2spmFkKo+C 9N9tCDLK3yCoTxujIPtJFYIkIwejDwsYyLcvBUfvGwpsnWUMPJp8R0JF0zSCa/XFCJqTZmWb ffjfpgcyPr9mkOCv339H8nWdNxg+rSGH4EuGqwh+5FkbzaeXmxHf2JdK8kVfftLbFXsUG48I +mNnBENA4EGFrrN/00mj/Fxt2844VMUYkZzF3Fr8xx5PGpGCVXGFCD++NU1JwQTCXxxWQgrG 54KepzIjYl2WG0mBTreKK0D4w+Q2qWYSYXuBnXAmaG4FtqXkuMyLuBIaW6baXQkPbitOq6yW OTXFLcfPE2ddXMltwLa7fbS0kzcuevyCdGr5HH81UkZL05bi9twJV1PMNbF4YKaGkDbagpvv u0leDzxUXz5/2xJsu55GSToG/yhtZyRvCsLdeYnzRUG4/GsL4+xDcitxcXWAhINxatbX+fZu uOO7uxOTczKr8iYpYSVOSVJJ1Wr8oqF1HmM8/WeBhHmcPN4gk56nFuGM6UKUibzv/J9lQsiM PIUoMTxMEDURwll/URsuRkWE+R+ODC9Fc//UNlM/UYWqpw5ZEcci9QJlCk2GqmTaM2J0uBVh llQvUoY02w6olEe00ecFQ2SoIUoviFa0mKXUnso1eYP7VVyY9rR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xHWZiydy31+5M Xi4s6ToUe2SwLmrH2EVbfuPwMmHOpu6GWbKIqTWmPFVg3PrawW0+k/3K6dqNJ+hyTbKlZTBh fseuTVG/9EOR4cPyD3eDcxpGjnRmq2ZGx47HZNl3ry3ev+ixY+PC42b71qvmoYjyBZbNLdEH 17bJKD5JqVhBannlX5CzlQUFAwAA X-CMS-MailID: 20200706202704eucas1p2489800126a0327fa6b1696fac1a05b3f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202704eucas1p2489800126a0327fa6b1696fac1a05b3f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202704eucas1p2489800126a0327fa6b1696fac1a05b3f References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 09/25] examples/bbdev_app: 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/bbdev_app/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 68a46050c..44e6952e6 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -313,6 +313,7 @@ check_port_link_status(uint16_t port_id) uint8_t count; struct rte_eth_link link; int link_get_err = -EINVAL; + char link_status_text[60]; printf("\nChecking link status."); fflush(stdout); @@ -323,11 +324,8 @@ check_port_link_status(uint16_t port_id) link_get_err = rte_eth_link_get_nowait(port_id, &link); if (link_get_err >= 0 && link.link_status) { - const char *dp = (link.link_duplex == - ETH_LINK_FULL_DUPLEX) ? - "full-duplex" : "half-duplex"; - printf("\nPort %u Link Up - speed %u Mbps - %s\n", - port_id, link.link_speed, dp); + rte_eth_link_strf(link_status_text, 60, NULL, &link); + printf("\nPort %u %s", port_id, link_status_text); return 0; } printf("."); -- 2.17.1