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 8B119A0526; Fri, 10 Jul 2020 09:07:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E44561DE82; Fri, 10 Jul 2020 09:03:43 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 4AC741DC12 for ; Fri, 10 Jul 2020 09:03:40 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070339euoutp0272e38ef46a73e3efb84be21bd57f489a~gUiyu-BJ31749817498euoutp02V; Fri, 10 Jul 2020 07:03:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200710070339euoutp0272e38ef46a73e3efb84be21bd57f489a~gUiyu-BJ31749817498euoutp02V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364619; bh=WQh0/xZ8D/8NSNS0F/gifzw1wCeRoFQ4rQBL4QRJi0A=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=hH5VC8tYQ/DqGkcpRkgVCyV8BwaBc4qxzblJgpxCFQvGvUQizWYPpSuCqeCJTaPiF roJUGtXfe8ZztdYS6yrWLNJ2vAaJj8QmID16CeUKN+2Jj0kiV2K2Oi2iy1cEImRkYz 5Xqdhz3ah3wIFJOjoGXhFMQYjFUHnBD0z+wnG7k0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710070339eucas1p1d09877b0b7bebf5687cded645be2376a~gUiykUzR82075420754eucas1p1p; Fri, 10 Jul 2020 07:03:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F1.61.06318.BC2180F5; Fri, 10 Jul 2020 08:03:39 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200710070339eucas1p1ccde344530fd438e001e6cc41f2a6236~gUiyQTWvr2075420754eucas1p1o; Fri, 10 Jul 2020 07:03:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070339eusmtrp11569da88314659b5cda6d71a09093d9c~gUiyPdjuI1176811768eusmtrp1G; Fri, 10 Jul 2020 07:03:39 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-06-5f0812cbc63d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 79.24.06017.BC2180F5; Fri, 10 Jul 2020 08:03:39 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070337eusmtip10a42ccdeb0d39d915180a237769a0116~gUiwdssmd1465514655eusmtip1Q; Fri, 10 Jul 2020 07:03:37 +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:22 +0300 Message-Id: <20200710070226.6045-25-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: H4sIAAAAAAAAA0WSXUxTZxjH855zes6hs+askvFEF9i6uChRcGMXj5mKGl3OhYu72qIGocpJ IUJxrbjhLkQYBMqHUtmHqIAlCqIRkWqrAlYgFCiWj4QBCyJhLAiiWBQRKDjKqdnd//n9/89H 3rw8rS5kV/Px+mOSQa9N0LBK5k7zrHujS81Hb/p7NhSr2osJDg+W0ThU+JjFnJe/UthXGYm1 tgsKND9JpTDf7KHQVmFicWIojcEXUzYKB+pcHBZ1p3E41TDKYV7HeYKj3nEaz5W+IthRfFuB sw/vsTjptTCYP9dD8LS1haAz18Ng4V07wUyTgC+vlnNYNhCMU0MtDLr6azi8Pt1F4+32BYIF ziqCjzLfKbZ/Ks6VXlaIZbVjlHj2UhctNvf/zom5rcWUWP3CTomT9T2smG+tJGLbcA4tXht5 y36n3K/cEislxB+XDOHbYpRxzY4pxdGMD37uXJzkUskQbyIBPAhfwXDBX4yJKHm1UEGg29xF y8VrAvO2Z6xcvCLQNTaneN/S1PaEyEY5gfvpdf7UNIHcmqecL8UK68CVVUz5jEChmgWbt3ep 4PlVwh7oKQ/2ZRhhLTgdI6xPq4TN8K7jOS1vCIFrNx3LOmCJZ5gsyzPVQjD0lrxenglCOw/n 3DVEbtgFLaNuRtarYNxp5WT9MbjO5vr5LzBzq5eTm7MIDFoy/KFIsD5zc77jaGE9VN0Ll/EO cFy+SPswCCuh7/mHPkwvSfOdP/xYBVmZajmtAUdrtx8DLMyvkLEI/3QWcfLz1BLIHrQqzpCQ ov93lRJSSYKkZGOiTjJG6KWfwozaRGOyXhd2OCnxFln6q65F57Sd1HsPNRCBJ5oVqpgFNlqt 0B43piQ2EOBpTaBq5yPXQbUqVpty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/KMilqvXhMFDNF3f8cRrt5G5DnYvx3awdj/unOe+waSF5mB3x7 XzrU/tRZNtP0Zl90acPYwWbLk86pgN33y2pmP7YWK9vNg3OG9TFrx4s+BYb+8JHPXa+OV+0t shwcHt5jOydbSDQdu8wHrtTmbY6MraU3FC7ujjGl9QUdLjAM7g+w+dLFcT4W/YGuYDLmysQp npBS1cotuE5S/wFZ79WcCAMAAA== X-CMS-MailID: 20200710070339eucas1p1ccde344530fd438e001e6cc41f2a6236 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070339eucas1p1ccde344530fd438e001e6cc41f2a6236 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070339eucas1p1ccde344530fd438e001e6cc41f2a6236 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 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