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 CB620A04B5; Thu, 10 Sep 2020 21:37:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D22781C1C4; Thu, 10 Sep 2020 21:35:14 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id F36921C1BA for ; Thu, 10 Sep 2020 21:35:11 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193511euoutp02d40930cbed655b835d771b64dc0b6eba~zgyqjN9Fh0501005010euoutp02Z; Thu, 10 Sep 2020 19:35:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200910193511euoutp02d40930cbed655b835d771b64dc0b6eba~zgyqjN9Fh0501005010euoutp02Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766511; bh=2gXLZvWQss8NYG1Gu+w8A/KveRxMhRUfcMEnas9Mi8U=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=Y3Q6a/tixzqo/c+imhjaaQVTJd1u5spb/OLmy6BitJ2fbndZRHDbaI51lkI8uEE8v 1ZsqteRARRozbFD9BZ7m42t/5X1kmb5aep0H2buMas9aeCjNqCJfX5uGUBkMK7rXez Q8ohPisfmWbVHoI3D2YRgO903hkEOJ9+TvRFXf3E= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200910193511eucas1p2b351985ac601f814a20e609c58d21ea3~zgyqWJRb-2535025350eucas1p2l; Thu, 10 Sep 2020 19:35:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 17.E5.05997.FEF7A5F5; Thu, 10 Sep 2020 20:35:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200910193511eucas1p17bb96c3bc79b54d1e567eeba1c13a293~zgyp_A0MP2936129361eucas1p1f; Thu, 10 Sep 2020 19:35:11 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200910193511eusmtrp2be659774284f6cfd32d895d5e44b67e9~zgyp9LKAc1027210272eusmtrp2_; Thu, 10 Sep 2020 19:35:11 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-d0-5f5a7fefec8b Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 8A.19.06314.FEF7A5F5; Thu, 10 Sep 2020 20:35:11 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193509eusmtip2a4309dfd5830e94086e63d0603407504~zgyoNfaWr1654016540eusmtip2K; Thu, 10 Sep 2020 19:35:09 +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: Thu, 10 Sep 2020 22:33:53 +0300 Message-Id: <20200910193400.15326-21-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200910193400.15326-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0xTZxjH85zTnnPaWHNWjD5DI1s3jZcoY9PsCVtw7mKOiTN+8BMJYjeO eGnRtILDxcF0FgTGABUzKgVBBaoZOJCbt9pELpZKJCF4QUFlAVGs3ByXKqMct337v7//78nz 5s0rsPosLljYEbdXtsQZTQZOq6puGL+1wpcUGf3R360hVN7iAHr8sJil7mMPOEp/+QtDd5xr 6HLNSTXldCUzlJkzyFBNaRpHz7sPqujFUA1DnVc8POW1HeRpyN3L06+tdqBefz9LvxcOA7U6 Lqpp/Ho9Rz5/kYoyJ9qBfqtqAmrMGFTRsbpaIFuaSC/LSngq7lxIQ91NKvLcreTp/Ohtli62 vAbKbiwH8tqm1F+8L00UnlFLxZefMtLRU7dZqeFuLi9lNDsY6cKLWkbyXW3npMwqJ0g3H6ez 0rmeMW6TNlL7eYxs2pEgW0Ijtmq3H+mww56bwg+X8lYnQxeXBhoBxVX4yH4N0kAr6MVSQG+O XR0o9OIIYKkvUSmGAZMnmv+b6OnLYBSpBDD1VZQijQLe8AzPSJy4BD2pDiZQzBEvcFjj75iZ CBK/wYFXY9OSIKjERdhWMYN1YjgOue+xyoIQPFfhYgOKZpo/6oxSdi3EjoIRRlFaBDzpX6fk r3HKXqZWchD2N1bxSl6AU3UFM1dAMQUwu7qSVw5ZgIfsA2+tNVj17BYfWMaKS7G8PlTBa/GP 8nwmgFGcjXcG3glgdjrmVJ9gFazDVJtesQ3oam57ixFfT85SsIRHB8/yyutcAawYs3FZEJL3 /65CACfMk+Ot5ljZ+nGcvG+l1Wi2xsfFrvx+t/lPmP6nnjeNI7VQ7//ODaIAhlk6V3hktF5t TLAmmt2AAmuYo/vS69m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7N ayCY1wRqAheDcpo8hXscruCitEZxryjGi4b/OYJ19zEj3ZFvuM88Z2vz3MTcWN9eT1jFerv5 0VOzNKZ1foqkK2kv5iWvTfNPenJ5je5OflnQen4guTUhhQ7Jmj57T9eP7AJb1iWDV7h5y76Z 6yzjCeeuNbSt9qSV/bPOZ7V/vutv3v0secOMdMv8ns5h9em2FE920429HZtXhDVlhHsteJr3 RklJ0VrejzRI2j9GE3H/BgMAAA== X-CMS-MailID: 20200910193511eucas1p17bb96c3bc79b54d1e567eeba1c13a293 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193511eucas1p17bb96c3bc79b54d1e567eeba1c13a293 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193511eucas1p17bb96c3bc79b54d1e567eeba1c13a293 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index eba8ebf9f..6d9b3b45c 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[RTE_ETH_LINK_MAX_STR_LEN]; ret = ntb_fwd_config_setup(); if (ret < 0) { @@ -747,11 +748,11 @@ 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, + sizeof(link_status_text), + ð_link); + printf("Eth%u %s\n", eth_port_id, + link_status_text); break; } } -- 2.17.1