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 5D0EAA04D9; Tue, 11 Aug 2020 10:58:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 850961C1EF; Tue, 11 Aug 2020 10:53:43 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 1A2861C1C2 for ; Tue, 11 Aug 2020 10:53:41 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200811085340euoutp0243c20fddc9a9a811d1329f2ab61c411d~qKr__FsVR0724507245euoutp02p; Tue, 11 Aug 2020 08:53:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200811085340euoutp0243c20fddc9a9a811d1329f2ab61c411d~qKr__FsVR0724507245euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1597136020; bh=SmiMTd0WaHVmbH+/Z7cpYx5nxYplTVxbf/UObRyYs1o=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=aWvXd7F2hO12V6fGJ9onZh/wNBOSHFssIcJX005l34yQR93ZVR8BaJYDBQjZyb04y DZnHW5zh1BaJiGIJoQ2D6UgNpOSzhL2ivLshUzNZ41SptXo4bkXSo0yFhpxy6CngdT x37Rr5G1u6nV8FarrG1juu7emB5gIHSS+1fXx/s4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200811085340eucas1p18cda1b5d78089a5bc390d5ff8202ea22~qKr_t2ECQ1584815848eucas1p1I; Tue, 11 Aug 2020 08:53:40 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 13.3C.05997.49C523F5; Tue, 11 Aug 2020 09:53:40 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200811085340eucas1p133dfbd6a70d75c7a4c7ddb285d9cddf4~qKr_QLJJP1585815858eucas1p1S; Tue, 11 Aug 2020 08:53:40 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200811085340eusmtrp18947bbc95e8f2de98e2d2bbeb094b9d6~qKr_PRYLk1680216802eusmtrp1N; Tue, 11 Aug 2020 08:53:40 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-05-5f325c9460d2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F8.6D.06017.39C523F5; Tue, 11 Aug 2020 09:53:40 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200811085338eusmtip1763e1d81ed9248af180f68a8730fc074~qKr8XyOtc1801618016eusmtip1V; Tue, 11 Aug 2020 08:53:38 +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: Tue, 11 Aug 2020 11:52:39 +0300 Message-Id: <20200811085246.28735-21-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811085246.28735-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUwUZxDGO7t7u8uFM+tByoQ2GjZpYk0qRZpmog2UxqQbbSJRExNTi2fZ nlZAuAVb/ItQpeZERMAPQI+vKh4YUTk+RUBMOOAOKaaCJKhIqMQPRBEpULTl2Gv63/P8npl3 JpNXZM0n+VBxb1KqakuyJMi8kavvnOv7pODbtXGf/tkmU43XATT6oIKlkYL7PB19eYihe1XR 1NJw1kB5DzMYysl7xVDDRTtPz0cyOXox1cDQ8A2PQEV3MgWa6hgX6FhfMdD4wlOWCktfA/U5 6gw0d7OZp8mFco5y5u8CHXd1AbmzX3FU0NQIlGWX6KWzUqCK4RU0NdLFkWeoVqBLb/pZqvO+ BTrhrgHqzfrH8GWYMl963qBUtDxhlPyyflbpHDolKNndDka5+qKRUSZb7/JKjqsKlJ7Ro6xS PTbLxxp3GL+IVxP2HlBt4VG7jHuKBroMyV7x55nOdj4DRng7BIgofYaZY3+BHYyiWboI2HJ/ itPNNGBv/1l/8hrw1jlforcU5wwwelAJ2FRyxW/eAA6d9jK+Kl5ahZ4jjqUgWLrKY8PC4FIQ JG3Asgtewac56SNsnnQubiKKJmkdPptL0SesxOor7axPByzi6uKHS9osrcDBkumlN1HqErF8 7BajN2zAY48nWV0H4VO3S9D1h+jJz+b0hl8BT9TXCrrJBfyleMJfFY2uZ7cF3xas9DHWNIfr OAZLWp0GH0ZpGd6bWO7D7KLMqz/N6tiER7LMerWM7d13/Bjx7d+BOlawrtbhv88NQGe+B3Jh ZdH/s0oBqiBETdMSraq2Nkn9aY1mSdTSkqxrvt+feA0WP6vnnXu6EZoXdneAJIIcaEpeHxFn NlgOaOmJHYAiKwebvur1fGc2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ukzP+92GUSJqLXDOSx4G7lwfOWnPfHQ59Vh2nyzw3 GR+1LCby7Br1yBLn9/7fznMaZBBpHyYeurV0jSalcFS6/W+ZKj/xmrTde2mfZqhyXc+uvc+q 7C1BwV6nyO5xJtXtkwYJUmL07ZsdZ94n61pD3Aez4o5vsiTUhKE9tsDYL68OhKmb565Wu6/L CD5Nq9iAG3ntPxKgPzsHAwAA X-CMS-MailID: 20200811085340eucas1p133dfbd6a70d75c7a4c7ddb285d9cddf4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200811085340eucas1p133dfbd6a70d75c7a4c7ddb285d9cddf4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200811085340eucas1p133dfbd6a70d75c7a4c7ddb285d9cddf4 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200811085246.28735-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v9 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..abb05a612 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[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), NULL, + ð_link); + printf("Eth%u %s\n", eth_port_id, + link_status_text); break; } } -- 2.17.1