From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw1235.ocn.ad.jp (mogw1235.ocn.ad.jp [153.149.235.36]) by dpdk.org (Postfix) with ESMTP id 90ECC1AEE8 for ; Wed, 6 Dec 2017 09:19:51 +0100 (CET) Received: from mf-smf-ucb006.ocn.ad.jp (mf-smf-ucb006.ocn.ad.jp [153.149.231.5]) by mogw1235.ocn.ad.jp (Postfix) with ESMTP id E83E538023E; Wed, 6 Dec 2017 17:19:49 +0900 (JST) Received: from mf-smf-ucb006.ocn.ad.jp (mf-smf-ucb006 [153.149.231.5]) by mf-smf-ucb006.ocn.ad.jp (Postfix) with ESMTP id D1FB920698; Wed, 6 Dec 2017 17:19:49 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb021 (mv-mta-ucb021.ocn.ad.jp [153.149.142.84]) by mf-smf-ucb006.ocn.ad.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id vB68JnYu008413; Wed, 6 Dec 2017 17:19:49 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.167]) by ntt.pod01.mv-mta-ucb021 with id iYKp1w0013dLKTM01YKpTF; Wed, 06 Dec 2017 08:19:49 +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:48 +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:24 +0900 Message-Id: <20171206081826.67688-5-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 5/7] spp/shared: change type of ports_id 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:51 -0000 From: Yasufumi Ogawa This update is to change argument type of ID and number of ports to uint16_t. Signed-off-by: Yasufumi Ogawa --- src/shared/common.c | 9 +++++---- src/shared/common.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/shared/common.c b/src/shared/common.c index 7c7c6c8..dd1f88c 100644 --- a/src/shared/common.c +++ b/src/shared/common.c @@ -37,12 +37,13 @@ /* Check the link status of all ports in up to 9s, and print them finally */ void -check_all_ports_link_status(struct port_info *ports, uint8_t port_num, +check_all_ports_link_status(struct port_info *ports, uint16_t port_num, uint32_t port_mask) { #define CHECK_INTERVAL 100 /* 100ms */ #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */ - uint8_t portid, count, all_ports_up; + uint8_t count, all_ports_up; + uint16_t portid; struct rte_eth_link link; RTE_LOG(INFO, APP, "\nChecking link status"); @@ -102,7 +103,7 @@ check_all_ports_link_status(struct port_info *ports, uint8_t port_num, * - start the port and report its status to stdout */ int -init_port(uint8_t port_num, struct rte_mempool *pktmbuf_pool) +init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool) { /* for port configuration all features are off by default */ const struct rte_eth_conf port_conf = { @@ -165,7 +166,7 @@ parse_portmask(struct port_info *ports, uint16_t max_ports, { char *end = NULL; unsigned long pm; - uint8_t count = 0; + uint16_t count = 0; if (portmask == NULL || *portmask == '\0') return -1; diff --git a/src/shared/common.h b/src/shared/common.h index 33c4d4f..e29c7b9 100644 --- a/src/shared/common.h +++ b/src/shared/common.h @@ -186,10 +186,10 @@ get_vhost_iface_name(unsigned int id) return buffer; } -void check_all_ports_link_status(struct port_info *ports, uint8_t port_num, +void check_all_ports_link_status(struct port_info *ports, uint16_t port_num, uint32_t port_mask); -int init_port(uint8_t port_num, struct rte_mempool *pktmbuf_pool); +int init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool); int parse_portmask(struct port_info *ports, uint16_t max_ports, const char *portmask); -- 2.13.1