Soft Patch Panel
 help / color / mirror / Atom feed
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
Subject: [spp] [PATCH 5/7] spp/shared: change type of ports_id to uint16_t
Date: Wed,  6 Dec 2017 17:18:24 +0900	[thread overview]
Message-ID: <20171206081826.67688-5-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20171206081826.67688-1-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

This update is to change argument type of ID and number of ports to
uint16_t.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 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

  parent reply	other threads:[~2017-12-06  8:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  8:18 [spp] [PATCH 1/7] spp_nfv: change type of port_id " ogawa.yasufumi
2017-12-06  8:18 ` [spp] [PATCH 2/7] spp_vm: " ogawa.yasufumi
2017-12-06  8:18 ` [spp] [PATCH 3/7] spp_primary: change type of ports_id " ogawa.yasufumi
2017-12-06  8:18 ` [spp] [PATCH 4/7] spp_vm: " ogawa.yasufumi
2017-12-06  8:18 ` ogawa.yasufumi [this message]
2017-12-06  8:18 ` [spp] [PATCH 6/7] spp: change type of counter " ogawa.yasufumi
2017-12-06  8:18 ` [spp] [PATCH 7/7] spp/shared: refactor printing port status ogawa.yasufumi
2017-12-07 18:08 ` [spp] [PATCH 1/7] spp_nfv: change type of port_id to uint16_t Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206081826.67688-5-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=gerald.rogers@intel.com \
    --cc=spp@dpdk.org \
    --cc=sy.jong.choi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).