DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, thomas@monjalon.net,
	adrien.mazarguil@6wind.com, Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH v5 4/5] test: increase port_id range
Date: Mon, 25 Sep 2017 11:22:30 +0800	[thread overview]
Message-ID: <20170925032231.72897-5-zhiyong.yang@intel.com> (raw)
In-Reply-To: <20170925032231.72897-1-zhiyong.yang@intel.com>

Increase port_id range from 8 bit to 16 bits in test code,
and remove some unnecessary cast operations.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 test/test/test_kni.c                | 12 +++++------
 test/test/test_link_bonding.c       | 40 ++++++++++++++++++-------------------
 test/test/test_link_bonding_mode4.c | 12 +++++------
 test/test/test_pmd_perf.c           | 30 ++++++++++++++--------------
 test/test/test_pmd_ring_perf.c      |  2 +-
 test/test/virtual_pmd.c             | 24 +++++++++++-----------
 test/test/virtual_pmd.h             | 28 ++++++++++++++------------
 7 files changed, 75 insertions(+), 73 deletions(-)

diff --git a/test/test/test_kni.c b/test/test/test_kni.c
index db17fdf30..2450c9ff5 100644
--- a/test/test/test_kni.c
+++ b/test/test/test_kni.c
@@ -132,7 +132,7 @@ test_kni_lookup_mempool(void)
 }
 /* Callback for request of changing MTU */
 static int
-kni_change_mtu(uint8_t port_id, unsigned new_mtu)
+kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 {
 	printf("Change MTU of port %d to %u\n", port_id, new_mtu);
 	kni_pkt_mtu = new_mtu;
@@ -362,7 +362,7 @@ test_kni_register_handler_mp(void)
 }
 
 static int
-test_kni_processing(uint8_t port_id, struct rte_mempool *mp)
+test_kni_processing(uint16_t port_id, struct rte_mempool *mp)
 {
 	int ret = 0;
 	unsigned i;
@@ -387,7 +387,7 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp)
 	conf.core_id = 1;
 	conf.force_bind = 1;
 	conf.mbuf_size = MAX_PACKET_SZ;
-	conf.group_id = (uint16_t)port_id;
+	conf.group_id = port_id;
 
 	ops = kni_ops;
 	ops.port_id = port_id;
@@ -472,7 +472,7 @@ static int
 test_kni(void)
 {
 	int ret = -1;
-	uint8_t nb_ports, port_id;
+	uint16_t nb_ports, port_id;
 	struct rte_kni *kni;
 	struct rte_mempool *mp;
 	struct rte_kni_conf conf;
@@ -538,7 +538,7 @@ test_kni(void)
 	rte_eth_dev_info_get(port_id, &info);
 	conf.addr = info.pci_dev->addr;
 	conf.id = info.pci_dev->id;
-	conf.group_id = (uint16_t)port_id;
+	conf.group_id = port_id;
 	conf.mbuf_size = MAX_PACKET_SZ;
 
 	ops = kni_ops;
@@ -567,7 +567,7 @@ test_kni(void)
 	rte_eth_dev_info_get(port_id, &info);
 	conf.addr = info.pci_dev->addr;
 	conf.id = info.pci_dev->id;
-	conf.group_id = (uint16_t)port_id;
+	conf.group_id = port_id;
 	conf.mbuf_size = MAX_PACKET_SZ;
 
 	ops = kni_ops;
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index dc28cea59..e41ab60d2 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -94,9 +94,9 @@ uint8_t slave_mac[] = {0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00 };
 uint8_t bonded_mac[] = {0xAA, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF };
 
 struct link_bonding_unittest_params {
-	int8_t bonded_port_id;
-	int8_t slave_port_ids[TEST_MAX_NUMBER_OF_PORTS];
-	uint8_t bonded_slave_count;
+	int16_t bonded_port_id;
+	int16_t slave_port_ids[TEST_MAX_NUMBER_OF_PORTS];
+	uint16_t bonded_slave_count;
 	uint8_t bonding_mode;
 
 	uint16_t nb_rx_q;
@@ -317,7 +317,7 @@ test_create_bonded_device(void)
 {
 	int current_slave_count;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	/* Don't try to recreate bonded device if re-running test suite*/
 	if (test_params->bonded_port_id == -1) {
@@ -387,7 +387,7 @@ test_add_slave_to_bonded_device(void)
 {
 	int current_slave_count;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id,
 			test_params->slave_port_ids[test_params->bonded_slave_count]),
@@ -434,7 +434,7 @@ test_remove_slave_from_bonded_device(void)
 {
 	int current_slave_count;
 	struct ether_addr read_mac_addr, *mac_addr;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params->bonded_port_id,
 			test_params->slave_port_ids[test_params->bonded_slave_count-1]),
@@ -496,7 +496,7 @@ static int
 test_add_already_bonded_slave_to_bonded_device(void)
 {
 	int port_id, current_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	char pmd_name[RTE_ETH_NAME_MAX_LEN];
 
 	test_add_slave_to_bonded_device();
@@ -528,7 +528,7 @@ static int
 test_get_slaves_from_bonded_device(void)
 {
 	int current_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
 			"Failed to add slave to bonded device");
@@ -609,7 +609,7 @@ test_start_bonded_device(void)
 	struct rte_eth_link link_status;
 
 	int current_slave_count, current_bonding_mode, primary_port;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	/* Add slave to bonded device*/
 	TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
@@ -658,7 +658,7 @@ static int
 test_stop_bonded_device(void)
 {
 	int current_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	struct rte_eth_link link_status;
 
@@ -932,7 +932,7 @@ test_set_bonded_port_initialization_mac_assignment(void)
 {
 	int i, slave_count, bonded_port_id;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	int slave_port_ids[BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT];
 
 	struct ether_addr slave_mac_addr, bonded_mac_addr, read_mac_addr;
@@ -1114,7 +1114,7 @@ test_set_bonded_port_initialization_mac_assignment(void)
 
 static int
 initialize_bonded_device_with_slaves(uint8_t bonding_mode, uint8_t bond_en_isr,
-		uint8_t number_of_slaves, uint8_t enable_slave)
+		uint16_t number_of_slaves, uint8_t enable_slave)
 {
 	/* Configure bonded device */
 	TEST_ASSERT_SUCCESS(configure_ethdev(test_params->bonded_port_id, 0,
@@ -1179,7 +1179,7 @@ int test_lsc_interrupt_count;
 
 
 static int
-test_bonding_lsc_event_callback(uint8_t port_id __rte_unused,
+test_bonding_lsc_event_callback(uint16_t port_id __rte_unused,
 		enum rte_eth_event_type type  __rte_unused,
 		void *param __rte_unused,
 		void *ret_param __rte_unused)
@@ -1224,7 +1224,7 @@ static int
 test_status_interrupt(void)
 {
 	int slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	/* initialized bonding device with T slaves */
 	TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
@@ -1313,7 +1313,7 @@ test_status_interrupt(void)
 static int
 generate_test_burst(struct rte_mbuf **pkts_burst, uint16_t burst_size,
 		uint8_t vlan, uint8_t ipv4, uint8_t toggle_dst_mac,
-		uint8_t toggle_ip_addr, uint8_t toggle_udp_port)
+		uint8_t toggle_ip_addr, uint16_t toggle_udp_port)
 {
 	uint16_t pktlen, generated_burst_size, ether_type;
 	void *ip_hdr;
@@ -1854,7 +1854,7 @@ test_roundrobin_verify_slave_link_status_change_behaviour(void)
 	struct rte_mbuf *rx_pkt_burst[MAX_PKT_BURST] = { NULL };
 
 	struct rte_eth_stats port_stats;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	int i, burst_size, slave_count;
 
@@ -2408,7 +2408,7 @@ test_activebackup_verify_slave_link_status_change_failover(void)
 	struct rte_mbuf *rx_pkt_burst[MAX_PKT_BURST] = { NULL };
 	struct rte_eth_stats port_stats;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	int i, burst_size, slave_count, primary_port;
 
@@ -3302,7 +3302,7 @@ test_balance_verify_slave_link_status_change_behaviour(void)
 	struct rte_mbuf *rx_pkt_burst[MAX_PKT_BURST] = { NULL };
 	struct rte_eth_stats port_stats;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	int i, burst_size, slave_count;
 
@@ -3861,7 +3861,7 @@ test_broadcast_verify_slave_link_status_change_behaviour(void)
 	struct rte_mbuf *rx_pkt_burst[MAX_PKT_BURST] = { NULL };
 	struct rte_eth_stats port_stats;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	int i, burst_size, slave_count;
 
@@ -4373,7 +4373,7 @@ test_tlb_verify_slave_link_status_change_failover(void)
 	struct rte_mbuf *rx_pkt_burst[MAX_PKT_BURST] = { NULL };
 	struct rte_eth_stats port_stats;
 
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	int i, burst_size, slave_count, primary_port;
 
diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
index 8e9e23db5..77ec09c54 100644
--- a/test/test/test_link_bonding_mode4.c
+++ b/test/test/test_link_bonding_mode4.c
@@ -325,7 +325,7 @@ remove_slave(struct slave_conf *slave)
 }
 
 static void
-lacp_recv_cb(uint8_t slave_id, struct rte_mbuf *lacp_pkt)
+lacp_recv_cb(uint16_t slave_id, struct rte_mbuf *lacp_pkt)
 {
 	struct ether_hdr *hdr;
 	struct slow_protocol_frame *slow_hdr;
@@ -343,7 +343,7 @@ lacp_recv_cb(uint8_t slave_id, struct rte_mbuf *lacp_pkt)
 }
 
 static int
-initialize_bonded_device_with_slaves(uint8_t slave_count, uint8_t external_sm)
+initialize_bonded_device_with_slaves(uint16_t slave_count, uint8_t external_sm)
 {
 	uint8_t i;
 
@@ -379,8 +379,8 @@ remove_slaves_and_stop_bonded_device(void)
 {
 	struct slave_conf *slave;
 	int retval;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t i;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t i;
 
 	rte_eth_dev_stop(test_params.bonded_port_id);
 
@@ -411,7 +411,7 @@ test_setup(void)
 	char name[RTE_ETH_NAME_MAX_LEN];
 	struct slave_conf *port;
 	const uint8_t socket_id = rte_socket_id();
-	uint8_t i;
+	uint16_t i;
 
 	if (test_params.mbuf_pool == NULL) {
 		nb_mbuf_per_pool = TEST_RX_DESC_MAX + DEF_PKT_BURST +
@@ -1521,7 +1521,7 @@ check_environment(void)
 {
 	struct slave_conf *port;
 	uint8_t i, env_state;
-	uint8_t slaves[RTE_DIM(test_params.slave_ports)];
+	uint16_t slaves[RTE_DIM(test_params.slave_ports)];
 	int slaves_count;
 
 	env_state = 0;
diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
index 1ffd65a52..a3e29ed9e 100644
--- a/test/test/test_pmd_perf.c
+++ b/test/test/test_pmd_perf.c
@@ -50,7 +50,7 @@
 #define MAX_PKT_BURST                   (32)
 #define RTE_TEST_RX_DESC_DEFAULT        (128)
 #define RTE_TEST_TX_DESC_DEFAULT        (512)
-#define RTE_PORT_ALL            (~(uint8_t)0x0)
+#define RTE_PORT_ALL            (~(uint16_t)0x0)
 
 /* how long test would take at full line rate */
 #define RTE_TEST_DURATION                (2)
@@ -143,7 +143,7 @@ struct lcore_conf {
 	uint8_t status;
 	uint8_t socketid;
 	uint16_t nb_ports;
-	uint8_t portlist[RTE_MAX_ETHPORTS];
+	uint16_t portlist[RTE_MAX_ETHPORTS];
 } __rte_cache_aligned;
 
 struct lcore_conf lcore_conf[RTE_MAX_LCORE];
@@ -160,11 +160,12 @@ static uint32_t sc_flag;
 
 /* Check the link status of all ports in up to 3s, and print them finally */
 static void
-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 {
 #define CHECK_INTERVAL 100 /* 100ms */
 #define MAX_CHECK_TIME 30 /* 3s (30 * 100ms) in total */
-	uint8_t portid, count, all_ports_up, print_flag = 0;
+	uint16_t portid;
+	uint8_t count, all_ports_up, print_flag = 0;
 	struct rte_eth_link link;
 
 	printf("Checking link statuses...\n");
@@ -179,16 +180,15 @@ check_all_ports_link_status(uint8_t port_num, 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", (uint8_t)portid,
-						(unsigned)link.link_speed,
+					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\n"));
 					if (link_mbps == 0)
 						link_mbps = link.link_speed;
 				} else
-					printf("Port %d Link Down\n",
-						(uint8_t)portid);
+					printf("Port %d Link Down\n", portid);
 				continue;
 			}
 			/* clear all_ports_up flag if any link down */
@@ -335,7 +335,7 @@ reset_count(void)
 }
 
 static void
-stats_display(uint8_t port_id)
+stats_display(uint16_t port_id)
 {
 	struct rte_eth_stats stats;
 	rte_eth_stats_get(port_id, &stats);
@@ -383,7 +383,7 @@ measure_rxtx(struct lcore_conf *conf,
 	while (likely(!stop)) {
 		for (i = 0; i < conf->nb_ports; i++) {
 			portid = conf->portlist[i];
-			nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
+			nb_rx = rte_eth_rx_burst(portid, 0,
 						 pkts_burst, MAX_PKT_BURST);
 			if (unlikely(nb_rx == 0)) {
 				idle++;
@@ -422,7 +422,7 @@ measure_rxonly(struct lcore_conf *conf,
 			portid = conf->portlist[i];
 
 			cur_tsc = rte_rdtsc();
-			nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
+			nb_rx = rte_eth_rx_burst(portid, 0,
 						 pkts_burst, MAX_PKT_BURST);
 			if (unlikely(nb_rx == 0)) {
 				idle++;
@@ -459,7 +459,7 @@ measure_txonly(struct lcore_conf *conf,
 	while (likely(!stop)) {
 		for (i = 0; i < conf->nb_ports; i++) {
 			portid = conf->portlist[i];
-			nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
+			nb_rx = rte_eth_rx_burst(portid, 0,
 						 pkts_burst, MAX_PKT_BURST);
 			if (unlikely(nb_rx == 0)) {
 				idle++;
@@ -537,7 +537,7 @@ main_loop(__rte_unused void *args)
 		portid = conf->portlist[i];
 		int nb_free = pkt_per_port;
 		do { /* dry out */
-			nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
+			nb_rx = rte_eth_rx_burst(portid, 0,
 						 pkts_burst, MAX_PKT_BURST);
 			nb_tx = 0;
 			while (nb_tx < nb_rx)
@@ -600,7 +600,7 @@ poll_burst(void *args)
 	while (total) {
 		for (i = 0; i < conf->nb_ports; i++) {
 			portid = conf->portlist[i];
-			nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
+			nb_rx = rte_eth_rx_burst(portid, 0,
 						 &pkts_burst[next[portid]],
 						 MAX_PKT_BURST);
 			if (unlikely(nb_rx == 0)) {
diff --git a/test/test/test_pmd_ring_perf.c b/test/test/test_pmd_ring_perf.c
index 004882af1..8e9cd3310 100644
--- a/test/test/test_pmd_ring_perf.c
+++ b/test/test/test_pmd_ring_perf.c
@@ -54,7 +54,7 @@ static const volatile unsigned bulk_sizes[] = { 1, 8, 32 };
 
 /* The ring structure used for tests */
 static struct rte_ring *r;
-static uint8_t ring_ethdev_port;
+static uint16_t ring_ethdev_port;
 
 /* Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */
 static void
diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
index 9d46ad564..6568cb5b9 100644
--- a/test/test/virtual_pmd.c
+++ b/test/test/virtual_pmd.c
@@ -261,7 +261,7 @@ static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
 
 
 void
-virtual_ethdev_start_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -275,7 +275,7 @@ virtual_ethdev_start_fn_set_success(uint8_t port_id, uint8_t success)
 }
 
 void
-virtual_ethdev_configure_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_configure_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -288,7 +288,7 @@ virtual_ethdev_configure_fn_set_success(uint8_t port_id, uint8_t success)
 }
 
 void
-virtual_ethdev_rx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_rx_queue_setup_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -301,7 +301,7 @@ virtual_ethdev_rx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success)
 }
 
 void
-virtual_ethdev_tx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_tx_queue_setup_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -314,7 +314,7 @@ virtual_ethdev_tx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success)
 }
 
 void
-virtual_ethdev_link_update_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_link_update_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
@@ -430,7 +430,7 @@ virtual_ethdev_tx_burst_fail(void *queue, struct rte_mbuf **bufs,
 
 
 void
-virtual_ethdev_rx_burst_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_rx_burst_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct rte_eth_dev *vrtl_eth_dev = &rte_eth_devices[port_id];
 
@@ -442,7 +442,7 @@ virtual_ethdev_rx_burst_fn_set_success(uint8_t port_id, uint8_t success)
 
 
 void
-virtual_ethdev_tx_burst_fn_set_success(uint8_t port_id, uint8_t success)
+virtual_ethdev_tx_burst_fn_set_success(uint16_t port_id, uint8_t success)
 {
 	struct virtual_ethdev_private *dev_private = NULL;
 	struct rte_eth_dev *vrtl_eth_dev = &rte_eth_devices[port_id];
@@ -458,7 +458,7 @@ virtual_ethdev_tx_burst_fn_set_success(uint8_t port_id, uint8_t success)
 }
 
 void
-virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint8_t port_id,
+virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint16_t port_id,
 		uint8_t packet_fail_count)
 {
 	struct virtual_ethdev_private *dev_private = NULL;
@@ -470,7 +470,7 @@ virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint8_t port_id,
 }
 
 void
-virtual_ethdev_set_link_status(uint8_t port_id, uint8_t link_status)
+virtual_ethdev_set_link_status(uint16_t port_id, uint8_t link_status)
 {
 	struct rte_eth_dev *vrtl_eth_dev = &rte_eth_devices[port_id];
 
@@ -478,7 +478,7 @@ virtual_ethdev_set_link_status(uint8_t port_id, uint8_t link_status)
 }
 
 void
-virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id,
+virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 		uint8_t link_status)
 {
 	struct rte_eth_dev *vrtl_eth_dev = &rte_eth_devices[port_id];
@@ -490,7 +490,7 @@ virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id,
 }
 
 int
-virtual_ethdev_add_mbufs_to_rx_queue(uint8_t port_id,
+virtual_ethdev_add_mbufs_to_rx_queue(uint16_t port_id,
 		struct rte_mbuf **pkt_burst, int burst_length)
 {
 	struct rte_eth_dev *vrtl_eth_dev = &rte_eth_devices[port_id];
@@ -502,7 +502,7 @@ virtual_ethdev_add_mbufs_to_rx_queue(uint8_t port_id,
 }
 
 int
-virtual_ethdev_get_mbufs_from_tx_queue(uint8_t port_id,
+virtual_ethdev_get_mbufs_from_tx_queue(uint16_t port_id,
 		struct rte_mbuf **pkt_burst, int burst_length)
 {
 	struct virtual_ethdev_private *dev_private;
diff --git a/test/test/virtual_pmd.h b/test/test/virtual_pmd.h
index de001884d..7c53dd346 100644
--- a/test/test/virtual_pmd.h
+++ b/test/test/virtual_pmd.h
@@ -48,53 +48,55 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr,
 		uint8_t socket_id, uint8_t isr_support);
 
 void
-virtual_ethdev_set_link_status(uint8_t port_id, uint8_t link_status);
+virtual_ethdev_set_link_status(uint16_t port_id, uint8_t link_status);
 
 void
-virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id,
+virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 		uint8_t link_status);
 
 int
-virtual_ethdev_add_mbufs_to_rx_queue(uint8_t port_id,
+virtual_ethdev_add_mbufs_to_rx_queue(uint16_t port_id,
 		struct rte_mbuf **pkts_burst, int burst_length);
 
 int
-virtual_ethdev_get_mbufs_from_tx_queue(uint8_t port_id,
+virtual_ethdev_get_mbufs_from_tx_queue(uint16_t port_id,
 		struct rte_mbuf **pkt_burst, int burst_length);
 
 /** Control methods for the dev_ops functions pointer to control the behavior
  *  of the Virtual PMD */
 
 void
-virtual_ethdev_start_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success);
 
 void
-virtual_ethdev_stop_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_stop_fn_set_success(uint16_t port_id, uint8_t success);
 
 void
-virtual_ethdev_configure_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_configure_fn_set_success(uint16_t port_id, uint8_t success);
 
 void
-virtual_ethdev_rx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_rx_queue_setup_fn_set_success(uint16_t port_id,
+					      uint8_t success);
 
 void
-virtual_ethdev_tx_queue_setup_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_tx_queue_setup_fn_set_success(uint16_t port_id,
+					      uint8_t success);
 
 void
-virtual_ethdev_link_update_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_link_update_fn_set_success(uint16_t port_id, uint8_t success);
 
 void
-virtual_ethdev_rx_burst_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_rx_burst_fn_set_success(uint16_t port_id, uint8_t success);
 
 void
-virtual_ethdev_tx_burst_fn_set_success(uint8_t port_id, uint8_t success);
+virtual_ethdev_tx_burst_fn_set_success(uint16_t port_id, uint8_t success);
 
 /* if a value greater than zero is set for packet_fail_count then virtual
  * device tx burst function will fail that many packet from burst or all
  * packets if packet_fail_count is greater than the number of packets in the
  * burst */
 void
-virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint8_t port_id,
+virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint16_t port_id,
 		uint8_t packet_fail_count);
 
 #ifdef __cplusplus
-- 
2.13.3

  parent reply	other threads:[~2017-09-25  3:22 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  8:42 [dpdk-dev] [PATCH 0/2] " Zhiyong Yang
2017-08-09  8:42 ` [dpdk-dev] [PATCH 1/2] ethdev: " Zhiyong Yang
2017-08-09 12:52   ` Ferruh Yigit
2017-08-09 12:57     ` Wiles, Keith
2017-08-10  0:53       ` Yang, Zhiyong
2017-08-10  0:51     ` Yang, Zhiyong
2017-08-09  8:42 ` [dpdk-dev] [PATCH 2/2] examples: " Zhiyong Yang
2017-08-09 14:48   ` Stephen Hemminger
2017-08-10  1:03     ` Yang, Zhiyong
2017-08-09  9:00 ` [dpdk-dev] [PATCH 0/2] " De Lara Guarch, Pablo
2017-08-09  9:17   ` Yang, Zhiyong
2017-09-04  5:57 ` [dpdk-dev] [PATCH v2 0/4] " Zhiyong Yang
2017-09-04  5:57   ` [dpdk-dev] [PATCH v2 1/4] ethdev: " Zhiyong Yang
2017-09-04  9:06     ` Bruce Richardson
2017-09-04  9:29       ` Ferruh Yigit
2017-09-04  9:47         ` Yang, Zhiyong
2017-09-04 13:12           ` Adrien Mazarguil
2017-09-04 13:17             ` Richardson, Bruce
2017-09-04 13:36               ` Adrien Mazarguil
2017-09-04 13:59                 ` Yang, Zhiyong
2017-09-04 14:41                   ` Adrien Mazarguil
2017-09-05  6:51       ` Yang, Zhiyong
2017-09-06  8:32     ` Hemant Agrawal
2017-09-06  8:48       ` Yang, Zhiyong
     [not found]     ` <CALZ3Guikt9x8sz-oEKCuDCSp_wtKa64bSXTrMhqcWyg7f_dS7g@mail.gmail.com>
2017-09-07  0:45       ` Yang, Zhiyong
2017-09-04  5:57   ` [dpdk-dev] [PATCH v2 2/4] examples: " Zhiyong Yang
2017-09-04 14:15     ` Hunt, David
2017-09-04 15:01       ` Yang, Zhiyong
2017-09-04  5:57   ` [dpdk-dev] [PATCH v2 3/4] common_base: extend RTE_MAX_ETHPORTS from 32 to 1024 Zhiyong Yang
2017-09-04  7:46     ` Yao, Lei A
2017-09-04  7:59       ` Yang, Zhiyong
2017-09-04  9:09         ` Bruce Richardson
2017-09-04 10:05           ` Yang, Zhiyong
2017-09-04 10:27             ` Ananyev, Konstantin
2017-09-04 14:18               ` Yang, Zhiyong
2017-09-06  8:42               ` Hemant Agrawal
2017-09-06  8:52                 ` Yang, Zhiyong
2017-09-04 10:29             ` Bruce Richardson
2017-09-04  9:27       ` Ananyev, Konstantin
2017-09-04  5:57   ` [dpdk-dev] [PATCH v2 4/4] testpmd: add flexibility to mbuf allocation Zhiyong Yang
2017-09-09 14:47   ` [dpdk-dev] [PATCH v3 0/4] increase port_id range Zhiyong Yang
2017-09-09 14:47     ` [dpdk-dev] [PATCH v3 1/4] ethdev: " Zhiyong Yang
2017-09-11  9:37       ` Adrien Mazarguil
2017-09-11 10:51         ` Yang, Zhiyong
2017-09-11 10:21       ` Ferruh Yigit
2017-09-13  2:26         ` Yang, Zhiyong
2017-09-13 11:56           ` Ferruh Yigit
2017-09-13 12:15             ` Yang, Zhiyong
2017-09-13 12:18             ` Thomas Monjalon
2017-09-13 13:33               ` Ferruh Yigit
2017-09-19  6:05                 ` Yang, Zhiyong
2017-09-19 12:30                   ` Wiles, Keith
2017-09-14 12:49           ` Ferruh Yigit
2017-09-15  5:11             ` Yang, Zhiyong
2017-09-09 14:47     ` [dpdk-dev] [PATCH v3 2/4] test: " Zhiyong Yang
2017-09-09 14:47     ` [dpdk-dev] [PATCH v3 3/4] examples: " Zhiyong Yang
2017-09-14 14:41       ` Ferruh Yigit
2017-09-09 14:47     ` [dpdk-dev] [PATCH v3 4/4] librte_mbuf: modify port initialization value Zhiyong Yang
2017-09-11 10:23     ` [dpdk-dev] [PATCH v3 0/4] increase port_id range Ferruh Yigit
2017-09-11 11:25       ` Yang, Zhiyong
2017-09-13  8:14       ` Matej Vido
2017-09-13  8:21         ` Yang, Zhiyong
2017-09-18 14:54           ` Laatz, Kevin
2017-09-19  1:39             ` Yang, Zhiyong
2017-09-11 10:26     ` Ferruh Yigit
2017-09-11 10:55       ` Yang, Zhiyong
2017-09-11 11:24         ` Ferruh Yigit
2017-09-21  8:32     ` [dpdk-dev] [PATCH v4 0/5] " Zhiyong Yang
2017-09-21  8:32       ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-21 10:36         ` Ferruh Yigit
2017-09-22  2:02           ` Yang, Zhiyong
2017-09-21  8:32       ` [dpdk-dev] [PATCH v4 2/5] ethdev: increase port_id range Zhiyong Yang
2017-09-21 11:49         ` Adrien Mazarguil
2017-10-06 14:34           ` Nélio Laranjeiro
2017-09-21  8:32       ` [dpdk-dev] [PATCH v4 3/5] examples: " Zhiyong Yang
2017-09-21  8:32       ` [dpdk-dev] [PATCH v4 4/5] test: " Zhiyong Yang
2017-09-21  8:32       ` [dpdk-dev] [PATCH v4 5/5] librte_mbuf: modify port initialization value Zhiyong Yang
2017-09-25  3:22       ` [dpdk-dev] [PATCH v5 0/5] increase port_id range Zhiyong Yang
2017-09-25  3:22         ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-25 11:34           ` Ferruh Yigit
2017-09-25  3:22         ` [dpdk-dev] [PATCH v5 2/5] ethdev: increase port_id range Zhiyong Yang
2017-09-25 11:37           ` Ferruh Yigit
2017-09-25 12:06           ` Ferruh Yigit
2017-09-26  7:01             ` Yang, Zhiyong
2017-09-27 18:44               ` Ferruh Yigit
2017-09-28  2:12                 ` Yang, Zhiyong
2017-09-25  3:22         ` [dpdk-dev] [PATCH v5 3/5] examples: " Zhiyong Yang
2017-09-25  3:22         ` Zhiyong Yang [this message]
2017-09-25  3:22         ` [dpdk-dev] [PATCH v5 5/5] librte_mbuf: modify port initialization value Zhiyong Yang
2017-09-29  7:17         ` [dpdk-dev] [PATCH v6 0/5] increase port_id range Zhiyong Yang
2017-09-29  7:17           ` [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-29  7:17           ` [dpdk-dev] [PATCH v6 2/5] ethdev: increase port_id range Zhiyong Yang
2017-09-29  7:17           ` [dpdk-dev] [PATCH v6 3/5] examples: " Zhiyong Yang
2017-09-29  7:17           ` [dpdk-dev] [PATCH v6 4/5] test: " Zhiyong Yang
2017-09-29  7:17           ` [dpdk-dev] [PATCH v6 5/5] librte_mbuf: modify port initialization value Zhiyong Yang
2017-10-06  2:15           ` [dpdk-dev] [PATCH v6 0/5] increase port_id range Ferruh Yigit
2017-10-06 13:31             ` Gaëtan Rivet
2017-10-06 14:29             ` Thomas Monjalon
2017-10-06 16:02             ` Thomas Monjalon
2017-10-11 21:21             ` Ferruh Yigit
2017-10-12  1:33               ` Yang, Zhiyong

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=20170925032231.72897-5-zhiyong.yang@intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).