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 CF84EA0528; Sat, 11 Jul 2020 12:47:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D38A1DADC; Sat, 11 Jul 2020 12:45:25 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id C94F51D983 for ; Sat, 11 Jul 2020 12:45:23 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104523euoutp02419e78e00e9cd5e6ebaef2252a311fe8~grNrAOlSb1781817818euoutp02d; Sat, 11 Jul 2020 10:45:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200711104523euoutp02419e78e00e9cd5e6ebaef2252a311fe8~grNrAOlSb1781817818euoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464323; bh=tDOhNsNqYHwuHfP7ogSVHuRwK5Yiu32YOkgqAdAwbZU=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=pnw6kzFnqXncGqMPL8EM+W9XSQqn7N156rgriMu2zm9bwVmVyb0K1OdiLHwVFPoV5 /i+q2Glbj7F1ZQ6Etd8eSAgRJXL7ObLSPzVK3x0SXOsjJ2SkXVZr4qRzHKDLgrZIsU 4zdwyiV1DRrV7FbIzWAJIZ1vcZpR3wKJ397n7bYc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200711104522eucas1p1c8ad7635e5e596327f72b410c24f8252~grNp_52HM1645216452eucas1p12; Sat, 11 Jul 2020 10:45:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id DA.87.06318.248990F5; Sat, 11 Jul 2020 11:45:22 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200711104521eucas1p26cd821c97bf13ecf045dd4419b9576d2~grNpaZUA42332923329eucas1p2a; Sat, 11 Jul 2020 10:45:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200711104521eusmtrp24e8fbe4ae58eac334802b6e0d22859fa~grNpZjpfW1628816288eusmtrp2b; Sat, 11 Jul 2020 10:45:21 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-75-5f099842f2f1 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 30.27.06314.148990F5; Sat, 11 Jul 2020 11:45:21 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104519eusmtip1937a97a1fc417c336df09cfa6951278c~grNnmqNNH1304313043eusmtip1p; Sat, 11 Jul 2020 10:45:19 +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:07 +0300 Message-Id: <20200711104414.15422-21-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: H4sIAAAAAAAAA0WSWUwTURSGc2emM0O1Zqwk3KBirNG4RNSg8cQYQeRhYjSgRhM1CgVGILK2 gLg8ECMEC7IJLqi0ggQsKC4tUFyCdUEpiJKwGUBcEgRRoC1BEETawfj2n+//zz0nJ5cl5bm0 OxsRHS+oopWRClpKVb0ab17re8UlcH1b7WKobCxE8LmnmITevG4a0ofPEdCh94bH1dclkPsx mYDM3BECqss0NAz2nqXgp7WagK4nFgYKWs4yYDX3MXCh+RqCvskBEq7qbAiaC40SGH9WS8PQ ZBEFmROtCLIMrxHUZ4xQkGeqQZCq4WD4dikDxV0eYO19TYGl8yEDFaPvSTA2TiHIqa9E0JQ6 LfFZyk/oSiR88eN+gr948z3Jv+q8xPAZbwoJ/v7PGoIfetpK85kGPeIbPqeTfPnXX3SA9JB0 a6gQGZEoqNZtC5KGW0wv6Vgtm/StW8ckIwOtQSyLuY04fypCg6SsnCtDOC37HC0WdoSv9udQ YmFDuKpOz2iQi7Nj2t5DObScK51JXdolhkYRvlBWTjgMmluJLWmFhMNw5e7TuHqy3Wks4Pxw tvGyU1PcctzQoHfuIeO2YFveHnHAElx+r450aJcZPDX0jhSHeeB2rd35JubesbhvPGN2Iz9s tHfRol6AB+oNs3wRnjZpCVGfxmMP2hmxOQ3hnqKU2ZA3Nnx/yziWILlVuLJ2nYi346wPTYR4 o3m448d8ByZnZG7VZVLEMpyWKhfTClz3pmUWYzz1e66IeWyyZpDieZ4g/OLRbzIbLSn4P0uH kB65CQnqqDBB7RUtnPBUK6PUCdFhniExUQ/QzE+1/KkfrUFPJ4PNiGORYq5Mp2QD5RJlovpk lBlhllS4ynybLEflslDlyVOCKiZQlRApqM1oI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Glrs4/8hPTEqArblfVkUtM/X WRqYvz16fln2VHGk1VJePEo1NHZHyxREQI9/wsjlVD4gemlE7U3y2c4Njvasdp9+4nbIsqiy jGt+PhnZ5WzU+0Tb59ZVcQOV9frTl3Z0+e4v2fst9JhaV6gKV3dw3nt+tyjkQRs6Vi4+q0zV jHWplIQYr+XW4AZR+w/lDerUCAMAAA== X-CMS-MailID: 20200711104521eucas1p26cd821c97bf13ecf045dd4419b9576d2 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104521eucas1p26cd821c97bf13ecf045dd4419b9576d2 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104521eucas1p26cd821c97bf13ecf045dd4419b9576d2 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 20/24] examples/ntb: 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/ntb/ntb_fwd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index eba8ebf9f..1cbaace58 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -729,6 +729,7 @@ start_pkt_fwd(void) struct rte_eth_link eth_link; uint32_t lcore_id; int ret, i; + char link_status_text[60]; ret = ntb_fwd_config_setup(); if (ret < 0) { @@ -747,11 +748,10 @@ start_pkt_fwd(void) return; } if (eth_link.link_status) { - printf("Eth%u Link Up. Speed %u Mbps - %s\n", - eth_port_id, eth_link.link_speed, - (eth_link.link_duplex == - ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); + rte_eth_link_to_str(link_status_text, 60, NULL, + ð_link); + printf("Eth%u %s", eth_port_id, + link_status_text); break; } } -- 2.17.1