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 B91F1A04B5; Thu, 10 Sep 2020 21:37:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FE261C1C0; Thu, 10 Sep 2020 21:35:20 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 31E2A1C0D1 for ; Thu, 10 Sep 2020 21:35:18 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200910193517euoutp02ab7296b144697dd24c5c08a88f4cc92a~zgywSnMR60501005010euoutp02a; Thu, 10 Sep 2020 19:35:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200910193517euoutp02ab7296b144697dd24c5c08a88f4cc92a~zgywSnMR60501005010euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1599766518; bh=qVSmYkun2k36EKGsPQLrlSwrALp4hWMj7WN7omI+2SA=; h=From:To:Subject:Date:In-Reply-To:Reply-To:References:From; b=llT6cxWrLtKFJlwHqTfZa3JNb+FVXgoIa5i3BCB0/vDJsfNgWjBbhJ19FLwqFsICq sAjMk7CFI5mNrcS7d2ljIq6y2SCOJMDEsYA+ON3b/EabJ2+4Q2ayxa2XY66lu4zhuC QYqM3RmgsOOAvCM4GRtcXoTPjXN1BNPv/C2Cv4Zo= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200910193517eucas1p2a72e5eed27e0da0f938ca11a95728456~zgywHKIU_1147811478eucas1p2u; Thu, 10 Sep 2020 19:35:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 2D.42.06318.5FF7A5F5; Thu, 10 Sep 2020 20:35:17 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200910193516eucas1p2daa9595821a02db7dd85df1e6c57eda3~zgyvF-FiP2616126161eucas1p20; Thu, 10 Sep 2020 19:35:16 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200910193516eusmtrp12e3de895e928a8f3ca9175146054fbe2~zgyvFL-YG3165331653eusmtrp1I; Thu, 10 Sep 2020 19:35:16 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-65-5f5a7ff5425f Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C0.AA.06017.4FF7A5F5; Thu, 10 Sep 2020 20:35:16 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200910193514eusmtip28093e286e034c80af1224205c7817357~zgytWj5y-2570425704eusmtip2H; Thu, 10 Sep 2020 19:35:14 +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: Thu, 10 Sep 2020 22:33:55 +0300 Message-Id: <20200910193400.15326-23-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200910193400.15326-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUxTZxTGc+69vfdSrbsWjAdlkjWZ82PqjErOyDJ1anLjnHH/kiBWuUEj oGuF6ZJlDA3TgnwJKrrUIllAMGFIKahAsIkUVhRFibAhVONsYAql2DihnVIuZv895/c85zzJ m1dk9aX8IvFA+hHFlG5MNfBaztH+5u6qwE8JSZ9NXfqUarusQE8HK1jylDzmKdd3gqG+6o3U 3PirhoqHshjKLx5nqLHKwtMLTzZHo/5GhgZa3AJd6MkWyO/0CnS6+yKQNzjCUpltAqjb2qCh N7du8DQWvMxR/mQvUIG9A8iVN85RyfUmoByLRL4rlQJVDCwhv6eDI3d/vUBXA/dZaugKARW5 aoHu5LzVbPpInrT9ppErmocZ+Uz5fVZu7z8ryHmdVkauG21i5LHWXl7Ot1eD/MfTXFauefYv v0uboP0iWUk9kKmY1ny5R7u/MtAAhx9oj9rbnzNZ4BMtECGitB495ZOsBbSiXqoCnHC9BnV4 Bfi346xGHSYAz3UE4P2KN6uPU41KwKGO0tlUANBaNawJp3hpGbpPWpmwESXV8dgYfMSEjUjp a+wp/3PmFCd9jCHLXzNaJ8XjiYpBVq2IxZrf26a1KEZM8ycDiWGsl5bgo0uvZm6i1CViy7NS Ts1vxeCLkEbVkTjisguqjkH3mTxOXfgFsMhRL6hDIeDxiy9nUxvR/s9dIdzGSsux9sYaFW/G 83UWLoxRmod9L+eHMTstix3nWBXr8GSOXk0bsK2zZxYjhqbmqljGkanx2fdtAay/18sXQuyF /7tsANWwUMkwp6Uo5nXpyverzcY0c0Z6yup9h9KuwfRndf/nCjRBa3CvEyQRDHN1bfEJSXqN MdN8LM0JKLKGKN1Xd9y79bpk47EfFNOhJF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RrQb5Uepa275HRqToTd4Tjsjjj/zqMCgjORcfFicciD4dufek8vLL5ZP0i 72xT1XSdZVuZRrJKfSDae6Md+kvcH7vdSxbY84kdv7dkNbctdAxHh/UVW9ZlhPYExWtVDnOE R6RIiDl9VVO/cyxi8Wa3ZTDvj22XoFn12mkqNRdFaWeT6S71kg3ZK8K2TuZEqdzX7YFdNedc YwNygk/TKSNxI6/7C4saggEIAwAA X-CMS-MailID: 20200910193516eucas1p2daa9595821a02db7dd85df1e6c57eda3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200910193516eucas1p2daa9595821a02db7dd85df1e6c57eda3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200910193516eucas1p2daa9595821a02db7dd85df1e6c57eda3 References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200910193400.15326-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 22/24] examples/qos_sched: 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_to_str function to example applications Signed-off-by: Ivan Dyukov --- examples/qos_sched/init.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index 9626c15b8..06328ddb2 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -76,6 +76,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp) uint16_t rx_size; uint16_t tx_size; struct rte_eth_conf local_port_conf = port_conf; + char link_status_text[RTE_ETH_LINK_MAX_STR_LEN]; /* check if port already initialized (multistream configuration) */ if (app_inited_port_mask & (1u << portid)) @@ -160,14 +161,9 @@ app_init_port(uint16_t portid, struct rte_mempool *mp) "rte_eth_link_get: err=%d, port=%u: %s\n", ret, portid, rte_strerror(-ret)); - if (link.link_status) { - printf(" Link Up - speed %u Mbps - %s\n", - (uint32_t) link.link_speed, - (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex")); - } else { - printf(" Link Down\n"); - } + rte_eth_link_to_str(link_status_text, sizeof(link_status_text), &link); + printf("%s\n", link_status_text); + ret = rte_eth_promiscuous_enable(portid); if (ret != 0) rte_exit(EXIT_FAILURE, -- 2.17.1