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 B5BD7A00C5; Mon, 6 Jul 2020 22:30:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B8F61DD4D; Mon, 6 Jul 2020 22:27:47 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 226DE1DD4B for ; Mon, 6 Jul 2020 22:27:46 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202745euoutp0257cef95d96e5173425925b61b65eaa95~fQ7uOXFRL1760117601euoutp024; Mon, 6 Jul 2020 20:27:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200706202745euoutp0257cef95d96e5173425925b61b65eaa95~fQ7uOXFRL1760117601euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067265; bh=WQh0/xZ8D/8NSNS0F/gifzw1wCeRoFQ4rQBL4QRJi0A=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=fX0kDCLy6mfUNy5yYyykqOQcgsCr1vFAZ9FhiImstdWYzxlKPvfiBqJSKb846Eeol Ylw2ph1NiQRJlmcFCAd+vid7TyIJ86YhyTSMu+w35TPAUWcqBREo677fIjjteYILlY fRDtfMN4ci44zeuTO7AUjmc07tvGcE4dsRBXdDIw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706202744eucas1p160530aa62f91c757b33d8c360238f4a9~fQ7sxRQmX1288012880eucas1p1o; Mon, 6 Jul 2020 20:27:44 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 1C.B4.06456.049830F5; Mon, 6 Jul 2020 21:27:44 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706202743eucas1p2a3fdb7441c2c5fc4cbd7c3275376874c~fQ7sXNKC20115901159eucas1p2i; Mon, 6 Jul 2020 20:27:43 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706202743eusmtrp2045e718c6252fee4777ebb03274f0d08~fQ7sWZaoD3205132051eusmtrp29; Mon, 6 Jul 2020 20:27:43 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-23-5f038940b34a Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.5E.06017.F39830F5; Mon, 6 Jul 2020 21:27:43 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202742eusmtip13f70703ab0e76239f19ef3b39a3e887c~fQ7qmwE9_1560515605eusmtip1e; Mon, 6 Jul 2020 20:27:42 +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:14 +0300 Message-Id: <20200706202626.28628-25-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: H4sIAAAAAAAAA0WSb0xTZxTGd+7b3nupdnktZB7ZJq5xyWYiajaTM2PUbSa7yfjgh30yUVbH HYq0mLa4sSVLdUqwMJxoNLqF8kcjK0uqWCkYNEAYRSuiVQNmiI2TEZhIrTCRIoxya/btd57n POecvHllZjoqpsu7bE7VbrPkm0WDrrHzxY2Vmw6x7NUDg5x81yuBHg7UMoocuy9SafSAQH3e jdQS+FVPFQ9cApVXPBUoUOcW6XFkv46exAIC9V8OSXQqvF+iWPuQRD/1/AI0ND3C6GTVM6Ce yot6etF2SaSx6RodlU/dBTrs7wIKlj3V0bHmJqBiN6fob2clqu1fSrFIl45C9y5I9PvELUYX r78EOhL0AXUXz+o3vaNMVZ3RK7Utw4JytPoWUzrvHZeUsquVgnL+SZOgjF25Kyrlfi8o1x6W MqX+0aS4xbDVsD5Hzd+1V7Wv2vClYWdna0y/5+CCb2/OjEkuiMhuSJGRf4iD3X+JbjDIJl4H GHzk0mvFOOCZcBy04hlgtGxWfBVx//ggaZwFfH4/yLRiAvDE8UYh0SXy9zBUUikkjDR+XsTA dO+8kcqz0FsamIvLso6/i3eqeUI28nXYMtUA2oYMrD/XyhKcMqd3jF2Y32ziS7HXMz4/E/lN Gav2xZOBzegL+pjGqTgS9Esav4WzzR5B4+/xeUOvpIVLAAdqDiabNqL/nxtS4iDG30ffpVUJ RP4x/tv2g4avY9/ookQzm8OKxhNMk41YUmzSZpix9Wo4KSO+jC/UZAWLD5QmH/Qy4OSRWvgZ Mk79v6oKwAuL1UKHNVd1rLGp32Q6LFZHoS0386sCawPMfdXQTDDWBBPhHe3AZTAvNEZklm3S W/Y6iqztgDIzpxk/6Q5tNxlzLEXfqfa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QcEIVkw/u8jWO+ATFSmqnXETofgowWuWWmpcyIa zFG9fb+WWhyD1pwNcc1l/ss6veq37L8Z3X/wtvQjO9BiG24LOFX69Xd0YWNUUKAmS7/Qt97s uvcjeu/G/q70se7Yduvs2uFzua0H6RcZwKevO5ShmR+xIf9KQqD00WHrZLZvbXgCXPdTJ1de 1+qlpMQErXo5aRS1fwFK19hlCAMAAA== X-CMS-MailID: 20200706202743eucas1p2a3fdb7441c2c5fc4cbd7c3275376874c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202743eucas1p2a3fdb7441c2c5fc4cbd7c3275376874c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202743eucas1p2a3fdb7441c2c5fc4cbd7c3275376874c References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 24/25] examples/server_nod*: 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/server_node_efd/server/init.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c index 378a74fa5..00224850e 100644 --- a/examples/server_node_efd/server/init.c +++ b/examples/server_node_efd/server/init.c @@ -247,6 +247,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask) uint16_t portid; struct rte_eth_link link; int ret; + char link_status_text[60]; printf("\nChecking link status"); fflush(stdout); @@ -266,16 +267,10 @@ check_all_ports_link_status(uint16_t port_num, 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", - info->id[portid], - link.link_speed, - (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); - else - printf("Port %d Link Down\n", - info->id[portid]); + rte_eth_link_strf(link_status_text, 60, NULL, + &link); + printf("Port %d %s", info->id[portid], + link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1