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 8B7B7A00C5; Mon, 6 Jul 2020 22:40:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3604E1DDA3; Mon, 6 Jul 2020 22:38:36 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 23BAE1DD8E for ; Mon, 6 Jul 2020 22:38:34 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706203833euoutp011de154ea70a353e41c6abff11c548425~fRFJs93t31241012410euoutp01D; Mon, 6 Jul 2020 20:38:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706203833euoutp011de154ea70a353e41c6abff11c548425~fRFJs93t31241012410euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067913; bh=0KRTz2AP5FV+jHZTStTVbtq12s0MKBOah3XGntzISPk=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=mymvvG2sv/LCk2eD5zPjceuJ00bJsd7DPWTrR0kI+Nr9zK/FUTpaKBS1UBGuQnCRq ZxBuYopCZBZoP/NAy5hSlhnC+AFSeH5RwNAULXIsDA62bVfoHvfDHyTouUqgY3YVbr jML401B5Xx5oQ0mDhrHvv2i/2qF9Xomjfwu/rMMU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706203832eucas1p2aced045d018bb42f72dc380b6dd5b6ff~fRFIk0QbG2126421264eucas1p2z; Mon, 6 Jul 2020 20:38:32 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5A.C6.06318.8CB830F5; Mon, 6 Jul 2020 21:38:32 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200706203832eucas1p2e73d9cadd71c3c3bf564b80e75ea8e75~fRFIMaajR2099120991eucas1p2v; Mon, 6 Jul 2020 20:38:32 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706203832eusmtrp2cc41335fc52d95c47650cdf6fa79434a~fRFILowH00640206402eusmtrp24; Mon, 6 Jul 2020 20:38:32 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-39-5f038bc8c78a Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CE.DF.06314.8CB830F5; Mon, 6 Jul 2020 21:38:32 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706203830eusmtip106e83353854920df7bc4406458bc12db~fRFGUhe_E1560515605eusmtip1D; Mon, 6 Jul 2020 20:38:30 +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: Mon, 6 Jul 2020 23:37:29 +0300 Message-Id: <20200706203743.29416-16-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706203743.29416-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUxNYRzH95xz7jmny7XjZvNbXprrZWSKhf0YkrGdP2zMP16GXDoSdePe Qpi1pqSbUM1L6krRpdgtbp1QIdOLi6hRTLksQ1KJRrm3dJ3Mf599X57vs2cPT2vTWB8+3BAt GQ36CB2rZkqr++pn1ZrpkNlu52S0PbYQfN+aR6Mzo4VFc/cRCpsLgrBczlJh2ts4ClPTvlEo X0lmscMZz2Bnj0zhmwoHh5kN8Rz2VH3k8Hj9eYIfXe00nsv5TrDeUqLCvvu3Wexy5TKY2v+C 4Al7LcGalG8MZtwqI5iYLGD3VSuHeW8mYo+zlkHHq5scXut9TmPJYzfBUzU2gk8SB1VLJ4n9 OZdVYl75Z0pMv/icFqtfnebElDoLJRZ3llFiV+ULVky1FxDx0XszLRa2/WJXqzeoF4VKEeF7 JWPAki3qHc7cO9zu4+r9D5tlKo7E88nEiwdhLhR2mFXJRM1rhSsErp+1Mx5DK/wgcD9hrWJ8 JyAXVZB/DeuvS6xiWAlkxecP13sJ2PpklSfFCtPBkWShPMYYoZgF2dVEeQxvYSWUfsriPMwI U+Gl2/K3oBEWQuaRblqZ8IXContDzPNeQ3r2Qx/lShOh6cKPv2eC8IwHs/sro+SXw6PKhGH2 hvYaO6fweBi8dYFS+CD8vNHEKeUkAq25CcOhILB/ecp5xmhhBthuByhyMBQ1mlmPDMIoaP46 2iPTQ5hWeoZWZA0kJWqVtA7u1TUMywDu3yMVFOFdb4jyOhUE0vtbqZPEN/P/VA4hBWSsFGOK DJNMgQZpn79JH2mKMYT5b4uKvEGGfqpjoKa3jFS6tlYRgSe6kRonT4doVfq9ptjIKgI8rRuj WfbEsVmrCdXHHpCMUSHGmAjJVEX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xNUemG/IKQIuv85gnH3zUQx62v6clMMF3Ztue29uCh4 j89cbKwKY85uavhufBFjL12y4rc1ZSBWsqplQdDhym8+lrXRCeaRqGYqmXMDx9Z7R3TVbwXu QMYAcTTd4XkobUvZ9KGLgeU7A+5PVKdntcdWWHGgWbEhY6Gmc2A4YPdDN/+TknvWnOG4eXNi aP2mQY4SE1XKJaROVP0BJi0DSgcDAAA= X-CMS-MailID: 20200706203832eucas1p2e73d9cadd71c3c3bf564b80e75ea8e75 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706203832eucas1p2e73d9cadd71c3c3bf564b80e75ea8e75 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706203832eucas1p2e73d9cadd71c3c3bf564b80e75ea8e75 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706203743.29416-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 15/25] examples/l2fwd-crypt: 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/l2fwd-crypto/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 827da9b3e..7648ea027 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -1734,6 +1734,7 @@ check_all_ports_link_status(uint32_t port_mask) uint8_t count, all_ports_up, print_flag = 0; struct rte_eth_link link; int ret; + char link_status_text[60]; printf("\nChecking link status"); fflush(stdout); @@ -1753,14 +1754,9 @@ check_all_ports_link_status(uint32_t port_mask) } /* print link status if flag set */ if (print_flag == 1) { - if (link.link_status) - printf( - "Port%d Link Up. Speed %u Mbps - %s\n", - portid, link.link_speed, - (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); - else - printf("Port %d Link Down\n", portid); + rte_eth_link_strf(link_status_text, 60, NULL, + &link); + printf("Port %d %s", portid, link_status_text); continue; } /* clear all_ports_up flag if any link down */ -- 2.17.1