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 B7AE4A00C5; Mon, 6 Jul 2020 22:30:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52A911DD42; Mon, 6 Jul 2020 22:27:39 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 124711DD31 for ; Mon, 6 Jul 2020 22:27:37 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202736euoutp0102f8f77461ad00381795ce28fc73bee6~fQ7lyhMyz3113131131euoutp01v; Mon, 6 Jul 2020 20:27:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706202736euoutp0102f8f77461ad00381795ce28fc73bee6~fQ7lyhMyz3113131131euoutp01v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067256; bh=SjcxeTJpiGhJMyyglT2md+9M7XhR8AM1X0pflSOG9+o=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=tqI8nvknbfKxp/0YL43QHpozjBf2a2PS0gv3DiP1STglfHkFj5eqLDqTIafmvtDAD 3zcYF8bGYECJ9Pdo8PUGvrb4JbnihZU3CEITePzSHZ+fF07A5r89AuWx2RsS4vPCE2 iBElivvWDnj3spHU97R7IiKXFMgw3zQs3lqKCIqc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706202736eucas1p20f77ccbd7a30548a3801a5f112958dac~fQ7lIMCAz2938529385eucas1p2G; Mon, 6 Jul 2020 20:27:36 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B7.B4.06456.839830F5; Mon, 6 Jul 2020 21:27:36 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706202735eucas1p29df73c3a0bf8a49a7969e4f18b05348e~fQ7kNsS8S3131531315eucas1p28; Mon, 6 Jul 2020 20:27:35 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706202735eusmtrp274b7e62a9bf28db2bb1f0007cfcd9fd9~fQ7kM1ckn3205132051eusmtrp24; Mon, 6 Jul 2020 20:27:35 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-18-5f038938f8a5 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 04.BF.06314.739830F5; Mon, 6 Jul 2020 21:27:35 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202733eusmtip1b31e2091a451902303ab4f1b8bf090d8~fQ7ieeR8H1560515605eusmtip1c; Mon, 6 Jul 2020 20:27:33 +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:26:11 +0300 Message-Id: <20200706202626.28628-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706202626.28628-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0xTdxjG855zes6hocuxmPjqvMxmM45tOsOWvDFzeMHkRL8s2cVEs7JO T5BYimvBifswgq5BtMAqkSiuIgSFYsaghVYuTtnCxVKI3QyYKCNIMDgFARsBKY56avbt9z7P 817yz19k9Wf4FWK6JUuxWkxmA6/lmjpm+z6gk2zqhwO3NFTX4wIaHqxkaajkPk+nnp5gaMCd TK2+Cxpy/pPLUKFzkiFfdQFPj4fyOBqf8jF0ry0g0PlQnkBT7Q8FcvSVAT2cf8TSufJpoD5X o4ZmbzbzNDFfwVHh3B2gIm8XUOfpSY5KrvmB7AUSPa25IlDlvdU0NdTFUeCuR6Cr4dssNfZE gH7urAMK2l9qtq6V58qrNHJl6xgjn7l0m5U77p4V5NPdLkauH/cz8sT1O7xc6HWDfGv4FCvX jszwn2n3aj85oJjTjyjWjZ9+oz3oab3MHj4nHm3yebhc+JUvgDgRpY/QH5llC0Ar6qVqwCf+ SUEtngEuFHe/SumlacCg8+PXHY78/ljoCmAkWANqEQb0tLRx0RQvrcdAvouJGkuleh598/1M 1EiQUrC26gJEmZPewdH7biHKOmkz/mK/Kqgr1mDtbzfYKMct6n9OeGJnrMb+i89eDUWpR8Si 0bBGbUjBlpliRuUEfNTpjQ1aiS+vXYzpP+DzBvVulPIBByt+ioWS0ftv7yKLIiu9i3XNG1V5 G1Z1jTBRGaU3cODJkqjMLqKzqZRVZR3m2/Vq2oA3ukMxGTHyIl5FGUciierztAFer+lgimHN +f9XlQO4YZmSbctIU2ybLMr3G2ymDFu2JW3D/syMBlj8qoGFzik/hEPftoMkgiFeNySyqXqN 6YgtJ6MdUGQNS3XbgwGjXnfAlHNMsWamWrPNi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NwQBBSBfG/j2DlPhko2u/cFh1WOiMXO5u7M+6HhH0Z /+6TGhUhL0a6kM3htSuje+udosVryrT77srARX9K6h33Q68e9SqPED5Vi5GFe+QFx+3dB623 onsm7JNx23Bn63TFYPWqzP4o+6v9+xtOWKLaL3eprcNrF/oWZoV1Je/4qSQ9lmwd2hjjMfy+ 47CKkhL1mhWkKOn/Ag7GfmQIAwAA X-CMS-MailID: 20200706202735eucas1p29df73c3a0bf8a49a7969e4f18b05348e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202735eucas1p29df73c3a0bf8a49a7969e4f18b05348e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202735eucas1p29df73c3a0bf8a49a7969e4f18b05348e References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 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