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 AE056A0526; Fri, 10 Jul 2020 09:06:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0FAC1DAE7; Fri, 10 Jul 2020 09:03:38 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 74E761DBD7 for ; Fri, 10 Jul 2020 09:03:35 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070335euoutp01a758b968a1dfddc3806528dd8603a211~gUiuXD-Tk2063820638euoutp01Z; Fri, 10 Jul 2020 07:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200710070335euoutp01a758b968a1dfddc3806528dd8603a211~gUiuXD-Tk2063820638euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364615; bh=XtbX4XCFxTlmDt9RDrOth1o/sdpob+sTnBAjVCFknHA=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=ieEsW+z1xZu2b2mRa1OilbNvSGO5od4uDtegQmZZAhSdrq4FXmhbw7KyA7636W1Yq bxAXE10rvY9ArXyV2p5QozO+G28vOM7hsBkwB+xfjbuwjhsZSXSbE/YOk7qtge5BXL AI2zl1pI6OAgyJTSe1sIRZB5UxNFhArnIAQO1w8g= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710070334eucas1p1ad5cad0a04c3964dade53aecd36f89be~gUiuF3e5m2360423604eucas1p1F; Fri, 10 Jul 2020 07:03:34 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 69.51.06318.6C2180F5; Fri, 10 Jul 2020 08:03:34 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200710070334eucas1p258799bbf66182b11ca29d69b78bb3b9c~gUitetfmW1919619196eucas1p2u; Fri, 10 Jul 2020 07:03:34 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070334eusmtrp19c3bf9abc274d38fdf4a5c49784871fe~gUitdp_Ky1113611136eusmtrp1g; Fri, 10 Jul 2020 07:03:34 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-fa-5f0812c641ec Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C3.24.06017.6C2180F5; Fri, 10 Jul 2020 08:03:34 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070332eusmtip1250f88601665b42bec14ecdac9876935~gUiru6EZ41544015440eusmtip1n; Fri, 10 Jul 2020 07:03:32 +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:20 +0300 Message-Id: <20200710070226.6045-23-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: H4sIAAAAAAAAA0WSfUwTdxjH/d1d745i53k6feIWDE1MBgx8w+UxWdTNRW/JTEww2VsYVL0A EQq5E51bQgjhLQVRgW0RSUUaRQvKYECrokFiQCwvAWLADBCVl1AFFYGtFpyUq9l/3+/n+7zl lx9Pi8XsOj7BfFRWzKZEI6tnGlo8XeEtIh+zqd4didXtVoJPhmw0DhcPspj3MpPCfvtObHSU 6rDwUTqFBYWvKHRctrD4fDiDwalpB4UDt1wclvRkcDjdPM7hya5zBMfn3TSeLXtNsMtar0PP nRssvpgvZ7DgzQOCp+ruEWzNf8Vg8XUnwWyLgC+vVHBoGwjC6eF7DLoe/sVh1Ww3jfXtCwTP tFYT7Mj+T7crWHpTdlEn2RonKKnoQjcttTz8nZPy26yUVDPlpKQXtx+wUkGdnUj3n+TRUuXI v+x+/Q/6zw/LiQnHZGXjjlh9/LBbSXmu/7k3M5NLJ495CwngQYiEuVE3sRA9LwqXCZwpGPKb GQIZb3M4zbwm0JlnY963FHkG/EEFgafOAVYzswT6z1VxvipW+ARcuVbKF6wWalhwzPdRvmCV 8A3cnPCyPs0IG2Cmt2RprEHYDnbHDKWtWA+VfzbRPh2wyLMs5UtDRSEI+s7PLA0FoZ2H32pG Oa3hK8hp+5vV9Cpwt9b5+cfgKsr33/0r/FPbx2nNuQSGyrP8RTuh7lnnouZ5WgiB6hsbNfwF jDz1Mj4MwgfQP7nSh+lFWdjwB61hA+Rmi1q1EZraevwYYMG7XMMSXLff9L9PI4EpZw45TdaX /L+rjBA7WSunqklxsrrVLB+PUE1Jaqo5LuJQclItWfyrrrets05ye/5gMxF4YlxuiF1gY0Sd 6Zh6IqmZAE8bVxu+7HD9JBoOm078IivJM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ov4iV0ksbIneK4VM7wfw6j/IKyUH1r4/awG3M5EYFx1jstoaej/HfT FnvIgdf5qQ++f6HUKF43lDjg9psYtvRsOh6/y34uEK9eNyXXRmbnnTuqHCcX9+UHvoul5kt7 r94UbOirzDwb/bp3w7Bkekx6UGU9fO+bMrarcf/MxtXdvPmhao3LqmgND6qIKa2bDjWvKHsn JfhkjXwTbuA1fwA1c0MABwMAAA== X-CMS-MailID: 20200710070334eucas1p258799bbf66182b11ca29d69b78bb3b9c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070334eucas1p258799bbf66182b11ca29d69b78bb3b9c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070334eucas1p258799bbf66182b11ca29d69b78bb3b9c References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 22/25] 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_strf 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..bd10014a0 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_strf(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