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 B24A4A0526; Fri, 10 Jul 2020 09:05:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 884AD1DDC8; Fri, 10 Jul 2020 09:03:13 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 2520D1DDBE for ; Fri, 10 Jul 2020 09:03:12 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200710070311euoutp014bd93e56914439af51884f987a5eaf48~gUiYkWm4l2059620596euoutp01Z; Fri, 10 Jul 2020 07:03:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200710070311euoutp014bd93e56914439af51884f987a5eaf48~gUiYkWm4l2059620596euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594364591; bh=1YhjGGZIH+BiDd1vuZIqrQ6NKJL1whpE3mlU+Xfl3zM=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=hdULp/RYzS1Hq4AxIQO8eNzRhS9zQwNH08N6AB+Y2bLB6bfLnTnH4/IKYO52hacmp aKgCWcx/f95lgQgWm1F1JHTTj9FusD/+a5SqlJU+b2+CfHotAK/iR09CvJxyClcxUy 7fufVYuP83rmJvF75Cm9bdvpt7u22JRRDWERAzlY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200710070311eucas1p23e713d35f432df6f102126ce3f713dbe~gUiYVU6C22518125181eucas1p2W; Fri, 10 Jul 2020 07:03:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 59.4F.06456.FA2180F5; Fri, 10 Jul 2020 08:03:11 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200710070311eucas1p1f7b48a83f9976449006af9bf453204d1~gUiX-e7GN2075420754eucas1p1G; Fri, 10 Jul 2020 07:03:11 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710070311eusmtrp1c5aece4373c8ed22622ea491a233d9ae~gUiX_Rnx_1176811768eusmtrp1T; Fri, 10 Jul 2020 07:03:11 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-12-5f0812af6427 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 41.14.06017.FA2180F5; Fri, 10 Jul 2020 08:03:11 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710070309eusmtip1339679f8fd94dce7a43e4af542ae668c~gUiWPqiuT1544015440eusmtip1i; Fri, 10 Jul 2020 07:03:09 +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:11 +0300 Message-Id: <20200710070226.6045-14-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: H4sIAAAAAAAAA0WSe0xTZxjG855zes6hUncsGL6o0VlDspmoEF32SrxMoslJdInMJcuWKFY9 ASOgaQFvcTYq2JSLs6JD3ABLHAhmRaG0KN6aaIFKDY0MGBUrmoBMuVSIykClPTX+97y/5718 efLxtLqIncPvzsiUdBnaNA2rZBruv/Mssar55LizVV+i9UEpYF9vBY3+oscs5o2coLCrei02 2f9QoPmJgcJC8yiF9ioTiy/9xxgcCtgp9N10c1jiPcZhwNnPYcHDC4D9k4M0ni9/Dfiw1KbA d3evszg8aWGwcKID8FR9M6Arf5TBokYHYK5JwJHLlRxW+OZjwN/MoLu7jsMr4+002h5MAZ52 WQHbcj8ovlsoTpRfUogVTS8o8czFdlq8332OE/NbSinx6pCDEodvdbBiYX01iK19ebRY8/wt u1n5i3LVLiltd7akW7ZmuzJ16qkb9tUoD5QM5VAGKOdNwPNEWEFyy741gZJXC1VAHv1tpuRi DMjEiWZWLl4DqR14rjBBRGii/Z+ntGxUAnF2tIRHxoEY/BOhLlb4iriNpSEjWrjKEvtkJxU0 ooRNZOB4AQQ1I8QST5+VDWqVsJJ4jb2cfGIBqam9Qwd1xDTPMVlCXC3MJ51lY6GlRGjmyT2f M/ym9cQzYAjrKDLoqg8vmkfcZ/IZWR8mb651cvKwEUivJSfctJbU/+fhgnHQwtfEen2ZjNeR Z8U2hZzSTNL1alYQ09PS3PA7LWMVMeaq5W4NudPiDWNCpv6PlLFIjI9vcHI+TUBOGqvhN1hQ 8vlWOUA1xEhZ+vQUSR+fIe1fqtem67MyUpbu3Jt+Dab/qvu9K+CAce8OJwg8aCJVjg9sslqh zdYfTHcC4WlNtCqxzb1NrdqlPXhI0u1N1mWlSXonzOUZ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L2BKLJd91dFLBoS6Ca4v tuizeY/DlXv9TKtnbtvAbHsk7ifUTEb45qXXtM/mWwY7HjU3JQbc28j2XFj9AG/7EJMfd+7K j7zEOqqqO4YLNlXerM6x6739ae6dod/0KyZuO/k/XarXixJ2mFsI/ka5w1F48pHeF9Q31GXh KUmvU60gTZLuH34zq60JAwAA X-CMS-MailID: 20200710070311eucas1p1f7b48a83f9976449006af9bf453204d1 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200710070311eucas1p1f7b48a83f9976449006af9bf453204d1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710070311eucas1p1f7b48a83f9976449006af9bf453204d1 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200710070226.6045-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 13/25] examples/ipsec-secgw: 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/ipsec-secgw/ipsec-secgw.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index f777ce2af..551838229 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1775,6 +1775,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); @@ -1794,14 +1795,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