diff options
Diffstat (limited to 'src/vnet/pg')
-rw-r--r-- | src/vnet/pg/cli.c | 24 | ||||
-rw-r--r-- | src/vnet/pg/input.c | 8 | ||||
-rw-r--r-- | src/vnet/pg/pg_api.c | 2 | ||||
-rw-r--r-- | src/vnet/pg/stream.c | 4 |
4 files changed, 0 insertions, 38 deletions
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c index f289becebd2..3f2de2604b2 100644 --- a/src/vnet/pg/cli.c +++ b/src/vnet/pg/cli.c @@ -47,12 +47,10 @@ /* Root of all packet generator cli commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_pg_command, static) = { .path = "packet-generator", .short_help = "Packet generator commands", }; -/* *INDENT-ON* */ void pg_enable_disable (u32 stream_index, int is_enable) @@ -63,11 +61,9 @@ pg_enable_disable (u32 stream_index, int is_enable) if (stream_index == ~0) { /* No stream specified: enable/disable all streams. */ - /* *INDENT-OFF* */ pool_foreach (s, pg->streams) { pg_stream_enable_disable (pg, s, is_enable); } - /* *INDENT-ON* */ } else { @@ -138,23 +134,19 @@ doit: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_streams_cli, static) = { .path = "packet-generator enable-stream", .short_help = "Enable packet generator streams", .function = enable_disable_stream, .function_arg = 1, /* is_enable */ }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (disable_streams_cli, static) = { .path = "packet-generator disable-stream", .short_help = "Disable packet generator streams", .function = enable_disable_stream, .function_arg = 0, /* is_enable */ }; -/* *INDENT-ON* */ static u8 * format_pg_edit_group (u8 * s, va_list * va) @@ -210,12 +202,10 @@ format_pg_stream (u8 * s, va_list * va) if (verbose) { pg_edit_group_t *g; - /* *INDENT-OFF* */ vec_foreach (g, t->edit_groups) { s = format (s, "\n%U%U", format_white_space, indent, format_pg_edit_group, g); } - /* *INDENT-ON* */ } return s; @@ -244,23 +234,19 @@ show_streams (vlib_main_t * vm, } vlib_cli_output (vm, "%U", format_pg_stream, 0, 0); - /* *INDENT-OFF* */ pool_foreach (s, pg->streams) { vlib_cli_output (vm, "%U", format_pg_stream, s, verbose); } - /* *INDENT-ON* */ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_streams_cli, static) = { .path = "show packet-generator ", .short_help = "show packet-generator [verbose]", .function = show_streams, }; -/* *INDENT-ON* */ static clib_error_t * pg_pcap_read (pg_stream_t * s, char *file_name) @@ -505,7 +491,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (new_stream_cli, static) = { .path = "packet-generator new", .function = new_stream, @@ -523,7 +508,6 @@ VLIB_CLI_COMMAND (new_stream_cli, static) = { "rate PPS rate to transfer packet data\n" "maxframe NPKTS maximum number of packets per frame\n", }; -/* *INDENT-ON* */ static clib_error_t * del_stream (vlib_main_t * vm, @@ -541,13 +525,11 @@ del_stream (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (del_stream_cli, static) = { .path = "packet-generator delete", .function = del_stream, .short_help = "Delete stream with given name", }; -/* *INDENT-ON* */ static clib_error_t * change_stream_parameters (vlib_main_t * vm, @@ -588,13 +570,11 @@ change_stream_parameters (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (change_stream_parameters_cli, static) = { .path = "packet-generator configure", .short_help = "Change packet generator stream parameters", .function = change_stream_parameters, }; -/* *INDENT-ON* */ static clib_error_t * pg_capture_cmd_fn (vlib_main_t * vm, @@ -671,13 +651,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (pg_capture_cmd, static) = { .path = "packet-generator capture", .short_help = "packet-generator capture <interface name> pcap <filename> [count <n>]", .function = pg_capture_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * create_pg_if_cmd_fn (vlib_main_t * vm, @@ -730,7 +708,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_pg_if_cmd, static) = { .path = "create packet-generator", .short_help = "create packet-generator interface <interface name>" @@ -738,7 +715,6 @@ VLIB_CLI_COMMAND (create_pg_if_cmd, static) = { " [mode <ethernet | ip4 | ip6>]", .function = create_pg_if_cmd_fn, }; -/* *INDENT-ON* */ /* Dummy init function so that we can be linked in. */ static clib_error_t * diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c index f376c7443e5..f81485de65f 100644 --- a/src/vnet/pg/input.c +++ b/src/vnet/pg/input.c @@ -1816,17 +1816,14 @@ pg_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) if (vlib_num_workers ()) worker_index = vlib_get_current_worker_index (); - /* *INDENT-OFF* */ clib_bitmap_foreach (i, pg->enabled_streams[worker_index]) { pg_stream_t *s = vec_elt_at_index (pg->streams, i); n_packets += pg_input_stream (node, pg, s); } - /* *INDENT-ON* */ return n_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (pg_input_node) = { .function = pg_input, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -1839,7 +1836,6 @@ VLIB_REGISTER_NODE (pg_input_node) = { /* Input node will be left disabled until a stream is active. */ .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ VLIB_NODE_FN (pg_input_mac_filter) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1898,7 +1894,6 @@ VLIB_NODE_FN (pg_input_mac_filter) (vlib_main_t * vm, return (frame->n_vectors); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (pg_input_mac_filter) = { .name = "pg-input-mac-filter", .vector_size = sizeof (u32), @@ -1912,7 +1907,6 @@ VNET_FEATURE_INIT (pg_input_mac_filter_feat, static) = { .arc_name = "device-input", .node_name = "pg-input-mac-filter", }; -/* *INDENT-ON* */ static clib_error_t * pg_input_mac_filter_cfg (vlib_main_t * vm, @@ -1950,13 +1944,11 @@ pg_input_mac_filter_cfg (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_streams_cli, static) = { .path = "packet-generator mac-filter", .short_help = "packet-generator mac-filter <INTERFACE> <on|off>", .function = pg_input_mac_filter_cfg, }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/pg/pg_api.c b/src/vnet/pg/pg_api.c index 468c88ee8bb..e5d0a08a527 100644 --- a/src/vnet/pg/pg_api.c +++ b/src/vnet/pg/pg_api.c @@ -40,12 +40,10 @@ vl_api_pg_create_interface_t_handler (vl_api_pg_create_interface_t * mp) ntohl (mp->gso_size), 0, PG_MODE_ETHERNET); pg_interface_t *pi = pool_elt_at_index (pg->interfaces, pg_if_id); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_PG_CREATE_INTERFACE_REPLY, ({ rmp->sw_if_index = ntohl(pi->sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/pg/stream.c b/src/vnet/pg/stream.c index d68551b1371..cf3d37d5e9e 100644 --- a/src/vnet/pg/stream.c +++ b/src/vnet/pg/stream.c @@ -171,7 +171,6 @@ pg_add_del_mac_address (vnet_hw_interface_t * hi, return (NULL); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (pg_dev_class) = { .name = "pg", .tx_function = pg_output, @@ -180,7 +179,6 @@ VNET_DEVICE_CLASS (pg_dev_class) = { .admin_up_down_function = pg_interface_admin_up_down, .mac_addr_add_del_function = pg_add_del_mac_address, }; -/* *INDENT-ON* */ static u8 * pg_build_rewrite (vnet_main_t * vnm, @@ -197,12 +195,10 @@ pg_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (pg_interface_class,static) = { .name = "Packet generator", .build_rewrite = pg_build_rewrite, }; -/* *INDENT-ON* */ static u32 pg_eth_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hi, u32 flags) |