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 22931A00C5; Mon, 6 Jul 2020 22:28:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 800391DCEA; Mon, 6 Jul 2020 22:27:17 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 5F80F1DCEA for ; Mon, 6 Jul 2020 22:27:16 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200706202716euoutp01d606eeee820a90d7993651acda2ba3f8~fQ7ShPqQ82593425934euoutp01g; Mon, 6 Jul 2020 20:27:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200706202716euoutp01d606eeee820a90d7993651acda2ba3f8~fQ7ShPqQ82593425934euoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594067236; bh=1YhjGGZIH+BiDd1vuZIqrQ6NKJL1whpE3mlU+Xfl3zM=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=ThSZYqUojhpD+BaffTIyHhUS/jXbNGVx3+iFezg5hmyQM0xakemrKpKmh1i8pVn96 DLSgK4dyiqVTAtQkxRn7+yf/HKLg30C5XdizJV8VkICk+aPFepA/OmEPiQwtIF9aLT ntQOADjCAilNZ+bXKuQJyC2FHgsQnDnISNWQLco0= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200706202715eucas1p2d3d8f427b87b7400ca18f3a3596f6384~fQ7RfngCJ0114101141eucas1p2o; Mon, 6 Jul 2020 20:27:15 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 97.99.05997.229830F5; Mon, 6 Jul 2020 21:27:14 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200706202714eucas1p1b5817c2d30800b97f6c2acbe891f9aa4~fQ7Q_RiJ70814308143eucas1p1o; Mon, 6 Jul 2020 20:27:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200706202714eusmtrp2f8168597a2990ceee3e234d45d468a3b~fQ7Q9dYii3205132051eusmtrp2t; Mon, 6 Jul 2020 20:27:14 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-b4-5f0389221b1f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A9.4E.06017.229830F5; Mon, 6 Jul 2020 21:27:14 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200706202712eusmtip177ab76e21a3303b7ed204e9d3a17cb4e~fQ7PLEIhX2342423424eusmtip1d; Mon, 6 Jul 2020 20:27:12 +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:03 +0300 Message-Id: <20200706202626.28628-14-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: H4sIAAAAAAAAA0WSf0yMcRzHfZ/nued5ujl7XOgjxtyYX6uQPz5oyLBno838ZTbl8KyirnZP 5ddmDbXrJIn5cZFcXFRb1OVOykhUrjKMspHkRxJ1rjOiovOc+e/9eb3f370/++zL09rjbDAf b0iRjAZ9go5VMzceDLaG6LLomAWe9xFY3lxAsKujiMbOk69YPOI+TGF7yQqscZxTYd7rdApz 8r5S6LhiZvFz50EG+zwOCl/Wuji0PDnIoaeum8Ojj/IJdg99ovFs4QDBRwVVKhy8W81i/5CV wZyfzwgeszcSbMj+yuDJm06CmWYB3VeLOSx6OQ09nY0Mul5Uclj27TGNVc3DBI83lBNsyfyt WjlD/Fl4WSUW1fRQ4omLj2nxwYtTnJjdVECJ1/uclNh/+xkr5thLiPiw6wgtlr77wW5Qb1ZH 7JAS4tMkY9jyreq44Tcuklyq3mPpy6DSSSFvJgE8CIvhVpOFMRM1rxWuEPj42aZSBi+B5+ff +IcBAiV3B5h/T06ft9M+rRWKCQzUb1RC3wh4z55R+QxWmAMuUwHlMyYI11lwDLVRPiNQWA8V tdl/NSPMgtt9HayZ8LxGWAofMqKUgulQeu3O34KAUVzfX8kqZdOg7YKXUjKNPBztmKzo1ZCd ZffzQPjUYOcUPRV+37zg5/vhe0Ub59sHBBOBDmuGP7QC7L2tnG8HWpgL5dVhCo6Ee+lvVT4M wjho/zLeh+lRmXfjNK1gDZgytUpaB3eanvgxwPCvsYoUwa3cQCvUEnhdWcbmkumW/1WFhJSQ IClVToyV5EUGaXeorE+UUw2xoduTEivI6Ed1jTR4naR6aFsdEXiiG6sxsXSMVqVPk/cm1hHg ad0EzaoWV7RWs0O/d59kTIoxpiZI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tgvi/j2D8gnNQoCO+a9l4WG6SKu7oNsuoonOx 2CCmr55t1sfkKYI4Q1FdaEu7Q8SHhPkJ20usGdfRivAzgfTyHY7e1Ne2rJ6AS/x2VUh+GKQk 1LxN0gR+6PgacjFx9sngRJch0hj0d3RlOq+YZkH0iHlsZO3jW2fbNw9jmXmXrboi6n7ZTLea klJ57TxSlPh/kYMv6wgDAAA= X-CMS-MailID: 20200706202714eucas1p1b5817c2d30800b97f6c2acbe891f9aa4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200706202714eucas1p1b5817c2d30800b97f6c2acbe891f9aa4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200706202714eucas1p1b5817c2d30800b97f6c2acbe891f9aa4 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200706202626.28628-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 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