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 F240FA0526; Fri, 10 Jul 2020 09:04:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61B5F1DD02; Fri, 10 Jul 2020 09:03:03 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id E0D591DCA5 for ; Fri, 10 Jul 2020 09:03:01 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070301euoutp020fb35a41a9b7915cd48712bc0b370ade~gUiPEZOv_1730917309euoutp02Z; Fri, 10 Jul 2020 07:03:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200710070301euoutp020fb35a41a9b7915cd48712bc0b370ade~gUiPEZOv_1730917309euoutp02Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364581; bh=Mcy1FKB5X97xPHfABEMsRH14jwW9/cdD4WTM5f5JTOo=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=ul8M2E9192v1m1mrLT2J8CDRuX5fPem3XMs0VKtBvw5BWBtXL27hgZiiZFi5ULNEy Tx4Lh2DAA0uMe6n/P7SRvv2yPRZ74ePidbPmRAK3NVtSK252PZuoC0YkQLQg8rrWyq s/2Y9YzcXI1YqH4vj10X7bl7eg4lQ8Ad5IFryHYI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710070301eucas1p15ff4e1100c6e346bcb2adc10b418b24b~gUiOzToYi1573715737eucas1p12; Fri, 10 Jul 2020 07:03:01 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id EF.3F.06456.5A2180F5; Fri, 10 Jul 2020 08:03:01 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200710070300eucas1p12e2b57b4aabff00ec8920a0658d32fd6~gUiOZqJ6v1572015720eucas1p1_; Fri, 10 Jul 2020 07:03:00 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070300eusmtrp1b9b37f47b975c40fe90759351b5b7cbb~gUiOYx-xm1113611136eusmtrp1u; Fri, 10 Jul 2020 07:03:00 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-f6-5f0812a532e9 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B8.04.06017.4A2180F5; Fri, 10 Jul 2020 08:03:00 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070259eusmtip16d94c8525eb36464b978ab12b28ca317~gUiMnnp6v1544015440eusmtip1f; Fri, 10 Jul 2020 07:02:58 +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:07 +0300 Message-Id: <20200710070226.6045-10-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: H4sIAAAAAAAAA0WSfUwTdxjH87u73l07K7eTyBNfcDaaTBN8iSY+JPNtM3rRLBv+oYmJwyon klEwPXFzSyYSIc2JTCvByWZ5KQxFCQPBlg4nloyqFZEagkTUzmzyIgJWG5WhjHI1++/7fJ7v 8/v+nl9+PC2eYGfxaRkHZGuGOd3EGpjLbW86EipFPnnZndsxWHvLQfDxQyeNwcIHLB4bPUrh veq12Oz6RYf2R9kUFtifU+g6p7I4FMxhcDjkorD3ip/D4kAOhyFvH4fHO34m2Dc+SOOZ0hcE OxyNOnxzzcPiyHg5gwVjXQR/bLhO0Jf/nMHCJjfBPFXA0fNVHDp74zEUvM6gv+cShxfDnTQ2 3npL8KSvlmB73oRu3XxprLRSJzmbByjpVFknLbX1FHFS/g0HJdUNuylp5I8uVipoqCbSzcfH aOnC36/ZLw07DJ+kyOlpB2Xr0jW7DPt6+lbvV/XfXunamk3cnEr0PAgroagmMKkNvCicI9B6 9X60eEmgNzjEasULAo3OfvJ+5MmgSkW0KFQR+Kc1TTOFCTy5G6QjDVb4GPw2BxVpxAp1LLjG u6cmZgibod/dyaiE5xlhIZTlbotgo5AIXnU8GjAPLvzWMnWOfpLnquWcFhYP3SUvKc3TwsNZ 52ZNb4CmP3/SaXoGDPoaorvNAf+pfEbT38Or+u6p1UCwEXhYnhs1rYWGp7e5yH1oYRHUepZq eD3kuMpIBIMwHe49+zCC6Ulpv3ya1rARbHmi5jZBy41AFAO8/XeahiWoH2uKvmczgXCnnT1B 5hX/n1VKSDWJk7MUS6qsLM+Qv1mimC1KVkbqkj2Zlnoy+U/973whNwkHdnuJwBPTNKN7gk0W deaDyiGLlwBPm2KNn7b7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YTOAJE6 Q5ghTA/aFepc9tUhjk0y2cWjonhMtP33EYxKk4n0BBecMBg4bjamvz9qiF2X4Xrx2m/6Y+NQ mlEf0xUWt40vs6TYqypVDcetKkt+PqFwZi0fKo5J9XJXOgI0IdD3wiHdffs5+4P3Tjx/MUq3 ac8NrnOYxzu85I9uv1J6Q80S5Zq5uP1+er032FCUc7KdX3f22kT0dnqnJmGuXUtJySbdBtIm mf4B1x+77wYDAAA= X-CMS-MailID: 20200710070300eucas1p12e2b57b4aabff00ec8920a0658d32fd6 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070300eucas1p12e2b57b4aabff00ec8920a0658d32fd6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070300eucas1p12e2b57b4aabff00ec8920a0658d32fd6 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 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