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 4C913A00C5; Mon, 6 Jul 2020 22:29:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 253CA1DD03; Mon, 6 Jul 2020 22:27:23 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id DCC751DD01 for ; Mon, 6 Jul 2020 22:27:21 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202721euoutp012d57561823b63b85378905da2f06b726~fQ7Xqhdr_3113131131euoutp01u; Mon, 6 Jul 2020 20:27:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706202721euoutp012d57561823b63b85378905da2f06b726~fQ7Xqhdr_3113131131euoutp01u DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067241; bh=0KRTz2AP5FV+jHZTStTVbtq12s0MKBOah3XGntzISPk=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=Z1ItDP+i1Xh0gJvi6Qg4fCSOcC9hvncNZmcn7wcXvNPoMKFMvEjuA4zZE2DChmb4F DSHFpQyi3WCr/MdgP9nGNVrnDQHKchxBMXi6OwmTqWY6pMnMp0jdzzcV+HGqIGtPRV 4iOgglVwcbaHNJNKgTWLcSXvvhVHwy0LZEiCsiVg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200706202720eucas1p1ab61962675986a31f8d9062341dd3377~fQ7WwRkXo0894308943eucas1p1f; Mon, 6 Jul 2020 20:27:20 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5A.96.06318.829830F5; Mon, 6 Jul 2020 21:27:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706202719eucas1p1b61bd1297794e070c607c4eb916c7017~fQ7V7QW9G0323603236eucas1p1t; Mon, 6 Jul 2020 20:27:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706202719eusmtrp20e29457320cb293dda9e4dc2817b6824~fQ7V6bN4u3205132051eusmtrp2x; Mon, 6 Jul 2020 20:27:19 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-35-5f0389286346 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 7D.AF.06314.729830F5; Mon, 6 Jul 2020 21:27:19 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202717eusmtip12a7a990aa0d76c8f2133446978cf0033~fQ7UIn_oY2342423424eusmtip1e; Mon, 6 Jul 2020 20:27:17 +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:26:05 +0300 Message-Id: <20200706202626.28628-16-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706202626.28628-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUxTZxTGc+69vfe2o9u1ED1hBrPuI2iizsgfZ8umTvZxl5nFaOISo+JV b8CMzxacbolhzGFFxA1hZGpKbbOIsIUPkQIqIm7WWkRhU6gKa4wZ4qbVAkOxylpuzf57zu88 z3mSN6/Imir5RHFrdr5qyVYyzbyBazn/uGd+8h427c2GwrlU320HujXkYilQMcjT3ge7GBqo XUqn3Id1VP5nIUNl5Q8ZcteU8PRPoIij+yE3QzdP+wQ62FckUKhrWKB9lw8BDYfvsvSjYxTo sv2Ejh6fbecpGHZyVDZ5FWh/8wUgT+lDjiraWoGKSyR6cOyoQK6bSRQKXODI5z8u0M/jvSyd 6H4K9L2nHuhS8ZRu2SvypOMnnew6NcLIB470svJ5/w+CXOq1M3Lj/VZGDnZc5eWy5lqQL97a y8p1tx/xKw1rDe9sUTO3blMtC5dsNGQEnCeF3H2G7b8NuJlCKBJLQC+ilIKDle18CRhEk1QD eMfbJGjDGGCn7UBsGAU8E/yLfR65cc3JaIujgL/01MTy44BP/ujmoy5eSkafzT7tSpAaeXSH +5noIl5agaGWG1xUc9LrkcAxIaqN0tvouFILWsUcrGvonK7TR/ivwePTR01SEvZXj00fRemK iFP2Z7HA+1hpH2Y0HY93Pc2CpmfjVFt1jH+FE039gha2AQ45v42ZlmLz3z0RLYqsNBfr2xdq +D3scU3wUYzSizhwb0YUsxFZ3lLFatiItmKT5jZjp7cvhhGfPonTsIy/t1eA9j6nAVv6S5nv YM7B/7scALUwSy2wZqWr1sXZ6hcLrEqWtSA7fcHmnKwmiHxW3zPPeCt0hDd1gSSCOc4YENk0 k07ZZt2R1QUosuYE4/JLvg0m4xZlx5eqJSfNUpCpWrvgZ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9o+p8jGA/vLHRuS0Rf9N6i3dhLcrhaPTqD ojKr/GKClbwr3hqZ8KE+6ke1urd26NRG7u3+lZ57ojdbGlb0OEu8lmZti1rCFVZdtiiSRoyB q6aKHx6xBxxSXOFVGXmZGWp9bNqjsBHuz6Yu3+D0zw/rWsti/Ju0Ha44CYr1U/UHt59/vvla d+5CjpKSdHwAaZJ0/wA/weVaCQMAAA== X-CMS-MailID: 20200706202719eucas1p1b61bd1297794e070c607c4eb916c7017 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202719eucas1p1b61bd1297794e070c607c4eb916c7017 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202719eucas1p1b61bd1297794e070c607c4eb916c7017 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 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