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 3DA7CA00C5; Mon, 6 Jul 2020 22:41:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBEAD1DDC4; Mon, 6 Jul 2020 22:38:57 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 898701DDBF for ; Mon, 6 Jul 2020 22:38:51 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706203851euoutp01438931d82220fba9b2b9ac70c9231dfc~fRFZ8dib-0553305533euoutp01m; Mon, 6 Jul 2020 20:38:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706203851euoutp01438931d82220fba9b2b9ac70c9231dfc~fRFZ8dib-0553305533euoutp01m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067931; bh=SjcxeTJpiGhJMyyglT2md+9M7XhR8AM1X0pflSOG9+o=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=cdENy7ewfLUnwZ7gbXFLzYN8vTP8dutN2z+hKsggMpmczHM598gzPIzuXhX4oCV5g Txnora6EcsZWJtWpXOwLmvkrx5AbBtSpIiIZenS7bDeIkY7kfouqqU/dpAcqOkbo/P NghrPkIb1vnUl3GpkFtSg6FojS6KP1oo38YSArFg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706203850eucas1p2c42a088aecee98376ef174c6f5f0be31~fRFZKO42L2126421264eucas1p24; Mon, 6 Jul 2020 20:38:50 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 34.D9.05997.ADB830F5; Mon, 6 Jul 2020 21:38:50 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706203849eucas1p2b573ab867439ead5c864cc7638649079~fRFX9Ur_F2127421274eucas1p27; Mon, 6 Jul 2020 20:38:49 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706203849eusmtrp247217959ba8fa44962e3eca2adb72359~fRFX5nQtE0640206402eusmtrp29; Mon, 6 Jul 2020 20:38:49 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-e1-5f038bdab54a Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D4.8E.06017.9DB830F5; Mon, 6 Jul 2020 21:38:49 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706203847eusmtip1c716ffb8431841cf1ecf8b2a69964e24~fRFWH4-fC1500415004eusmtip11; Mon, 6 Jul 2020 20:38:47 +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: Mon, 6 Jul 2020 23:37:35 +0300 Message-Id: <20200706203743.29416-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706203743.29416-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0wTWxSFc2amM0O1ZKwkbNGgNj6uJorXq8mOGvGByfwx4Y+a+LjQKyM2 ApoWVDQqIYpIKyigiI/yiopALlUKhaYawEfB4gWqXBStIjEx+OJhiaCgUqbGf2d9a629T04O T6tz2BBel5Ao6RO0cRpWydQ8GGld1GWko5ZYPNOwssVMsOdlCY3duR4Wjf3HKXxaFo4O22UF Zr9KoTAze4BCW2kGix+6Uxn8NGij8MVtF4cX3akcDja+5fB06yWCb0ff0Zhf+Jlgq7lagSMN dhb7RosZzPzaQTDL2kTQaRpgMLeulmBahoD9N65zWPIiFAe7mxh0PavisGKoncbqljGCZ52V BB+l/VCsmS1+LbyqEEscvZSYU9ROiw+enedEU7OZEm9+qqXEvjsdrJhpLSPiwx4jLZa/GWYj lVuVq2KkON1+SR+2Olq5u8pxjd6Xzx+ssVUxKeRfNoME8CAsgxG3m2QQJa8WSgmYPO8ZWXgJ eBzlCll8JuCtG6Z+VdpTW1jZuE6gyn6FlsUQgSceG+NLscIf4Eo3Uz4jSLjJgm20c6I+VYiA e8aK8QbPM8JcOFer8mGVsAJM+R2cvGEmlFvqJyIB4/zK/RAfVguh0FngnRgJQgsPjqFMIucj wHuh13+7qfDOafXPmQE/6gr8/DB8udXJyeV0Ai+LT/hD4WB9/x/nW0YLC6DSHibjtWCtt0xg EALh6ccpPkyPH7Nr8mgZqyA9TS2nNVDf7PZjgLFvk2UswkmnlZJf5zaB4rFq9gyZefH3rkJC ykiwlGSIj5UMSxOkA4sN2nhDUkLs4p1742+R8a/q+u701hL76D+NROCJZrIqnaWj1ArtfkNy fCMBntYEqdY9cv2tVsVokw9J+r1R+qQ4ydBIpvOMJlj1V3Hv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MtAOwqjJ1XWQ/jUYOnOy1HJ/e80/raJ zduvjNp7y+fhrS0bP7Rsifab/T5ww5OSH8NbR6oyAvhdaYZTpmm/fpX/iczN3tiauVPR7fUr 44JsL21RMa6yruhHRw94X1M/OFYUW236ubgmU7QpYbn6tAHNemNc1Lk9/vgy8YeikiF794iv TE4IiRplIK4XNH8BnJlDoAUDAAA= X-CMS-MailID: 20200706203849eucas1p2b573ab867439ead5c864cc7638649079 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706203849eucas1p2b573ab867439ead5c864cc7638649079 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706203849eucas1p2b573ab867439ead5c864cc7638649079 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706203743.29416-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 21/25] 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..84fe374c4 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_strf(link_status_text, 60, NULL, + &link); + printf("Eth%u %s", eth_port_id, + link_status_text); break; } } -- 2.17.1