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 69126A00C5; Mon, 6 Jul 2020 22:30:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AE291DD3A; Mon, 6 Jul 2020 22:27:41 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 32F6D1DD3E for ; Mon, 6 Jul 2020 22:27:39 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202738euoutp0274f9db5651b4d035a7ed5466fb86566b~fQ7nqrj-11760817608euoutp025; Mon, 6 Jul 2020 20:27:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200706202738euoutp0274f9db5651b4d035a7ed5466fb86566b~fQ7nqrj-11760817608euoutp025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067258; bh=XtbX4XCFxTlmDt9RDrOth1o/sdpob+sTnBAjVCFknHA=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=TCUhi0Yb5me7tKwqhAGsLGJf+Htcgfe2iNHcgh65mX0AB9CLrrPwh3jo5yQc/O20m Fo+5qXPa1jRsV4gWU1dngm1Gjtc1OffsOtRpQ/TYUhMGBYx6dyKd1p2vQcL/0UyEUb biEjmTAo1zHb/NQW3LpzYmUkPRT7txD2syyPOQI8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706202738eucas1p2e6ec50bc49bdc489df198ffe7b2c06c8~fQ7nRclLC0115501155eucas1p2s; Mon, 6 Jul 2020 20:27:38 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id D9.B4.06456.A39830F5; Mon, 6 Jul 2020 21:27:38 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706202737eucas1p1314f8a06a538a2181093471bc09ac79d~fQ7mlfj4H1288012880eucas1p1n; Mon, 6 Jul 2020 20:27:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706202737eusmtrp2645d14d4115248318b2df35e16ce8a8f~fQ7mks_iX3205132051eusmtrp25; Mon, 6 Jul 2020 20:27:37 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-1b-5f03893a01f7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F2.5E.06017.939830F5; Mon, 6 Jul 2020 21:27:37 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202735eusmtip1a2e8b1b1d7b67f5d21a4d9543ecf9077~fQ7k1XhZ61791017910eusmtip1F; Mon, 6 Jul 2020 20:27:35 +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:26:12 +0300 Message-Id: <20200706202626.28628-23-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: H4sIAAAAAAAAA0WSa0wTWRTHc+dOZ4bGmtlBww1sJNaYoIlP/HBEI6sxOu7qulG/qFGsOsEH raZD8a0EkdTC1t2KuqIigg/AR620FhGJomnV8lCUoAGxPiIBEaSCuyCoLYPZb//zO///OSc3 l8PCYSaS22hIlowGXZKWUdPXPb21E+IO4oTJL7MiwF6Vi+B1cwEGf/YLBjI/plPwrDgeyt0n VWB7mUqB1dZFgbvQwkC7P42GjoCbgqZbPhZy6tJYCFS2sPBn7QkELf1tGI7nfUJQm+tSQe+d MgY6+/NpsPbVIzjkvI/Am9VFQ/aNUgQZFh4+Fl1goaBpFAT892nwPS9h4VLPYwyuqgEEf3vt CKozvql+GS325Z1TiQXlrZR4+MxjLHqeH2XFrAe5lOjoKKXEzop6RrQ6i5H48HUmFi++/Y/5 Q71CPXO9lLQxRTJOmrVGvcHfZtzart7+JD2dTUWvOAsK4wg/jZRZuigLUnMCX4hIoKRcpRTd iNQ4XUgpPiFyx1pN/Yh8OJJGK40LQZf7KqsUPYg4greHXAwfQ3zm3MHBI3gHQ9z9DYPxcH4h 8T16QYc0zY8lB809wR0cp+HjiOumSdkQTS5evT04JyyI73WWMCEt8KNIw+nuwZmEr+JI4aFT jBKYS1o8FVjR4aTN62QV/TP5duP00Nm7yL/XGlglbEakOf/AkCmeON/XsKEjMD+O2MsmKXg2 aXXY6BAm/HDy7MNPIYyD0nb9GFawhpgzBMWtJbcf1A1hQga+DFOwSLIHOoYe8RYirkYP+gtF 5/y/Kw+hYhQhmWR9oiRPMUjbJso6vWwyJE5ct0V/DQW/qu+rN1CKeurWViKeQ9phGj+HEwSV LkXeoa9EhMPaEZo51b7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aBURIVHhe8A6Xqxie46IqHT1AbuGMcd5/T/+zDKLygH5akKrzzGqBi7/LnG9Ms2tHl3 4vOftQ6Xa864MK5MWGrU5OVPZDn65MP7e5MPJu06UFXTVrrOZeFCZywFZ1z+5taYO6V0xyvP YPz506cc5SElfhXsKdE5zae9npfxq5ypmP+U7V7km7zYC22D1Nqeb8ElXXE/GuTlm+ouxURf fiIl+HS1IhTX8+p/R/IE4AcDAAA= X-CMS-MailID: 20200706202737eucas1p1314f8a06a538a2181093471bc09ac79d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202737eucas1p1314f8a06a538a2181093471bc09ac79d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202737eucas1p1314f8a06a538a2181093471bc09ac79d References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 22/25] example/performance*: 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/performance-thread/l3fwd-thread/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 84c1d7b3a..bd10014a0 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -3433,6 +3433,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[60]; printf("\nChecking link status"); fflush(stdout); @@ -3452,14 +3453,9 @@ 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_strf(link_status_text, 60, NULL, + &link); + printf("Port %d %s", portid, link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1