From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0832.ocn.ad.jp (mogw0832.ocn.ad.jp [153.149.234.33]) by dpdk.org (Postfix) with ESMTP id 19D42199B5 for ; Wed, 6 Dec 2017 09:19:57 +0100 (CET) Received: from mf-smf-ucb017.ocn.ad.jp (mf-smf-ucb017.ocn.ad.jp [153.149.227.66]) by mogw0832.ocn.ad.jp (Postfix) with ESMTP id 03A0D480238; Wed, 6 Dec 2017 17:19:56 +0900 (JST) Received: from mf-smf-ucb017.ocn.ad.jp (mf-smf-ucb017 [153.149.227.66]) by mf-smf-ucb017.ocn.ad.jp (Postfix) with ESMTP id DB69840603; Wed, 6 Dec 2017 17:19:55 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb022 (mv-mta-ucb022.ocn.ad.jp [153.149.142.85]) by mf-smf-ucb017.ocn.ad.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id vB68JsEE018028; Wed, 6 Dec 2017 17:19:55 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.167]) by ntt.pod01.mv-mta-ucb022 with id iYKr1w0033dLKTM01YKrho; Wed, 06 Dec 2017 08:19:55 +0000 Received: from localhost.localdomain (sp49-98-150-93.msd.spmode.ne.jp [49.98.150.93]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Wed, 6 Dec 2017 17:19:51 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org Cc: ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp, gerald.rogers@intel.com, sy.jong.choi@intel.com Date: Wed, 6 Dec 2017 17:18:25 +0900 Message-Id: <20171206081826.67688-6-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20171206081826.67688-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20171206081826.67688-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 6/7] spp: change type of counter to uint16_t X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 08:19:58 -0000 From: Yasufumi Ogawa Counters of uint8_t for ports should be changed to uint16_t. The name of counter 'i' is also changed to 'count' to be more explicit meaning. Signed-off-by: Yasufumi Ogawa --- src/primary/init.c | 9 ++++----- src/vm/init.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/primary/init.c b/src/primary/init.c index 7a15e9b..2630783 100644 --- a/src/primary/init.c +++ b/src/primary/init.c @@ -134,8 +134,7 @@ init(int argc, char *argv[]) { int retval; const struct rte_memzone *mz; - uint8_t i; - uint16_t total_ports; + uint16_t count, total_ports; /* init EAL, parsing EAL args */ retval = rte_eal_init(argc, argv); @@ -177,11 +176,11 @@ init(int argc, char *argv[]) /* now initialise the ports we will use */ if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - for (i = 0; i < ports->num_ports; i++) { - retval = init_port(ports->id[i], pktmbuf_pool); + for (count = 0; count < ports->num_ports; count++) { + retval = init_port(ports->id[count], pktmbuf_pool); if (retval != 0) rte_exit(EXIT_FAILURE, - "Cannot initialise port %d\n", i); + "Cannot initialise port %d\n", count); } } check_all_ports_link_status(ports, ports->num_ports, (~0x0)); diff --git a/src/vm/init.c b/src/vm/init.c index 4405489..fb9b7ec 100644 --- a/src/vm/init.c +++ b/src/vm/init.c @@ -91,8 +91,7 @@ init(int argc, char *argv[]) { int retval; const struct rte_memzone *mz; - uint8_t i; - uint16_t total_ports; + uint16_t count, total_ports; /* init EAL, parsing EAL args */ retval = rte_eal_init(argc, argv); @@ -130,11 +129,11 @@ init(int argc, char *argv[]) /* now initialise the ports we will use */ if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - for (i = 0; i < total_ports; i++) { - retval = init_port(ports->id[i], pktmbuf_pool); + for (count = 0; count < total_ports; count++) { + retval = init_port(ports->id[count], pktmbuf_pool); if (retval != 0) rte_exit(EXIT_FAILURE, - "Cannot initialise port %d\n", i); + "Cannot initialise port %d\n", count); } } check_all_ports_link_status(ports, total_ports, (~0x0)); -- 2.13.1