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 C65D4A04C7; Tue, 15 Sep 2020 21:10:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 546A01C1F4; Tue, 15 Sep 2020 21:08:38 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 6470C1C1E5 for ; Tue, 15 Sep 2020 21:08:37 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200915190837euoutp026fc2a42ecc11a8b218ecf1f7d8caa200~1Cp4vDSyT1840518405euoutp02H; Tue, 15 Sep 2020 19:08:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200915190837euoutp026fc2a42ecc11a8b218ecf1f7d8caa200~1Cp4vDSyT1840518405euoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600196917; bh=2gXLZvWQss8NYG1Gu+w8A/KveRxMhRUfcMEnas9Mi8U=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=A21DQxpoK8gonV1zMw9w/qStU4SLiU/asJD2gx0w199bxJOe0AmA5lokGARBJevoZ RvCNK6DlvQMpHOjp1Wlq0WTmILN6jFqmXqim0KqyhPIqO8P239FeGt/9aWz49bS/a8 TiMWqULjKxSaGEmenUH0pyFFnY7/qsmR5MFe6RQE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200915190836eucas1p161949d83fe2f2fe131799b3d6a367148~1Cp4dJG640198001980eucas1p1E; Tue, 15 Sep 2020 19:08:36 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 0B.56.06318.431116F5; Tue, 15 Sep 2020 20:08:36 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200915190836eucas1p2d2806d0372be5ef08085ab7c5f4585d2~1Cp33i8021274112741eucas1p2C; Tue, 15 Sep 2020 19:08:36 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915190836eusmtrp1e1fa255456b06fb91ee4e4359a11995f~1Cp32yzmF3148631486eusmtrp1n; Tue, 15 Sep 2020 19:08:36 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-a2-5f6111348110 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A1.FB.06017.431116F5; Tue, 15 Sep 2020 20:08:36 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915190834eusmtip244af2434f7d98144415c0875698ae9b6~1Cp2FPEu91712317123eusmtip2O; Tue, 15 Sep 2020 19:08:34 +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, 15 Sep 2020 22:07:15 +0300 Message-Id: <20200915190728.18143-21-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915190728.18143-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSa0xTdxTPuf/bey+NNddC5B9cUJtNcUN8sXhCjG4+b9SYxW/bnNjpFYyA phec7lNFgsijFKiY0QWKdRGBBIVKq0KH/QBIRYWEIPFF3BICW7VWUFFQKbfGb7/nOcnJEYje xsUJh7KyZVOWMcPAadnWzsk7y5PnGVNX2mxJ2HS7GvDpYyfBYdsjDouCeQzer9+Abe4/NVj+ xMygpfwFg+66Qg7/H85l8VnIzeDDdj+PVf25PIZ8IzyW3LUDjkyNEfzD8RLwbvVVDU7evM7h 86nzLFreDgCWuroBu4pfsGi75gHMLxQxeOkij86H8Rga7mbRP9TCY+NEH8Grt6cBy7qaAHvz P2i+Wyy9dfylkZxto4xUUdtHpM6hSl4qvlXNSFeeeRjpuXeAkyyuepB6nhYRqeHfN9wP2p+0 6w7IGYeOyaYV6/dp088M2uFoj3D8RtW3ZnjCFYIgUDGZPq6JLgStoBfrgDpCr4lKxoGe7J/g VfIS6D8XgjONqNmGz/0oYlwEWnQvBCqZAPqgbRjCKU5MoP6CaiZsxIhXOOqeGmTCRrS4hZZ6 X82GWPEr2ny2kw1jnZhCnd1uXl2xkDZc7iBhHDWj918bmNX1YjwdrBmfHUrFboEOnZwkamEz Ha0viuBoOtbligz6gvorilm1cBpoWWsLrxIr0FP2QCS1gbr+u8OH70HEZbTp+gpV/p6Wlgc0 6pnm0vuBeWGZzMDy1nNElXW0IF+vpg2041Z/RKZ0+t0cVZaopeZS5EDtQC+fs7BWWFj1eZcD oB5i5RwlM01W1mTJvyUpxkwlJystaf+RzGaY+VX/+64JD3infvWBKIBhjs7xYF+qXmM8ppzI 9AEViCFGt7HXv1evO2A88btsOpJqysmQFR8sE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kUUwRTf/7MNrLPwtlND3vOZceU6S55MusTcq9vW0p 1uJVOZ7NVUdyQovGW3/Mrk89VKzTuw64KhcUDsvBzTX0QFcZjWyBT5LUflE7AzrmlhaUmVd3 fgr4cTIyd995cTEoJrww9W9N4ExwRTYV0Dy/KS9Qe8Qnqq3QkvIl/2FEU9u8IzppuvlXxKRD SUgJgmoHbpKEf7E0YcAIAwAA X-CMS-MailID: 20200915190836eucas1p2d2806d0372be5ef08085ab7c5f4585d2 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200915190836eucas1p2d2806d0372be5ef08085ab7c5f4585d2 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915190836eucas1p2d2806d0372be5ef08085ab7c5f4585d2 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200915190728.18143-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 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