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 D2FA7A0528; Sat, 11 Jul 2020 12:47:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91BDC1DADD; Sat, 11 Jul 2020 12:45:27 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id DA1A51DADD for ; Sat, 11 Jul 2020 12:45:26 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104526euoutp015c35e200b289591cc95bd2ac9609f42b~grNt1yfNU0814408144euoutp01i; Sat, 11 Jul 2020 10:45:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200711104526euoutp015c35e200b289591cc95bd2ac9609f42b~grNt1yfNU0814408144euoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464326; bh=lyPYYv+FI1NhKaZeG18eiYzafVNNzcJQqm8MPr4Fj1k=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=sgBfSbwMLPuvtNMblILR/nVOxsdQLQt1+2JlQwE/Umdj0qrQYFA/WkOJA9aE7B0mQ K05lQp465Yp/W1Kowp0wEhJ74++fFdOWgG+FPHimAniL/zIGkvC/kcJAPb7bmE2zTN KqUPSB9PRs4PwY9LAjozzLpb6xcYSfTlAW4IoU0E= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200711104525eucas1p20d520e1ad0098cad551f8194ed8aad2f~grNs7siIk2338123381eucas1p2m; Sat, 11 Jul 2020 10:45:25 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id E4.2F.05997.548990F5; Sat, 11 Jul 2020 11:45:25 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200711104524eucas1p264572a08051556632b4c603907a5f9ac~grNryoRGN1984019840eucas1p25; Sat, 11 Jul 2020 10:45:24 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200711104524eusmtrp1fe156e498306d6f3cfb5493743b292f7~grNrxxXtl2954729547eusmtrp1D; Sat, 11 Jul 2020 10:45:24 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-71-5f0998459d38 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 43.96.06017.448990F5; Sat, 11 Jul 2020 11:45:24 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104522eusmtip1bd731c96339e4979c0a142ab538cb059~grNp_seE31304313043eusmtip1q; Sat, 11 Jul 2020 10:45:22 +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: Sat, 11 Jul 2020 13:44:08 +0300 Message-Id: <20200711104414.15422-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200711104414.15422-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUxTVxjG8957e+9tseaumnlSicYuRjQBP5O9MYuo0eVGTdyfhuiwygWJ tJpWdGJcCEGsBRkCmR+YUttsAhoKWFtkyIA/gFIQ60QgQcYcrOIHVEARBDbKxey/5/k973ue k5PD05oCVssnG09JJqM+RceqGE/TZEf07mvK+A3WgjXoarMBvuhz0thf+JzF7FAmhd1lsVjr vanA/D/TKczNf0eht8TK4pv+DAaHR70U9j70c3jjSQaHo41BDi93FAEGp1/ReN0+Bthhu6/A yYYaFkemHQzmTnUC/uRuAWzOecdg4YNqwCyrgKHS2xw6e1fgaH8Lg/6eexzefR+g8X7bDOCV Zhdge9a/iu2rxCn7LwrRWTtEiQW3ArTY1PMzJ+b4bJRYOVxNiSN1nayY6y4DsfVFNi3eGfjI fqeKU32TIKUkn5ZM67cdVh0bzOxVnAypfhiYamfTYZC3As8TYQt5fVFrBRWvEUqAhKrqFbIZ B+JqGaJlMwakxuOeM8r5jYmZq4wc3Abyt20IZPMeSJ3PqQhPsUIU8VtsVDhYKlSyxDvdRYWD JcI+4v3oZ8PljLCa/N4aEcZqYSt5YykHuWEluVNRP9+mnOMzI4/ntUZYQbqKx+fPJEIbTy5V VFLywi4SKA6wsl5CXjW7OVlHEn9BDiPrc2SiqouTly1A+hwXFoZiifv1Iy58IVpYS1w162W8 g2QXdTPyIy0m3W+/CGN6TuZ7rtIyVhNLlkae1pF635MFTMjMp0UyFknFX7ULz/MQiKNvAPJg 5Y3/u+wAZbBMSjUbkiTzJqN0JsasN5hTjUkxR08YqmDuq/pnm8eroWb6SCMIPOgWqe16Pl6j 0J82nzU0AuFp3VL1znb/9xp1gv5smmQ6EW9KTZHMjbCcZ3TL1JsdQ4c0Q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6jfPzSUOqEM3dwlaI1/HZQwEftSZfb kVtKRBmRLa6QbdhwLvr1ckEzpoigItn6T+Vbt5HNBdoV9QL1oOCpO3uxYWlPzJuxKmWZ63KF +4qic8lxPjB3XsfO9GUhh76XznmhPFa/aKhyUDe5wXSw//rBBqPu8Paoot3G6LyG5prIRve2 9C4VISbo2SBcEPX/AMis8bMHAwAA X-CMS-MailID: 20200711104524eucas1p264572a08051556632b4c603907a5f9ac X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104524eucas1p264572a08051556632b4c603907a5f9ac X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104524eucas1p264572a08051556632b4c603907a5f9ac References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 21/24] example/performance*: 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/performance-thread/l3fwd-thread/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 84c1d7b3a..8e1492dde 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -3433,6 +3433,7 @@ check_all_ports_link_status(uint32_t port_mask) uint8_t count, all_ports_up, print_flag = 0; struct rte_eth_link link; int ret; + char link_status_text[60]; printf("\nChecking link status"); fflush(stdout); @@ -3452,14 +3453,9 @@ check_all_ports_link_status(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", - portid, link.link_speed, - (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); - else - printf("Port %d Link Down\n", portid); + rte_eth_link_to_str(link_status_text, 60, NULL, + &link); + printf("Port %d %s", portid, link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1