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 9C32BA04C7; Tue, 15 Sep 2020 21:11:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 910CC1C201; Tue, 15 Sep 2020 21:08:46 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id D74D21C1FE for ; Tue, 15 Sep 2020 21:08:45 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200915190845euoutp020cef812fd625a46e73565b8de2bf629a~1CqAsjI4j1839718397euoutp02L; Tue, 15 Sep 2020 19:08:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200915190845euoutp020cef812fd625a46e73565b8de2bf629a~1CqAsjI4j1839718397euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600196925; bh=j+whVyosWgx3tIoE9UeDWIlBQDtqfd9P5No4AWJHtMw=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=I0nRPvLbQwycBfct5TRJx4ScnhpbWrNZTkGYPOQKimVBwhZLZFsheHnBbxjApiob9 4JvdLUVk2ppO7fQ1UQc4A4Gx7+Jp+c+DdDv811o+srqDq/ddvWrntPngOHciQlXnzi ggJSkrJadwQZsVKWcO+ePIrIWLmTRVbcDxRs7gZ0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200915190845eucas1p2faa012bbb1613cc09beca63cce8a0456~1CqAP40tC1703717037eucas1p2m; Tue, 15 Sep 2020 19:08:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 18.63.06456.D31116F5; Tue, 15 Sep 2020 20:08:45 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200915190844eucas1p15a2a2b9f2226d5fd315c7c8e0a484e5f~1Cp-TW4lp3106731067eucas1p1B; Tue, 15 Sep 2020 19:08:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915190844eusmtrp1ad8f660b2b57f3cadbcd0149a21e90ba~1Cp-ScUax3148631486eusmtrp1y; Tue, 15 Sep 2020 19:08:44 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-9a-5f61113d7c27 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4C.FB.06314.C31116F5; Tue, 15 Sep 2020 20:08:44 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915190842eusmtip29babc8b6cb17e4a47d72ae90f6a38798~1Cp9ihaAe1759817598eusmtip2S; Tue, 15 Sep 2020 19:08: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: Tue, 15 Sep 2020 22:07:18 +0300 Message-Id: <20200915190728.18143-24-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915190728.18143-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUzMcRzH9/k9dzr7dVhfz5x5nuThj8/M82x+ZsNm/smok58yXcedIhvy FE5Pl7CKE8eQh1C6zip1m4q7tKIVQpoxpSIXSqKfX+a/z+f1fn8e9tlHoHWp3Ahha/RO2Rxt iNJzGqagvPvJjAUBhtBgRz2HuV47YPNrB41N6a84PPH5MIUNOYuwyHmWxbQ38RQmp32h0HnV yuGnpoMMtnc6KWws9vCYWXuQx073Bx6TqrMAP/S20JiR/RWw2n6Pxe6y+xx29F5kMLmnDjAl vxKwIvELg+muQsAEq4ifr13h0dE4BjubKhn0PM/j8UZXDY33vL8AbRW5gFUJv9nF46We7Mus 5Cj6SEknL9TQUvnz07yU+MhOSXfaCympo6SOk5Lzc0B63HyClq6/+8Gt0YRo5m+Wo7bGyuaZ C8M0kTn2jdtvDNpdXdzLx0OSnxUEgYhzSWOeZAWNoBOvAsl84WKs4Nef+IB0tG1Qha9AWlJ8 vCIoBa7vd0E1XQHyNl2jmrqAlDTbWEXgxCnEc8xOKcJQ8Q5HnL31lDJuiLiaHMnYongYcSKp q0xjFKwV55HXRbPV/mPJ9dultBL79eNaVx2vzhpD6s/7/rYk4jOB+I4eYdWCZaT4XTmtxkNI S0X+wKKjiOdkIqMWHAViK8jj1SQVyKGstgHXIpLf+oRXtqDFqST3/kwVLyFdPzJY9USDSUNb gILp/jCt4AytYi05lqBT3XpS+qh2ABPy66e/iiXS7XKx6nmKgVRdOkSnwtjM/7OyAXIgUI6x GCNky6xoeVeQxWC0xERHBIWbjHeh/089fRWdhdBVu8kNogB6f232y7BQHWuItcQZ3UAEWj9U u7TKs1Gn3WyI2yObTaHmmCjZ4oaR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6Xr9ynoaN4oxAlCgmD434dJZd5JiMwJ8KZzInLj6Mm2uoyo 6TofNtUiDs037lkfntX658HHt7ZlaK/60qZVI/z2a3R0+ovGpflLMsuKkm1B23avyi1SuD9C Xe7DjV2nbYXJpaQlKmz6dM63X4MDY70pjs07Nsw+vrG1b5/D66K1e9eWh77Z7Lzbxzw8fP0i fRbvLM5uVxJiDM8uwQ0i/xdc4GerBwMAAA== X-CMS-MailID: 20200915190844eucas1p15a2a2b9f2226d5fd315c7c8e0a484e5f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200915190844eucas1p15a2a2b9f2226d5fd315c7c8e0a484e5f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915190844eucas1p15a2a2b9f2226d5fd315c7c8e0a484e5f References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200915190728.18143-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 23/24] 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_to_str 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..347737cb9 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[RTE_ETH_LINK_MAX_STR_LEN]; 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_to_str(link_status_text, + sizeof(link_status_text), &link); + printf("Port %d %s\n", info->id[portid], + link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1