From: Stephen Hemminger Date: Thu, 4 Jun 2015 14:43:25 +0000 (-0700) Subject: examples: fix whitespace X-Git-Tag: spdx-start~9123 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0e433e5f0891ecd18a694ed733a28e69b1470c25;p=dpdk.git examples: fix whitespace Signed-off-by: Stephen Hemminger --- diff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c index 8c6c11be1f..f3ba247616 100644 --- a/examples/cmdline/commands.c +++ b/examples/cmdline/commands.c @@ -281,4 +281,3 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_help, NULL, }; - diff --git a/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf b/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf index 864a36ea1c..9e1c1d1133 100644 --- a/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf +++ b/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf @@ -291,5 +291,3 @@ Cy15CoreAffinity = 23 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - - diff --git a/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf b/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf index 1783cc8887..3e8d8b6bdf 100644 --- a/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf +++ b/examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf @@ -290,5 +290,3 @@ Cy15CoreAffinity = 31 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - - diff --git a/examples/dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf b/examples/dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf index 4b09070968..c3a85dea2d 100644 --- a/examples/dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf +++ b/examples/dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf @@ -233,5 +233,3 @@ Cy7CoreAffinity = 7 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - - diff --git a/examples/kni/main.c b/examples/kni/main.c index 96ca473082..6f74d8eda2 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -926,4 +926,3 @@ main(int argc, char** argv) return 0; } - diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 6ed7690387..720fd5ad6c 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -705,4 +705,3 @@ main(int argc, char **argv) return 0; } - diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 6ac342bdec..6057059919 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -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 */ diff --git a/examples/multi_process/client_server_mp/mp_server/args.c b/examples/multi_process/client_server_mp/mp_server/args.c index b86ee32e07..bf8c666c2f 100644 --- a/examples/multi_process/client_server_mp/mp_server/args.c +++ b/examples/multi_process/client_server_mp/mp_server/args.c @@ -170,4 +170,3 @@ parse_app_args(uint8_t max_ports, int argc, char *argv[]) } return 0; } - diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c index 856ab6ee2e..d2e079f997 100644 --- a/examples/netmap_compat/lib/compat_netmap.c +++ b/examples/netmap_compat/lib/compat_netmap.c @@ -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++; diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index 59c4014065..3c678cc43d 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -291,5 +291,3 @@ app_mixed_thread(struct thread_conf **confs) conf_idx = 0; } } - - diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index ddf9ba465f..027283756f 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -483,4 +483,3 @@ app_parse_args(int argc, char **argv) return 0; } - diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index 05a8cafb12..c82a0062c2 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -608,5 +608,3 @@ cfg_load_subport(struct cfg_file *cfg, struct rte_sched_subport_params *subport_ return 0; } - - diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index 7732273d11..e16b164dd2 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -252,4 +252,3 @@ main(int argc, char **argv) return 0; } - diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h index 643f1c81e9..82aa0fae19 100644 --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -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 diff --git a/examples/qos_sched/stats.c b/examples/qos_sched/stats.c index b4db7b5423..5c894455b6 100644 --- a/examples/qos_sched/stats.c +++ b/examples/qos_sched/stats.c @@ -313,4 +313,3 @@ pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id) return 0; } - diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c index f5f78c7695..afc13665f4 100644 --- a/examples/quota_watermark/qw/init.c +++ b/examples/quota_watermark/qw/init.c @@ -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); diff --git a/examples/quota_watermark/qw/init.h b/examples/quota_watermark/qw/init.h index 9b6713805f..6d0af3abd7 100644 --- a/examples/quota_watermark/qw/init.h +++ b/examples/quota_watermark/qw/init.h @@ -41,4 +41,3 @@ void pair_ports(void); void setup_shared_variables(void); #endif /* _INIT_H_ */ - diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 509e9d875b..7863dcf45a 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -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; } - diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c index 60312b5f21..9e6f18eaee 100644 --- a/examples/vhost_xen/main.c +++ b/examples/vhost_xen/main.c @@ -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)) { diff --git a/examples/vhost_xen/vhost_monitor.c b/examples/vhost_xen/vhost_monitor.c index 64559937d3..a891c56771 100644 --- a/examples/vhost_xen/vhost_monitor.c +++ b/examples/vhost_xen/vhost_monitor.c @@ -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; } - -