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 49546A0526; Fri, 10 Jul 2020 09:06:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF3061DB57; Fri, 10 Jul 2020 09:03:34 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id DF7E61DB15 for ; Fri, 10 Jul 2020 09:03:32 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070332euoutp027958fb241bcf4df659d73efc9fa864cd~gUir-9SzO1749817498euoutp02Q; Fri, 10 Jul 2020 07:03:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200710070332euoutp027958fb241bcf4df659d73efc9fa864cd~gUir-9SzO1749817498euoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364612; bh=SjcxeTJpiGhJMyyglT2md+9M7XhR8AM1X0pflSOG9+o=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=RqWwoDuIMne/IxZgkyLVQN7GifSbb2caEvDXbbgS9kCpjaDvQsCPn6vi6g0BI+dxV M90Mq75M+UYcwkpRC7ny9ilSlbfwxmsBIrjYx1r4snND8/EPXG8Y/JMmbO5aq95ZJ9 zgzTgiuwyXMzxHjR53YmOqxoappQK/o8R3Qb6YjA= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710070332eucas1p19542ed7cbf5cc5d82af10cab2ea92e70~gUir0UAvk1630516305eucas1p1_; Fri, 10 Jul 2020 07:03:32 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 97.5F.06456.4C2180F5; Fri, 10 Jul 2020 08:03:32 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200710070331eucas1p283cd843b949bc84c80acc65c77d8447c~gUirLAKlP1919219192eucas1p22; Fri, 10 Jul 2020 07:03:31 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070331eusmtrp17594f13fd0d9504625acaaf1ba1a669f~gUirKFqwt1176811768eusmtrp11; Fri, 10 Jul 2020 07:03:31 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-46-5f0812c45acd Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 50.24.06017.3C2180F5; Fri, 10 Jul 2020 08:03:31 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070329eusmtip12e2f97237f904db3b5fc7fb9a573e601~gUipW0YWq1602516025eusmtip1Q; Fri, 10 Jul 2020 07:03:29 +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: Fri, 10 Jul 2020 10:02:19 +0300 Message-Id: <20200710070226.6045-22-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710070226.6045-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe2xLYRjGfeecnnPWqBy12JeRjYYEYYhLXiLmssgh/jASf0iY4pjF1klr c0+6sWW6GTYsm6WrjV3F2Lq2poQGHTWzJWxNara6jLFbZyib6XqK/5739z7P+yRfPpaUX6RD 2TjVQUGtUsYraClleuxtmvdQzsYscN+eCtXP9Ajc7SUkdFx4TUNm/ykC2iojwWoulEDOGy0B 2TkDBJjLdTR86UiloNdjJsB118FAQUsqAx5bFwNnmi4j6BruJiHfMIigSV8nAe+Dehr6hosp yP75EsFZYwMCe9YABRduWxCk6zjoryhjoMQVBp6OBgoczloGrg81k1D3bATBeXs1gsb0Ucmq 6fxPwzUJX2L9RPC5V5pJ/rHzEsNnPdET/K1eC8H33XtJ89nGSsQ/dWeSfNW7H/Qm6Tbpij1C fFyyoJ6/cqd0X621lDyQzx42mWspLbpB61AQi7nF+KHbS+iQlJVz5QibCwol4vAVYcedB4w4 DCKc97H9X6Ty1AASF2UInyx9RYvDEMJFFS1+F83Nwo4Mvf9wMHeLxubhVmJsMYmLwh2pV5kx TXEz8YfSN/6AjFuG9SmFlFgRjqtu3ifHdJCPp+mK/X45F4Zbi776j2KugcV1VSYkBqJw/+ka RtSTcLfdGNBTsSM3K3D0GP5e08qI4QyE24vTAqZIbPz83KdZluRm4+r6+SJejW+kaf0YcxNw W8/EMUz6ZI4pjxSxDGeky0W3At9/0hLAGI/8Gi9iHme+eBd4RauvNM9FnkPhBf+7DAhVohAh SZMQK2gWqoRDERplgiZJFRuxOzGhBvk+q+O33WNBQy27bIhjkWK8zDJKx8glymTNkQQbwiyp CJataXTskMv2KI8cFdSJMeqkeEFjQ1NYShEiW1T8abuci1UeFPYLwgFB/X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SDUbvlfz1JJQ6jwc0sBE rB9tqHnsiTzy8b3HWrq5aX+aWlKYGHZRPf2+HOuKiJDs5InJU3ELUV7nRssCJ0lAa5+4I7jA wtoa546mPVtj3lr7Dt0byhxxU1WD5ec7p4PDG/IaAxz7K2zdB5SJH4zDds3Ahs9st3ekV04J Oq0yijQK2r8UYf8uCAMAAA== X-CMS-MailID: 20200710070331eucas1p283cd843b949bc84c80acc65c77d8447c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070331eucas1p283cd843b949bc84c80acc65c77d8447c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070331eucas1p283cd843b949bc84c80acc65c77d8447c References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 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