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 37C12A00C5; Mon, 6 Jul 2020 22:41:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F8DD1DDEF; Mon, 6 Jul 2020 22:39:07 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id C45EE1DD65 for ; Mon, 6 Jul 2020 22:38:58 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706203858euoutp01b2da319a54a5d5dd9792e7c597d3c8d8~fRFgt63P53113131131euoutp01c; Mon, 6 Jul 2020 20:38:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706203858euoutp01b2da319a54a5d5dd9792e7c597d3c8d8~fRFgt63P53113131131euoutp01c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067938; bh=WQh0/xZ8D/8NSNS0F/gifzw1wCeRoFQ4rQBL4QRJi0A=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=XnATxjCQPC6BWtZfYVJ1GOEa8EEQxQIsuWd8Pcm2EOJuTZJTUUOPvev7oWMmrDldG ToxS8+sAlJKtO0gEYNagQ+phMcYhQAXX9trgrfVZv8W3FUq7KAlYu+wWS5uRk/mg1s hEw+uGu1hfQQirXmoLAj102gSnyoQLQblF8nH0XI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706203857eucas1p1bae3f1c9f9b96f4a32ddd4ffe379be9a~fRFf3grll2654826548eucas1p1G; Mon, 6 Jul 2020 20:38:57 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 86.D9.05997.1EB830F5; Mon, 6 Jul 2020 21:38:57 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706203857eucas1p1b97d37ca61cda22ff7e93e08e1e01fbe~fRFffbySN2656026560eucas1p1K; Mon, 6 Jul 2020 20:38:57 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706203857eusmtrp236f696e6e99ec0ad4e2ca4d48218a66d~fRFfeX3n80640206402eusmtrp2-; Mon, 6 Jul 2020 20:38:57 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-ea-5f038be10c77 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 19.8E.06017.1EB830F5; Mon, 6 Jul 2020 21:38:57 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706203855eusmtip1f5dbb9097b7843e04c59f7fa4993d122~fRFdvIWaz1791017910eusmtip1u; Mon, 6 Jul 2020 20:38:55 +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:38 +0300 Message-Id: <20200706203743.29416-25-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: H4sIAAAAAAAAA0WSa0xTZxjH85733OioO1Y3H5nRWYPOy2TMJXumy5yGsfNBExP8oFsEOz0B N6imB5xoog1qV0CwgNHguFTwimYMLNeoqRiorCBIhthEXKcmTN2oFhqUoYxyMPv2e37P5Z+8 eUVqKOSjxB3mdMViNqUaeR1b3/ay68M/c2nSR77exVjdUUbwwf1Kiv5j/TzmPjvE4N2q1Xil oYTDwj+sDOYXPmew4XwOj3/7s1gcDDYweO+qV8CTPVkCBlsGBMzr+pngwNgTisXOIYJdZXUc vrzezGNgrILF/NFegkddNwl6jjxn8VhTI0FbjoTPLpwTsPLeXAz6b7Lo9V0W8FLoNsW6jlcE CzzVBDtt49yX8+VR5xlOrrzymJGLTt2mcpvvuCAfaS9j5JrBRkYOXOvl5XxXFZF/e5BL5YuP XvAbdN/oPt+upO7YrVhivtiqS2lzB7ldh9/a0/06IFiJX8whESJIn0D2hVI+h+hEg3SegLuq W9CKYQLlp1tZrRgikP1LEfdmxdlVS8NskM4RcHbEaxwikJUXGWZe+gC89jImvDxTquGhYayP CTdmSOugvyk0yawUDQ9PDbFh1ksrYTDLMRUwDy7+6p4IEMWICV/aGqXdnwt95cOTN0H6XYRx 3wjR5uMgz/GQ1XgGPPG4BI3nwHhTOaPxPhip7RO0ZTuB+xWHp4ZWg+vpLSEcRqXFUN0co+k1 MHr8p0kN0jS4+8/0sKYTWFh/gmpaD3abQZs2gru9Z0oDvPo3UtMy2LsfUe0JrxJ4eiifOMi8 k/9nOQmpIrOUDDUtWVE/Nis/LldNaWqGOXn5tp1ptWTip3pfe4YbSfPYdy1EEokxUm/naZKB M+1WM9NaCIjUOFO/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PUgWyzJpBsPSulYpZY7wXEnOf5/HUY5e6UgQ23Erus5W97GvHAp7djW bfjVu6JeYbjjVhORXukeFqU/27hl4taeIptvpbwl3du6OjKsIO3ZPqM+58D1DD7Es3d3KNm9 bHeqx4c0wcm/KNyU5Lrzso+7+xK/VXnqJv21pV3h2XVRA+Vbz/A3vsQumpmqGa7PjTk+ErXG RsD2jIK9MkKIUyr8cF5Q/gVz6HcsBwMAAA== X-CMS-MailID: 20200706203857eucas1p1b97d37ca61cda22ff7e93e08e1e01fbe X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706203857eucas1p1b97d37ca61cda22ff7e93e08e1e01fbe X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706203857eucas1p1b97d37ca61cda22ff7e93e08e1e01fbe References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706203743.29416-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 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