examples: fix whitespace

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Stephen Hemminger 2015-06-04 07:43:25 -07:00 committed by Thomas Monjalon
parent f3618dcbcf
commit 0e433e5f08
20 changed files with 23 additions and 44 deletions

View File

@ -281,4 +281,3 @@ cmdline_parse_ctx_t main_ctx[] = {
(cmdline_parse_inst_t *)&cmd_help,
NULL,
};

View File

@ -291,5 +291,3 @@ Cy15CoreAffinity = 23
NumberCyInstances = 0
NumberDcInstances = 0
NumProcesses = 0

View File

@ -290,5 +290,3 @@ Cy15CoreAffinity = 31
NumberCyInstances = 0
NumberDcInstances = 0
NumProcesses = 0

View File

@ -233,5 +233,3 @@ Cy7CoreAffinity = 7
NumberCyInstances = 0
NumberDcInstances = 0
NumProcesses = 0

View File

@ -926,4 +926,3 @@ main(int argc, char** argv)
return 0;
}

View File

@ -705,4 +705,3 @@ main(int argc, char **argv)
return 0;
}

View File

@ -873,7 +873,7 @@ main_loop(__attribute__((unused)) void *dummy)
rx_queue->freq_up_hint =
power_freq_scaleup_heuristic(lcore_id,
portid, queueid);
}
}
/* Prefetch first packets */
for (j = 0; j < PREFETCH_OFFSET && j < nb_rx; j++) {
@ -915,8 +915,8 @@ main_loop(__attribute__((unused)) void *dummy)
/**
* All Rx queues empty in recent consecutive polls,
* sleep in a conservative manner, meaning sleep as
* less as possible.
*/
* less as possible.
*/
for (i = 1, lcore_idle_hint =
qconf->rx_queue_list[0].idle_hint;
i < qconf->n_rx_queue; ++i) {
@ -929,7 +929,7 @@ main_loop(__attribute__((unused)) void *dummy)
/**
* execute "pause" instruction to avoid context
* switch for short sleep.
*/
*/
rte_delay_us(lcore_idle_hint);
else
/* long sleep force runing thread to suspend */

View File

@ -170,4 +170,3 @@ parse_app_args(uint8_t max_ports, int argc, char *argv[])
}
return 0;
}

View File

@ -550,7 +550,7 @@ tx_sync_ring(struct netmap_ring *ring, uint8_t port, uint16_t ring_number,
burst_size = (uint16_t)RTE_MIN(n_used_slots, RTE_DIM(tx_mbufs));
for (i = 0; i < burst_size; i++) {
tx_mbufs[i] = rte_pktmbuf_alloc(pool);
tx_mbufs[i] = rte_pktmbuf_alloc(pool);
if (tx_mbufs[i] == NULL)
goto err;
@ -638,7 +638,7 @@ rte_netmap_init(const struct rte_netmap_conf *conf)
port_num = RTE_MAX_ETHPORTS;
port_rings = 2 * conf->max_rings;
port_slots = port_rings * conf->max_slots;
port_bufs = port_slots;
port_bufs = port_slots;
nmif_sz = NETMAP_IF_RING_OFS(port_rings, port_rings, port_slots);
sz = nmif_sz * port_num;
@ -870,7 +870,7 @@ rte_netmap_poll(struct pollfd *fds, nfds_t nfds, int timeout)
idx = FD_TO_IDX(fds[i].fd);
if ((port = fd_port[idx].port) >= RTE_DIM(ports) ||
ports[port].fd != idx) {
ports[port].fd != idx) {
fds[i].revents |= POLLERR;
ret++;

View File

@ -291,5 +291,3 @@ app_mixed_thread(struct thread_conf **confs)
conf_idx = 0;
}
}

View File

@ -483,4 +483,3 @@ app_parse_args(int argc, char **argv)
return 0;
}

View File

@ -608,5 +608,3 @@ cfg_load_subport(struct cfg_file *cfg, struct rte_sched_subport_params *subport_
return 0;
}

View File

@ -252,4 +252,3 @@ main(int argc, char **argv)
return 0;
}

View File

@ -70,7 +70,7 @@ extern "C" {
#define MAX_DATA_STREAMS (RTE_MAX_LCORE/2)
#define MAX_SCHED_SUBPORTS 8
#define MAX_SCHED_PIPES 4096
#define MAX_SCHED_PIPES 4096
#ifndef APP_COLLECT_STAT
#define APP_COLLECT_STAT 1

View File

@ -313,4 +313,3 @@ pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id)
return 0;
}

View File

@ -130,7 +130,7 @@ void init_ring(int lcore_id, uint8_t port_id)
char ring_name[RTE_RING_NAMESIZE];
snprintf(ring_name, RTE_RING_NAMESIZE,
"core%d_port%d", lcore_id, port_id);
"core%d_port%d", lcore_id, port_id);
ring = rte_ring_create(ring_name, RING_SIZE, rte_socket_id(),
RING_F_SP_ENQ | RING_F_SC_DEQ);

View File

@ -41,4 +41,3 @@ void pair_ports(void);
void setup_shared_variables(void);
#endif /* _INIT_H_ */

View File

@ -61,7 +61,7 @@
/*
* Calculate the number of buffers needed per port
*/
#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \
#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \
(num_switching_cores*MAX_PKT_BURST) + \
(num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\
(num_switching_cores*MBUF_CACHE_SIZE))
@ -78,10 +78,10 @@
#define MBUF_DATA_SIZE_ZCP RTE_MBUF_DEFAULT_BUF_SIZE
#define MBUF_CACHE_SIZE_ZCP 0
#define MAX_PKT_BURST 32 /* Max burst size for RX/TX */
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
#define MAX_PKT_BURST 32 /* Max burst size for RX/TX */
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
#define BURST_RX_WAIT_US 15 /* Defines how long we wait between retries on RX */
#define BURST_RX_WAIT_US 15 /* Defines how long we wait between retries on RX */
#define BURST_RX_RETRIES 4 /* Number of retries on RX. */
#define JUMBO_FRAME_MAX_SIZE 0x2600
@ -3063,4 +3063,3 @@ main(int argc, char *argv[])
return 0;
}

View File

@ -61,7 +61,7 @@
/*
* Calculate the number of buffers needed per port
*/
#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \
#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \
(num_switching_cores*MAX_PKT_BURST) + \
(num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\
(num_switching_cores*MBUF_CACHE_SIZE))
@ -87,9 +87,9 @@
#define TX_HTHRESH 0 /* Default values of TX host threshold reg. */
#define TX_WTHRESH 0 /* Default values of TX write-back threshold reg. */
#define MAX_PKT_BURST 32 /* Max burst size for RX/TX */
#define MAX_MRG_PKT_BURST 16 /* Max burst for merge buffers. Set to 1 due to performance issue. */
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
#define MAX_PKT_BURST 32 /* Max burst size for RX/TX */
#define MAX_MRG_PKT_BURST 16 /* Max burst for merge buffers. Set to 1 due to performance issue. */
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
/* State of virtio device. */
#define DEVICE_NOT_READY 0
@ -725,7 +725,7 @@ link_vmdq(struct virtio_net *dev)
/* Register the MAC address. */
ret = rte_eth_dev_mac_addr_add(ports[0], &dev->mac_address, (uint32_t)dev->device_fh);
if (ret) {
if (ret) {
RTE_LOG(ERR, VHOST_DATA, "(%"PRIu64") Failed to add device MAC address to VMDQ\n",
dev->device_fh);
return -1;
@ -1461,9 +1461,9 @@ main(int argc, char *argv[])
nb_ports = RTE_MAX_ETHPORTS;
/*
* Update the global var NUM_PORTS and global array PORTS
* and get value of var VALID_NUM_PORTS according to system ports number
*/
* Update the global var NUM_PORTS and global array PORTS
* and get value of var VALID_NUM_PORTS according to system ports number
*/
valid_num_ports = check_ports_num(nb_ports);
if ((valid_num_ports == 0) || (valid_num_ports > MAX_SUP_PORTS)) {

View File

@ -181,8 +181,8 @@ add_config_ll_entry(struct virtio_net_config_ll *new_ll_dev)
ll_root = new_ll_dev;
} else {
/* increment through the ll until we find un unused device_id,
* insert the device at that entry
*/
* insert the device at that entry
*/
while ((ll_dev->next != NULL) && (ll_dev->dev.device_fh == (ll_dev->next->dev.device_fh - 1)))
ll_dev = ll_dev->next;
@ -590,5 +590,3 @@ init_virtio_xen(struct virtio_net_device_ops const *const ops)
return -1;
return 0;
}