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 6AF6BA00C5; Mon, 6 Jul 2020 22:28:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60CFD1DC8F; Mon, 6 Jul 2020 22:27:10 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 5CBDD1DC41 for ; Mon, 6 Jul 2020 22:27:09 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202709euoutp01172f1affa1ed9869ac3016d94e10ed68~fQ7L_rUe-3113131131euoutp01s; Mon, 6 Jul 2020 20:27:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706202709euoutp01172f1affa1ed9869ac3016d94e10ed68~fQ7L_rUe-3113131131euoutp01s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067229; bh=sZj87uqkawQ60wf+sT4re4HeKIKPddDywVxgWZ8WdS4=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=IzsIq1RVkKvXWoUQOPBQDBBlW6qIO4jn3oMID8v/ya+Di5rLbmRja8BESPLt0fKgN yS1I5o4qZautPb4G41XzxcjFB5fpmJtu1z8kMfv3oq78uaRiqOSUOxgvHkK538jict D2UdKa2BeZJ2LfoQPdS+en21IEz6qSQwM8VgG7tk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706202708eucas1p16f3a6e3b16cf24cc759b8a24e7b593f5~fQ7K8_CFq0893808938eucas1p1w; Mon, 6 Jul 2020 20:27:08 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 72.B4.06456.B19830F5; Mon, 6 Jul 2020 21:27:08 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706202706eucas1p299579aa6492e84e34f0d3912032e51e0~fQ7JzjAAY2938529385eucas1p2C; Mon, 6 Jul 2020 20:27:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200706202706eusmtrp150e150eb41fb32f55469d4e9f4fa16dc~fQ7JyRaAE2178321783eusmtrp1r; Mon, 6 Jul 2020 20:27:06 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-f8-5f03891b366d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 65.4E.06017.A19830F5; Mon, 6 Jul 2020 21:27:06 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202704eusmtip1b061978672c41c8d745a6bc764a28bd0~fQ7H_ZtJo1560515605eusmtip1W; Mon, 6 Jul 2020 20:27:04 +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:00 +0300 Message-Id: <20200706202626.28628-11-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: H4sIAAAAAAAAA0WSbUxTZxTHPffe3nvbWHMtZp6gwmimccvE+RZPNjNx2bK7DybqF5PFgZ3e gBkgaUXntg/ECGMFKwMiEVnlJQqjLgiUgorMNQQoRUFEC0GxwRnmy8DyEqXAHKXX+O1/fuf/ f855njwiayjkI8VDqUcUc6op2cjrOFfbdPe6lb+wCR+dLAGq6bIDDQ9VsOQvfMBTzouTDPVX b6fmxhIN5T/MYMiWH2CoscrK03P/CY5GxxsZun/dK1Bx7wmBxt0jAp3qPgc0MvuUpbOlE0Dd 9gYNTf91laex2XKObMG7QKedHUDtuQGOCq80AWVZJXrxe6VAFfejaNzfwZF3oF6gS1O3WWro mgP6tb0G6GbWa01cjBwsvaCRK5qfMHJB2W1Wbhs4I8i5Hjsj1442MfJYy11etjmrQe4czmFl x9+v+F26r3XbDirJh44q5vWf7tcl9V3+DdL+0H4/0zIjZECbYAWtiNJmLMgr4aygEw1SFeC9 ZwNMuJgELGrNYsPFBOBc2Qi8iUxfnFZdlYCePC8XahikKUBb99aQ5qW16M22L5iWSbU8Ns76 mFAjQvoC+84ENCHNSauxL+PawiJ66WPsq/hZnRCNjss32JDWzvPWsXo+PCAKfecnFw5FqUNE W0sXFw58jq6LATUcgU/bnertVqK3IFf1/Igv63xCOJwNOFSeqZq2o/PZrXktiqz0PtZcXR/G OzDoyWFDGKUl2P/v0hBm52W+q0jFeszOMoTdRrzh6VUx4tzM4jCW0e8ZVB/xOuC5TjubB9HF b2eVAlTDciXdkpKoWDakKsdiLaYUS3pqYuyBwyl1MP9Xvf+1jzfBVO+3bpBEMC7W+0U2waAx HbUcT3EDiqxxmf6zm954g/6g6fgPivlwgjk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Sv+e/DaCuHGLT74v6WQpOQH/IiL+S+tG5jXM7O9Wdt sj4NeMdTcX2B8TJq3walf/u4/TWiKOmUmxvjrR5SlDsVND082HQisX51dZGpeyWYsRFX+2Kb PZfa0t+F+zNlw/ka37Mtje7mk6JC+kB/afujAwH+koysZ9Wvn28ylDUnJO/FA1c1hG6okhJC mFLujGsE5T+kdxH1CQMAAA== X-CMS-MailID: 20200706202706eucas1p299579aa6492e84e34f0d3912032e51e0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202706eucas1p299579aa6492e84e34f0d3912032e51e0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202706eucas1p299579aa6492e84e34f0d3912032e51e0 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 10/25] 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_strf 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..8bf80c262 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_strf(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