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 72F1CA0528; Sat, 11 Jul 2020 12:45:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5BB21D9E2; Sat, 11 Jul 2020 12:44:51 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 72AC11DA07 for ; Sat, 11 Jul 2020 12:44:49 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200711104449euoutp01acb68659be88e22c646d2f1a842627a0~grNK7nO--0814708147euoutp01V; Sat, 11 Jul 2020 10:44:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200711104449euoutp01acb68659be88e22c646d2f1a842627a0~grNK7nO--0814708147euoutp01V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594464289; bh=E9gl5DPxg/AQaI7PtF3VdpBf9QeHih+17843ABYmhz8=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=GnaU50ef6CVunUgtNbUtSYeFCI2K4j8m3nZeNqu7JjfhVzWEF01M8h6i6FRquzwa4 Vv+CZ8jMgXxHpipusG6wQm6h51rXJyMb54+AxxifPk5eAxo5hn1xsue+Z8hXRDIMup FNA7RcW98NM9kUdY3RPcr7zoHqRwc+pi+kn2hkqk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200711104448eucas1p217e76f840b95d6b44aefd051f8e983e9~grNKThiea2336423364eucas1p2R; Sat, 11 Jul 2020 10:44:48 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 12.87.06318.028990F5; Sat, 11 Jul 2020 11:44:48 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200711104447eucas1p1a81caf54288d1b9b754a80589ea5c1a0~grNJ1RB5t0930809308eucas1p1q; Sat, 11 Jul 2020 10:44:47 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200711104447eusmtrp280da0b309e366a85d6043de50542ee6b~grNJ0esyb1628816288eusmtrp2R; Sat, 11 Jul 2020 10:44:47 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-4d-5f099820963b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 42.17.06314.F18990F5; Sat, 11 Jul 2020 11:44:47 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200711104446eusmtip1ea42739fce2b3fb33c8b6dac161183c3~grNIFEXk20946309463eusmtip1z; Sat, 11 Jul 2020 10:44:46 +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: Sat, 11 Jul 2020 13:43:55 +0300 Message-Id: <20200711104414.15422-9-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200711104414.15422-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSbVBMaxyf55yz55zdad1judO/uFwrBjPIeJm/d9e4dw5jhuELGmpxVKNi duXl+lKG1VaSZBGyCqu8lFoq04Y+2LqrUqwY2dvtdqVcbUoUpdvuWXO//eb39v89Mw9PazLY YD46bo+kj9PFaFkVc/dRf930n88ow0PflAVjweNsgi3uXBqbM1+zmNJ1mMIX+UuxvOS8AjP+ TKAwLeMDhSXXkln8t/kQg53dJRQ22Z0cZjUc4rC7so3DY3XnCLYNdNB41tJDsC77jgL7H95j 0TOQw2DaFxfB47Yqgo7UDwxmlpUSNCYL2JVn5TC3aRx2N1cx6HxZzOGN3noa7zweJHjCUUCw xjikWDZB/GK5ohBzy9sp8eSlelp89NLMianV2ZR4u7OUEj0VLlZMs+UT8Y+WFFq83trHrlVt Ui3aLsVE75X0M5dEqKIennpOdqcp99dnGtkEUs4lEyUPwhw4136fSiYqXiNcI/B3opV4BY3w kYDnSJgs9BAoLk1VfE+8evaUkQUrgbw8sz/eS8Bak0J5XawwBZxJ2T5htHCbhZKBRp8wSlgF p97W+KoYYRI0JfYMV/G8WpgP6UZKvjAerhc+oL1YKSyAQc8TWp40DhovfvR1glDFg63iMCMH VoDpWysr41HQ4bD5HzcWhsou+ksPwueiRk4OJxFw5xzxm5aC7V0t5x1BC1Oh4N5Mmf4FzI5C Hw3CCHjxfqSXpodhxt3TtEyrIcmokd1aeFDd4KcBBr8GyLQIFlOtf72dQJt7YzoZn/X/KQsh +SRQijfERkqG2XHSvhkGXawhPi5yxrZdsUVk+Kc6vzl6S0nFwNZKIvBEG6C26PhwjUK313Ag tpIAT2tHq5fXOLdo1Nt1B36X9LvC9fExkqGSjOEZbaB6dk77Zo0Qqdsj7ZSk3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5MW5TX96ubeJNtHHt9 8F24P+xDByqZZXuz9vbi0o2h821hW8JHjzf7IsShxdvJdveOTO+RzG39DbbK1pUu+/Pgn/H2 DT/q1AuKtJ86D123yN3uyc1PdkslueoEfXVk5u10zxeNZVmP27yzlpGXfi1rONokWhBTIl2i oIRUnSqKNAm6f0jCPR8HAwAA X-CMS-MailID: 20200711104447eucas1p1a81caf54288d1b9b754a80589ea5c1a0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200711104447eucas1p1a81caf54288d1b9b754a80589ea5c1a0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200711104447eucas1p1a81caf54288d1b9b754a80589ea5c1a0 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200711104414.15422-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 08/24] examples/bbdev_app: 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_to_str function to example applications Signed-off-by: Ivan Dyukov --- examples/bbdev_app/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 68a46050c..ac7166bc9 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -313,6 +313,7 @@ check_port_link_status(uint16_t port_id) uint8_t count; struct rte_eth_link link; int link_get_err = -EINVAL; + char link_status_text[60]; printf("\nChecking link status."); fflush(stdout); @@ -323,11 +324,8 @@ check_port_link_status(uint16_t port_id) link_get_err = rte_eth_link_get_nowait(port_id, &link); if (link_get_err >= 0 && link.link_status) { - const char *dp = (link.link_duplex == - ETH_LINK_FULL_DUPLEX) ? - "full-duplex" : "half-duplex"; - printf("\nPort %u Link Up - speed %u Mbps - %s\n", - port_id, link.link_speed, dp); + rte_eth_link_to_str(link_status_text, 60, NULL, &link); + printf("\nPort %u %s", port_id, link_status_text); return 0; } printf("."); -- 2.17.1