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 0380DA04B5; Thu, 10 Sep 2020 21:37:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C64ED1C1D7; Thu, 10 Sep 2020 21:35:22 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 295B21C19B for ; Thu, 10 Sep 2020 21:35:21 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193520euoutp010ebb452407cf38dd161fe190ade6deed~zgyzFkgmf0119101191euoutp01g; Thu, 10 Sep 2020 19:35:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200910193520euoutp010ebb452407cf38dd161fe190ade6deed~zgyzFkgmf0119101191euoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766521; bh=j+whVyosWgx3tIoE9UeDWIlBQDtqfd9P5No4AWJHtMw=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=YuOjogYvanVmmGMhy3eIaQClHFg3eJ/odC5afxqfinz1i1RuCEJbaHzycGtlR+P9E nIBp+JBPbZI6+JOkW8/i+GQj0xaQwcRxScRCTytuXsR2ST0/2ApQuDTX9O30RX28R0 wtT9Ath9iE3jKGqlzRU1ABas322o6k4984DFV88Y= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200910193519eucas1p11eaf030c28b88c2bc78dd6a48448e7e5~zgyyEaNx90487904879eucas1p1w; Thu, 10 Sep 2020 19:35:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7F.42.06318.7FF7A5F5; Thu, 10 Sep 2020 20:35:19 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200910193519eucas1p10e3d3b0496590dfc30e41259f068c62f~zgyxtkr570322703227eucas1p1z; Thu, 10 Sep 2020 19:35:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200910193519eusmtrp20f250d53e330878249d3824e2a46defd~zgyxsg16w1027210272eusmtrp2A; Thu, 10 Sep 2020 19:35:19 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-69-5f5a7ff7d7c0 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CE.19.06314.7FF7A5F5; Thu, 10 Sep 2020 20:35:19 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193517eusmtip29796d40e83728a03518708f3b2e13ec7~zgyv8czFo1654016540eusmtip2M; Thu, 10 Sep 2020 19:35:17 +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: Thu, 10 Sep 2020 22:33:56 +0300 Message-Id: <20200910193400.15326-24-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200910193400.15326-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0wTaRSG/WamM0OlZqwmnFWDsXGD60bxsiYnuFEhmswP422jUTZSuzoB FSppxVV/7LKotdZaAesNSUGJIsUEUaBgWgIoIhZFiFrMAotkEwIKFQSlWlTqYPx3zvO+3zlv Tj6eVmexM/jd+v2SQa9L1rBKpuJ+4PGC93/Haxd1ti3AkiYHwe7OAhq77B0snnxzlMI250p0 u3IVmP1fOoW27EEKXdctLL7uymBwYMhFYbvHy2FOawaHQ3U9HJ5qvkSwJ9hH48X8twSbHeUK DNTeYdEfvMKg7cMzgqfLHhBssA4yaK+qJGiyCPimqJDDgvZIHOp6wKD3xW0Ob4y00FjeNEYw q6GE4CPTZ8WqOeKH/KsKscDdS4lnLrfQ4v0X5zjR2uigxNKBSkr0Vz9jRVuZk4gPu0/SYvH/ o+wGZbzy111S8u4DkiF6xQ5lktORkHpj8sFmT5BLJ6fCLCSMB+EXeH7sJmchSl4tXCfg7/AR uRkmUNXom1DeErBnWblvT+x362lZKCRgCgwzcjNCoDivhQ65WGEeeM0OKiRMF0pZcAV9VEiY JqyHJvdrRahmhB/hQubA+FieVwkxcO8TL2+YDcU3a+gQDhvHL9u3h7BaiARf3jAlW57wcOGp FLKAsBo6urfKeBr0NZRN5JwFn6vyviYA4TiBrIrbnNxkEjhyqX/CtRLKXj3+GoEWfoKSO9Ey jgVr5QlWnj8F2vqnhjA9XmZXnKdlrAKzSS27NVDT2DqBAcY+hstYBNeRHEo+joeA09qsyCSz c77vyifESSKkNGNKomRcqpf+XGjUpRjT9IkLd+5LuUXGP6r3U8NIJakO/lFHBJ5owlU1MfFa tUJ3wHgopY4AT2umq+IeeRPUql26Q4clwz6tIS1ZMtaRmTyj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54/wwv89jPJTWVFkWJ3jWcP+ojj/p833d4pL lzTtMdxAkyNS3rv3wRvL8+ta3WXdUjeR/+Ne5UnW+HK0Wjuwe1obmbAjsVOK7x013VwYvyBl 0/F+w5ChSxX0oSm0WXBvW+VM0NXviCgspQKOG1W7atLrXNYl962qzcGBuYf6Cm/ltcc/SQ74 JYtdqSbEZD27AhdE/V/czTLLBgMAAA== X-CMS-MailID: 20200910193519eucas1p10e3d3b0496590dfc30e41259f068c62f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193519eucas1p10e3d3b0496590dfc30e41259f068c62f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193519eucas1p10e3d3b0496590dfc30e41259f068c62f References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 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