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 85DEEA00C5; Mon, 6 Jul 2020 22:39:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EE261D94C; Mon, 6 Jul 2020 22:38:19 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 1C7D61DD77 for ; Mon, 6 Jul 2020 22:38:18 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200706203817euoutp0256f7627b6cf0c830f089128cd5e3bb95~fRE6zRJxC1760817608euoutp02Y; Mon, 6 Jul 2020 20:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200706203817euoutp0256f7627b6cf0c830f089128cd5e3bb95~fRE6zRJxC1760817608euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067897; bh=Mcy1FKB5X97xPHfABEMsRH14jwW9/cdD4WTM5f5JTOo=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=s6J+OsI9tolRzgEulgf9vbluL0parrsc9VZDjHdzSC2dyN0b9HQrEkxYV6wmAnvXp hvfIFFXupGw8NAOu7ZIdaPzsmE10FQBNTOKeJh59McYts3c48diOEVy0wNnAc+BdDc 1BVXYzPIFcA4yB8yyAEF8BmdsGxCV7dDbR3HujD0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706203817eucas1p1a86bd46cd1a3578bdc9640ca4cec381d~fRE6ds6L62452524525eucas1p1A; Mon, 6 Jul 2020 20:38:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id EC.D4.06456.9BB830F5; Mon, 6 Jul 2020 21:38:17 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706203816eucas1p1e8b84a0dfdd156d6f9a87c2dc96b8bf7~fRE5SN4jx2656026560eucas1p18; Mon, 6 Jul 2020 20:38:16 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706203816eusmtrp2de8825c7b6d2e53d5ca041e37cc4a627~fRE5RdkTB0640206402eusmtrp2u; Mon, 6 Jul 2020 20:38:16 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-00-5f038bb9ae6f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 16.DF.06314.8BB830F5; Mon, 6 Jul 2020 21:38:16 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706203814eusmtip12d7609ca5153347cd73333656232dd00~fRE3fDSJE1560515605eusmtip1A; Mon, 6 Jul 2020 20:38: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: Mon, 6 Jul 2020 23:37:23 +0300 Message-Id: <20200706203743.29416-10-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706203743.29416-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa1CUZRSA53zffhd2WH1bbTxDgbVUozaJO/HjQBldx89+ZNM049SkuOUn aLuou+Il/zAaO7hcFHRSVC7ClAQ2KC7uAlKKyqUFHHaidUttRzNCBVaUNgkz1m+d/p3znOec 877vvDJv3C0myGtzNqn2HIvVJOp1pzrv97/UUshnLhp2J1FjbyXQtau1PIX2XRGpMPwlR5fq M+i057BAZb/lcVRSdocjT51LpNuhHToaHfdwdLndJ9FB/w6JxjuGJCq+eAhoaOomT+XVd4Eu VjYLdP9sq0hjUzU6KpkcBNrt7gbqKrqjo30tXiCni1H426MS1V5OovFQt458wZMSHZsY4Km5 9wFQaVcjUJ/zofD6s8pk9deCUnt6mFP2Hhnglc7gV5JS1FPJKSdGvZwy9v2gqJS460H58Voh rzT8/rf4vv5j/aurVevazao95bVV+uzg0OINrrit7YMf5IFXckGcjCwVe3rzeBfoZSOrAzzk 2yloyT3AkRvHxahlZHcBJ5vTHnf89cOgpElHASPlu2LJBODOYKcQtUQ2D30FlVy0MJudENEz FeCihVnsXXSe+2N6oSzr2PPYGs6NYgNLx3xvQNA2zMWG42ceKXHTvOJCgnaIJAxU3Xs0Elm3 jG2RA0LUQfY2lhY/o7XOwptd7tjVnsaHLVWcFm/HSFNA0noLAK/W5MekDHTf6peic3g2Hxtb UzT8Btb+dAO08TPw0sgTUcxPh2Wn9vMaNmCB06jZJjzT449hxAf/xGtYwbDz19hztgMeK20S 9sDcg//vqgaohzlqrsOWpTrMOeqWhQ6LzZGbk7Xws/W2Jpj+pr5/u8a9MOH/tAOYDKZ4Q0jm M42CZbNjm60DUOZNsw1v9vlWGg2rLdu+UO3rM+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m4ZI5L5fT/7zCRhzQTGc+/SUvwHT4RGtk/350Kc6er6jdM TI517joRX9RmNVtzMoZj6hqdKt8jwVo42rUHMYW3cb8sLsan5vsOyWqpZ+zx/qhnrSeH7s/U fhjNDovYvUnsMNt3zj39XFqxKs5CDHqpy0L3OyZr7bOl0gjjDOOYj/40F6VvV9q55PtTMoJP VDGbcT2v+gObLG72AwMAAA== X-CMS-MailID: 20200706203816eucas1p1e8b84a0dfdd156d6f9a87c2dc96b8bf7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706203816eucas1p1e8b84a0dfdd156d6f9a87c2dc96b8bf7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706203816eucas1p1e8b84a0dfdd156d6f9a87c2dc96b8bf7 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706203743.29416-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 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