summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2024-03-12 17:42:49 +0100
committerFlorin Coras <florin.coras@gmail.com>2024-03-12 19:29:56 +0000
commitc3148b1be8f519c80c4417c21b978dfef72b351b (patch)
tree2511eb86e5c429ab018716fed0366164e6faf679 /src/vlib
parente2ed59933153d665ee43add2de03a581627b73fa (diff)
misc: remove GNU Indent directives
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/buffer.c10
-rw-r--r--src/vlib/cli.c32
-rw-r--r--src/vlib/drop.c4
-rw-r--r--src/vlib/error.c8
-rw-r--r--src/vlib/handoff_trace.c3
-rw-r--r--src/vlib/init.c6
-rw-r--r--src/vlib/linux/pci.c14
-rw-r--r--src/vlib/linux/vmbus.c2
-rw-r--r--src/vlib/log.c18
-rw-r--r--src/vlib/main.c18
-rw-r--r--src/vlib/node.c4
-rw-r--r--src/vlib/node_cli.c13
-rw-r--r--src/vlib/node_format.c2
-rw-r--r--src/vlib/pci/pci.h2
-rw-r--r--src/vlib/physmem.c2
-rw-r--r--src/vlib/punt.c14
-rw-r--r--src/vlib/punt_node.c2
-rw-r--r--src/vlib/threads.c6
-rw-r--r--src/vlib/threads.h6
-rw-r--r--src/vlib/threads_cli.c12
-rw-r--r--src/vlib/trace.c12
-rw-r--r--src/vlib/unix/cli.c34
-rw-r--r--src/vlib/unix/input.c4
-rw-r--r--src/vlib/unix/main.c4
-rw-r--r--src/vlib/unix/plugin.c4
25 files changed, 0 insertions, 236 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index e1dcf7ed827..b43c1dace97 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -600,10 +600,8 @@ format_vlib_buffer_pool (u8 * s, va_list * va)
"Pool Name", "Index", "NUMA", "Size", "Data Size",
"Total", "Avail", "Cached", "Used");
- /* *INDENT-OFF* */
vec_foreach (bpt, bp->threads)
cached += bpt->n_cached;
- /* *INDENT-ON* */
s = format (s, "%-20v%=6d%=6d%=6u%=11u%=6u%=8u%=8u%=8u", bp->name, bp->index,
bp->numa_node,
@@ -638,13 +636,11 @@ show_buffers (vlib_main_t *vm, unformat_input_t *input,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_buffers_command, static) = {
.path = "show buffers",
.short_help = "Show packet buffer allocation",
.function = show_buffers,
};
-/* *INDENT-ON* */
clib_error_t *
vlib_buffer_num_workers_change (vlib_main_t *vm)
@@ -767,10 +763,8 @@ buffer_get_cached (vlib_buffer_pool_t * bp)
clib_spinlock_lock (&bp->lock);
- /* *INDENT-OFF* */
vec_foreach (bpt, bp->threads)
cached += bpt->n_cached;
- /* *INDENT-ON* */
clib_spinlock_unlock (&bp->lock);
@@ -859,7 +853,6 @@ vlib_buffer_main_init (struct vlib_main_t * vm)
clib_panic ("system have more than %u NUMA nodes",
VLIB_BUFFER_MAX_NUMA_NODES);
- /* *INDENT-OFF* */
clib_bitmap_foreach (numa_node, bmp)
{
u8 *index = bm->default_buffer_pool_index_for_numa + numa_node;
@@ -874,7 +867,6 @@ vlib_buffer_main_init (struct vlib_main_t * vm)
if (first_valid_buffer_pool_index == 0xff)
first_valid_buffer_pool_index = index[0];
}
- /* *INDENT-ON* */
if (first_valid_buffer_pool_index == (u8) ~ 0)
{
@@ -882,14 +874,12 @@ vlib_buffer_main_init (struct vlib_main_t * vm)
goto done;
}
- /* *INDENT-OFF* */
clib_bitmap_foreach (numa_node, bmp)
{
if (bm->default_buffer_pool_index_for_numa[numa_node] == (u8) ~0)
bm->default_buffer_pool_index_for_numa[numa_node] =
first_valid_buffer_pool_index;
}
- /* *INDENT-ON* */
vec_foreach (bp, bm->buffer_pools)
{
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index 5dd25980c8c..98d57c6ccb0 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -55,36 +55,28 @@ int vl_api_get_elog_trace_api_messages (void);
static void *current_traced_heap;
/* Root of all show commands. */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vlib_cli_show_command, static) = {
.path = "show",
.short_help = "Show commands",
};
-/* *INDENT-ON* */
/* Root of all clear commands. */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vlib_cli_clear_command, static) = {
.path = "clear",
.short_help = "Clear commands",
};
-/* *INDENT-ON* */
/* Root of all set commands. */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vlib_cli_set_command, static) = {
.path = "set",
.short_help = "Set commands",
};
-/* *INDENT-ON* */
/* Root of all test commands. */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vlib_cli_test_command, static) = {
.path = "test",
.short_help = "Test commands",
};
-/* *INDENT-ON* */
/* Returns bitmap of commands which match key. */
static uword *
@@ -363,7 +355,6 @@ vlib_cli_get_possible_completions (u8 * str)
/* if we have a space at the end of input, and a unique match,
* autocomplete the next level of subcommands */
help_next_level = (vec_len (str) == 0) || isspace (str[vec_len (str) - 1]);
- /* *INDENT-OFF* */
clib_bitmap_foreach (index, match_bitmap) {
if (help_next_level && is_unique) {
c = get_sub_command (vcm, c, index);
@@ -375,7 +366,6 @@ vlib_cli_get_possible_completions (u8 * str)
sc = &c->sub_commands[index];
vec_add1(result, (u8*) sc->name);
}
- /* *INDENT-ON* */
done:
clib_bitmap_free (match_bitmap);
@@ -625,13 +615,11 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm,
{
if (PREDICT_FALSE (vm->elog_trace_cli_commands))
{
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) =
{
.format = "cli-cmd: %s",
.format_args = "T4",
};
- /* *INDENT-ON* */
struct
{
u32 c;
@@ -657,13 +645,11 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm,
if (PREDICT_FALSE (vm->elog_trace_cli_commands))
{
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) =
{
.format = "cli-cmd: %s %s",
.format_args = "T4T4",
};
- /* *INDENT-ON* */
struct
{
u32 c, err;
@@ -977,14 +963,12 @@ show_memory_usage (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_memory_usage_command, static) = {
.path = "show memory",
.short_help = "show memory [api-segment][stats-segment][verbose]\n"
" [numa-heaps][map][main-heap]",
.function = show_memory_usage,
};
-/* *INDENT-ON* */
static clib_error_t *
show_cpu (vlib_main_t * vm, unformat_input_t * input,
@@ -1011,13 +995,11 @@ show_cpu (vlib_main_t * vm, unformat_input_t * input,
* Base Frequency: 3.20 GHz
* @cliexend
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_cpu_command, static) = {
.path = "show cpu",
.short_help = "Show cpu information",
.function = show_cpu,
};
-/* *INDENT-ON* */
static clib_error_t *
enable_disable_memory_trace (vlib_main_t * vm,
@@ -1125,14 +1107,12 @@ enable_disable_memory_trace (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (enable_disable_memory_trace_command, static) = {
.path = "memory-trace",
.short_help = "memory-trace on|off [api-segment][stats-segment][main-heap]\n"
" [numa-heap <numa-id>]\n",
.function = enable_disable_memory_trace,
};
-/* *INDENT-ON* */
static clib_error_t *
restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
@@ -1146,13 +1126,11 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
extern char **environ;
/* Close all known open files */
- /* *INDENT-OFF* */
pool_foreach (f, fm->file_pool)
{
if (f->file_descriptor > 2)
close(f->file_descriptor);
}
- /* *INDENT-ON* */
/* Exec ourself */
execve (vgm->name, (char **) vgm->argv, environ);
@@ -1160,13 +1138,11 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (restart_cmd,static) = {
.path = "restart",
.short_help = "restart process",
.function = restart_cmd_fn,
};
-/* *INDENT-ON* */
#ifdef TEST_CODE
/*
@@ -1192,13 +1168,11 @@ sleep_ten_seconds (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (ping_command, static) = {
.path = "test sleep",
.function = sleep_ten_seconds,
.short_help = "Sleep for 10 seconds",
};
-/* *INDENT-ON* */
#endif /* ifdef TEST_CODE */
static uword
@@ -1649,7 +1623,6 @@ print_status:
* @cliend
* @cliexcmd{event-logger trace [api][cli][barrier][disable]}
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (event_logger_trace_command, static) =
{
.path = "event-logger trace",
@@ -1657,7 +1630,6 @@ VLIB_CLI_COMMAND (event_logger_trace_command, static) =
"[circuit-node <name> e.g. ethernet-input][disable]",
.function = event_logger_trace_command_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
suspend_command_fn (vlib_main_t * vm,
@@ -1667,7 +1639,6 @@ suspend_command_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (suspend_command, static) =
{
.path = "suspend",
@@ -1675,7 +1646,6 @@ VLIB_CLI_COMMAND (suspend_command, static) =
.function = suspend_command_fn,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
static int
@@ -1866,7 +1836,6 @@ show_cli_command_fn (vlib_main_t * vm,
* @cliexend
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_cli_command, static) =
{
.path = "show cli",
@@ -1874,7 +1843,6 @@ VLIB_CLI_COMMAND (show_cli_command, static) =
.function = show_cli_command_fn,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
static clib_error_t *
vlib_cli_init (vlib_main_t * vm)
diff --git a/src/vlib/drop.c b/src/vlib/drop.c
index 2a10225eb7a..66eb98fb899 100644
--- a/src/vlib/drop.c
+++ b/src/vlib/drop.c
@@ -258,7 +258,6 @@ VLIB_NODE_FN (error_punt_node) (vlib_main_t * vm,
return process_drop_punt (vm, node, frame, ERROR_DISPOSITION_PUNT);
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (error_drop_node) = {
.name = "drop",
.flags = VLIB_NODE_FLAG_IS_DROP,
@@ -266,9 +265,7 @@ VLIB_REGISTER_NODE (error_drop_node) = {
.format_trace = format_error_trace,
.validate_frame = validate_error_frame,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (error_punt_node) = {
.name = "punt",
.flags = (VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH
@@ -277,7 +274,6 @@ VLIB_REGISTER_NODE (error_punt_node) = {
.format_trace = format_error_trace,
.validate_frame = validate_error_frame,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/error.c b/src/vlib/error.c
index de2020f08cb..3008af307bf 100644
--- a/src/vlib/error.c
+++ b/src/vlib/error.c
@@ -362,21 +362,17 @@ show_errors (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vlib_cli_show_errors) = {
.path = "show errors",
.short_help = "Show error counts",
.function = show_errors,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_show_node_counters, static) = {
.path = "show node counters",
.short_help = "Show node counters",
.function = show_errors,
};
-/* *INDENT-ON* */
static clib_error_t *
clear_error_counters (vlib_main_t * vm,
@@ -395,21 +391,17 @@ clear_error_counters (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_clear_error_counters, static) = {
.path = "clear errors",
.short_help = "Clear error counters",
.function = clear_error_counters,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_clear_node_counters, static) = {
.path = "clear node counters",
.short_help = "Clear node counters",
.function = clear_error_counters,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/handoff_trace.c b/src/vlib/handoff_trace.c
index 964c095b9f6..1370ba2c95a 100644
--- a/src/vlib/handoff_trace.c
+++ b/src/vlib/handoff_trace.c
@@ -75,7 +75,6 @@ typedef enum
HANDOFF_TRACE_N_NEXT,
} tplaceholder_next_t;
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (handoff_trace_node, static) =
{
.name = "handoff_trace",
@@ -94,7 +93,6 @@ VLIB_REGISTER_NODE (handoff_trace_node, static) =
.n_errors = ARRAY_LEN(handoff_trace_error_strings),
.error_strings = handoff_trace_error_strings,
};
-/* *INDENT-ON* */
int
vlib_add_handoff_trace (vlib_main_t * vm, vlib_buffer_t * b)
@@ -117,7 +115,6 @@ vlib_add_handoff_trace (vlib_main_t * vm, vlib_buffer_t * b)
}
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/init.c b/src/vlib/init.c
index 4a56ab20b4a..55f260b74ed 100644
--- a/src/vlib/init.c
+++ b/src/vlib/init.c
@@ -270,12 +270,10 @@ again:
}
/* Finally, clean up all the fine data we allocated */
- /* *INDENT-OFF* */
hash_foreach_pair (hp, index_by_name,
({
vec_add1 (keys_to_delete, (u8 *)hp->key);
}));
- /* *INDENT-ON* */
hash_free (index_by_name);
for (i = 0; i < vec_len (keys_to_delete); i++)
vec_free (keys_to_delete[i]);
@@ -657,12 +655,10 @@ show_init_function_command_fn (vlib_main_t * vm,
}
}
}
- /* *INDENT-OFF* */
hash_foreach_pair (hp, index_by_name,
({
vec_add1 (keys_to_delete, (u8 *)hp->key);
}));
- /* *INDENT-ON* */
hash_free (index_by_name);
for (i = 0; i < vec_len (keys_to_delete); i++)
vec_free (keys_to_delete[i]);
@@ -679,13 +675,11 @@ show_init_function_command_fn (vlib_main_t * vm,
* @cliexstart{show init-function [init | enter | exit] [verbose [nn]]}
* @cliexend
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_init_function, static) = {
.path = "show init-function",
.short_help = "show init-function [init | enter | exit][verbose [nn]]",
.function = show_init_function_command_fn,
};
-/* *INDENT-ON* */
/*
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index 3af97414ed8..08923bebcdf 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -898,10 +898,8 @@ vlib_pci_register_msix_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h,
return clib_error_return (0, "vfio driver is needed for MSI-X interrupt "
"support");
- /* *INDENT-OFF* */
vec_validate_init_empty (p->msix_irqs, start + count - 1, (linux_pci_irq_t)
{ .fd = -1});
- /* *INDENT-ON* */
for (i = start; i < start + count; i++)
{
@@ -1079,7 +1077,6 @@ add_device_vfio (vlib_main_t * vm, linux_pci_device_t * p,
if (p->supports_va_dma)
{
vlib_buffer_pool_t *bp;
- /* *INDENT-OFF* */
vec_foreach (bp, vm->buffer_main->buffer_pools)
{
u32 i;
@@ -1088,7 +1085,6 @@ add_device_vfio (vlib_main_t * vm, linux_pci_device_t * p,
for (i = 0; i < pm->n_pages; i++)
vfio_map_physmem_page (vm, pm->base + (i << pm->log2_page_size));
}
- /* *INDENT-ON* */
}
if (r && r->init_function)
@@ -1241,10 +1237,8 @@ vlib_pci_map_region_int (vlib_main_t * vm, vlib_pci_dev_handle_t h,
return error;
}
- /* *INDENT-OFF* */
vec_validate_init_empty (p->regions, bar,
(linux_pci_region_t) { .fd = -1});
- /* *INDENT-ON* */
if (p->type == LINUX_PCI_DEVICE_TYPE_UIO)
p->regions[bar].fd = fd;
p->regions[bar].addr = *result;
@@ -1425,7 +1419,6 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h)
err = vfio_set_irqs (vm, p, VFIO_PCI_MSIX_IRQ_INDEX, 0, 0,
VFIO_IRQ_SET_ACTION_TRIGGER, 0);
clib_error_free (err);
- /* *INDENT-OFF* */
vec_foreach (irq, p->msix_irqs)
{
if (irq->fd == -1)
@@ -1433,12 +1426,10 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h)
clib_file_del_by_index (&file_main, irq->clib_file_index);
close (irq->fd);
}
- /* *INDENT-ON* */
vec_free (p->msix_irqs);
}
}
- /* *INDENT-OFF* */
vec_foreach (res, p->regions)
{
if (res->size == 0)
@@ -1447,7 +1438,6 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h)
if (res->fd != -1)
close (res->fd);
}
- /* *INDENT-ON* */
vec_free (p->regions);
close (p->fd);
@@ -1571,7 +1561,6 @@ linux_pci_init (vlib_main_t * vm)
ASSERT (sizeof (vlib_pci_addr_t) == sizeof (u32));
addrs = vlib_pci_get_all_dev_addrs ();
- /* *INDENT-OFF* */
vec_foreach (addr, addrs)
{
vlib_pci_device_info_t *d;
@@ -1581,17 +1570,14 @@ linux_pci_init (vlib_main_t * vm)
vlib_pci_free_device_info (d);
}
}
- /* *INDENT-ON* */
return 0;
}
-/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (linux_pci_init) =
{
.runs_after = VLIB_INITS("unix_input_init"),
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/linux/vmbus.c b/src/vlib/linux/vmbus.c
index 541c88b6537..9dc9d554ebd 100644
--- a/src/vlib/linux/vmbus.c
+++ b/src/vlib/linux/vmbus.c
@@ -455,12 +455,10 @@ linux_vmbus_init (vlib_main_t * vm)
return 0;
}
-/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (linux_vmbus_init) =
{
.runs_before = VLIB_INITS("unix_input_init"),
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/log.c b/src/vlib/log.c
index 387c202fc9c..60fb9fb5178 100644
--- a/src/vlib/log.c
+++ b/src/vlib/log.c
@@ -29,11 +29,9 @@ vlib_log_main_t log_main = {
.default_rate_limit = 50,
};
-/* *INDENT-OFF* */
VLIB_REGISTER_LOG_CLASS (log_log, static) = {
.class_name = "log",
};
-/* *INDENT-ON* */
static const int colors[] = {
[VLIB_LOG_LEVEL_EMERG] = 1, /* red */
@@ -90,7 +88,6 @@ format_indent (u8 * s, va_list * args)
u32 indent = va_arg (*args, u32);
u8 *c;
- /* *INDENT-OFF* */
vec_foreach (c, v)
{
vec_add (s, c, 1);
@@ -98,7 +95,6 @@ format_indent (u8 * s, va_list * args)
for (u32 i = 0; i < indent; i++)
vec_add1 (s, (u8) ' ');
}
- /* *INDENT-ON* */
return s;
}
@@ -408,13 +404,11 @@ show_log (vlib_main_t * vm,
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_show_log, static) = {
.path = "show logging",
.short_help = "show logging",
.function = show_log,
};
-/* *INDENT-ON* */
static clib_error_t *
show_log_config (vlib_main_t * vm,
@@ -456,13 +450,11 @@ show_log_config (vlib_main_t * vm,
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_show_log_config, static) = {
.path = "show logging configuration",
.short_help = "show logging configuration",
.function = show_log_config,
};
-/* *INDENT-ON* */
static clib_error_t *
clear_log (vlib_main_t * vm,
@@ -487,13 +479,11 @@ clear_log (vlib_main_t * vm,
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_clear_log, static) = {
.path = "clear logging",
.short_help = "clear logging",
.function = clear_log,
};
-/* *INDENT-ON* */
static uword
unformat_vlib_log_level (unformat_input_t * input, va_list * args)
@@ -621,14 +611,12 @@ set_log_class (vlib_main_t * vm,
return rv;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_set_log, static) = {
.path = "set logging class",
.short_help = "set logging class <class> [rate-limit <int>] "
"[level <level>] [syslog-level <level>]",
.function = set_log_class,
};
-/* *INDENT-ON* */
static clib_error_t *
set_log_unth_time (vlib_main_t * vm,
@@ -655,13 +643,11 @@ set_log_unth_time (vlib_main_t * vm,
return rv;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_set_log_params, static) = {
.path = "set logging unthrottle-time",
.short_help = "set logging unthrottle-time <int>",
.function = set_log_unth_time,
};
-/* *INDENT-ON* */
static clib_error_t *
set_log_size (vlib_main_t * vm,
@@ -691,13 +677,11 @@ set_log_size (vlib_main_t * vm,
return rv;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_set_log_size, static) = {
.path = "set logging size",
.short_help = "set logging size <int>",
.function = set_log_size,
};
-/* *INDENT-ON* */
static uword
unformat_vlib_log_subclass (unformat_input_t * input, va_list * args)
@@ -770,13 +754,11 @@ test_log_class_subclass (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_test_log, static) = {
.path = "test log",
.short_help = "test log <level> <class> <subclass> <message>",
.function = test_log_class_subclass,
};
-/* *INDENT-ON* */
static clib_error_t *
log_config_class (vlib_main_t * vm, char *name, unformat_input_t * input)
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 5f070f6b218..04b58762646 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -240,13 +240,11 @@ show_frame_stats (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_frame_stats_cli, static) = {
.path = "show vlib frame-allocation",
.short_help = "Show node dispatch frame statistics",
.function = show_frame_stats,
};
-/* *INDENT-ON* */
/* Change ownership of enqueue rights to given next node. */
static void
@@ -634,13 +632,11 @@ vlib_cli_elog_clear (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_clear_cli, static) = {
.path = "event-logger clear",
.short_help = "Clear the event log",
.function = vlib_cli_elog_clear,
};
-/* *INDENT-ON* */
#ifdef CLIB_UNIX
static clib_error_t *
@@ -689,13 +685,11 @@ vlib_post_mortem_dump (void)
(vgm->post_mortem_callbacks[i]) ();
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_save_cli, static) = {
.path = "event-logger save",
.short_help = "event-logger save <filename> (saves log in /tmp/<filename>)",
.function = elog_save_buffer,
};
-/* *INDENT-ON* */
static clib_error_t *
elog_stop (vlib_main_t * vm,
@@ -709,13 +703,11 @@ elog_stop (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_stop_cli, static) = {
.path = "event-logger stop",
.short_help = "Stop the event-logger",
.function = elog_stop,
};
-/* *INDENT-ON* */
static clib_error_t *
elog_restart (vlib_main_t * vm,
@@ -729,13 +721,11 @@ elog_restart (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_restart_cli, static) = {
.path = "event-logger restart",
.short_help = "Restart the event-logger",
.function = elog_restart,
};
-/* *INDENT-ON* */
static clib_error_t *
elog_resize_command_fn (vlib_main_t * vm,
@@ -759,13 +749,11 @@ elog_resize_command_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_resize_cli, static) = {
.path = "event-logger resize",
.short_help = "event-logger resize <nnn>",
.function = elog_resize_command_fn,
};
-/* *INDENT-ON* */
#endif /* CLIB_UNIX */
@@ -818,13 +806,11 @@ elog_show_buffer (vlib_main_t * vm,
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (elog_show_cli, static) = {
.path = "show event-logger",
.short_help = "Show event logger info",
.function = elog_show_buffer,
};
-/* *INDENT-ON* */
void
vlib_gdb_show_event_log (void)
@@ -981,7 +967,6 @@ dispatch_node (vlib_main_t * vm,
polling mode and vice versa. */
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_ADAPTIVE_MODE))
{
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) =
{
.function = (char *) __FUNCTION__,
@@ -992,7 +977,6 @@ dispatch_node (vlib_main_t * vm,
"interrupt", "polling",
},
};
- /* *INDENT-ON* */
struct
{
u32 node_name, vector_length, is_polling;
@@ -1597,7 +1581,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
if (is_main)
{
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (es) =
{
.format = "process tw start",
@@ -1608,7 +1591,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
.format = "process tw end: %d",
.format_args = "i4",
};
- /* *INDENT-ON* */
struct
{
diff --git a/src/vlib/node.c b/src/vlib/node.c
index c98f390e334..8f6c852188b 100644
--- a/src/vlib/node.c
+++ b/src/vlib/node.c
@@ -130,12 +130,10 @@ vlib_node_runtime_update (vlib_main_t * vm, u32 node_index, u32 next_index)
&& pf->next_frame_index >= i)
pf->next_frame_index += n_insert;
}
- /* *INDENT-OFF* */
pool_foreach (pf, nm->suspended_process_frames) {
if (pf->next_frame_index != ~0 && pf->next_frame_index >= i)
pf->next_frame_index += n_insert;
}
- /* *INDENT-ON* */
r->n_next_nodes = vec_len (node->next_nodes);
}
@@ -223,7 +221,6 @@ vlib_node_add_next_with_slot (vlib_main_t * vm,
{
uword sib_node_index, sib_slot;
vlib_node_t *sib_node;
- /* *INDENT-OFF* */
clib_bitmap_foreach (sib_node_index, node->sibling_bitmap) {
sib_node = vec_elt (nm->nodes, sib_node_index);
if (sib_node != node)
@@ -232,7 +229,6 @@ vlib_node_add_next_with_slot (vlib_main_t * vm,
ASSERT (sib_slot == slot);
}
}
- /* *INDENT-ON* */
}
vlib_worker_thread_barrier_release (vm);
diff --git a/src/vlib/node_cli.c b/src/vlib/node_cli.c
index 075430e4761..d0bdf5b9097 100644
--- a/src/vlib/node_cli.c
+++ b/src/vlib/node_cli.c
@@ -85,13 +85,11 @@ show_node_graph (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_node_graph_command, static) = {
.path = "show vlib graph",
.short_help = "Show packet processing node graph",
.function = show_node_graph,
};
-/* *INDENT-ON* */
static clib_error_t *
show_node_graphviz (vlib_main_t * vm,
@@ -324,14 +322,12 @@ show_node_graphviz (vlib_main_t * vm,
* @cliend
* @cliexcmd{show vlib graphviz [filter][calls][vectors][file <filename>]}
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_node_graphviz_command, static) = {
.path = "show vlib graphviz",
.short_help = "Dump packet processing node graph as a graphviz dotfile",
.function = show_node_graphviz,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
static u8 *
format_vlib_node_state (u8 * s, va_list * va)
@@ -630,14 +626,12 @@ show_node_runtime (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_node_runtime_command, static) = {
.path = "show runtime",
.short_help = "Show packet processing runtime",
.function = show_node_runtime,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
static clib_error_t *
clear_node_runtime (vlib_main_t * vm,
@@ -685,13 +679,11 @@ clear_node_runtime (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (clear_node_runtime_command, static) = {
.path = "clear runtime",
.short_help = "Clear packet processing runtime statistics",
.function = clear_node_runtime,
};
-/* *INDENT-ON* */
static clib_error_t *
show_node (vlib_main_t * vm, unformat_input_t * input,
@@ -811,7 +803,6 @@ show_node (vlib_main_t * vm, unformat_input_t * input,
if (n->type == VLIB_NODE_TYPE_INTERNAL)
{
int j = 0;
- /* *INDENT-OFF* */
clib_bitmap_foreach (i, n->prev_node_bitmap) {
vlib_node_t *pn = vlib_get_node (vm, i);
if (j++ % 3 == 0)
@@ -820,7 +811,6 @@ show_node (vlib_main_t * vm, unformat_input_t * input,
s = format (s, "%-35v", s2);
vec_reset_length (s2);
}
- /* *INDENT-ON* */
if (vec_len (s) == 0)
s = format (s, "\n none");
@@ -855,7 +845,6 @@ done:
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_node_command, static) = {
.path = "show node",
.short_help = "show node [index] <node-name | node-index>",
@@ -908,13 +897,11 @@ done:
return err;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (set_node_fn_command, static) = {
.path = "set node function",
.short_help = "set node function <node-name> <variant-name>",
.function = set_node_fn,
};
-/* *INDENT-ON* */
/* Dummy function to get us linked in. */
void
diff --git a/src/vlib/node_format.c b/src/vlib/node_format.c
index 54cea9ff804..9e0d1a7de6f 100644
--- a/src/vlib/node_format.c
+++ b/src/vlib/node_format.c
@@ -73,13 +73,11 @@ format_vlib_node_graph (u8 * s, va_list * va)
}
j = 0;
- /* *INDENT-OFF* */
clib_bitmap_foreach (i, n->prev_node_bitmap) {
vec_validate_init_empty (tmps, j, empty);
tmps[j].prev_node = i;
j++;
}
- /* *INDENT-ON* */
for (i = 0; i < vec_len (tmps); i++)
{
diff --git a/src/vlib/pci/pci.h b/src/vlib/pci/pci.h
index 06a2a176419..becfa80f37a 100644
--- a/src/vlib/pci/pci.h
+++ b/src/vlib/pci/pci.h
@@ -43,7 +43,6 @@
#include <vlib/vlib.h>
#include <vlib/pci/pci_config.h>
-/* *INDENT-OFF* */
typedef CLIB_PACKED (union
{
struct
@@ -55,7 +54,6 @@ typedef CLIB_PACKED (union
};
u32 as_u32;
}) vlib_pci_addr_t;
-/* *INDENT-ON* */
typedef struct vlib_pci_device_info
{
diff --git a/src/vlib/physmem.c b/src/vlib/physmem.c
index 15e912fd9e7..c6727bb92cb 100644
--- a/src/vlib/physmem.c
+++ b/src/vlib/physmem.c
@@ -163,13 +163,11 @@ show_physmem (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_physmem_command, static) = {
.path = "show physmem",
.short_help = "show physmem [verbose | detail | map]",
.function = show_physmem,
};
-/* *INDENT-ON* */
static clib_error_t *
vlib_physmem_config (vlib_main_t * vm, unformat_input_t * input)
diff --git a/src/vlib/punt.c b/src/vlib/punt.c
index 4a5e42db203..b59e5d251be 100644
--- a/src/vlib/punt.c
+++ b/src/vlib/punt.c
@@ -254,12 +254,10 @@ punt_reg_mk_dp (vlib_punt_reason_t reason)
old = punt_dp_db[reason];
- /* *INDENT-OFF* */
hash_foreach (key, pri, punt_reg_db,
({
vec_add1(pris, pri);
}));
- /* *INDENT-ON* */
/*
* A check for an empty vector is done in the DP, so the a zero
@@ -594,26 +592,22 @@ punt_client_show (vlib_main_t * vm,
{
u8 *name;
- /* *INDENT-OFF* */
hash_foreach(name, pci, punt_client_db,
({
vlib_cli_output (vm, "%U", format_punt_client, pci,
PUNT_FORMAT_FLAG_NONE);
}));
- /* *INDENT-ON* */
}
return (NULL);
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (punt_client_show_command, static) =
{
.path = "show punt client",
.short_help = "show client[s] registered with the punt infra",
.function = punt_client_show,
};
-/* *INDENT-ON* */
static clib_error_t *
punt_reason_show (vlib_main_t * vm,
@@ -629,14 +623,12 @@ punt_reason_show (vlib_main_t * vm,
return (NULL);
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (punt_reason_show_command, static) =
{
.path = "show punt reasons",
.short_help = "show all punt reasons",
.function = punt_reason_show,
};
-/* *INDENT-ON* */
static clib_error_t *
punt_db_show (vlib_main_t * vm,
@@ -645,12 +637,10 @@ punt_db_show (vlib_main_t * vm,
u32 pri, ii, jj;
u64 key;
- /* *INDENT-OFF* */
hash_foreach (key, pri, punt_reg_db,
({
vlib_cli_output (vm, " %U", format_punt_reg, pri);
}));
- /* *INDENT-ON* */
vlib_cli_output (vm, "\nDerived data-plane data-base:");
vlib_cli_output (vm,
@@ -672,14 +662,12 @@ punt_db_show (vlib_main_t * vm,
return (NULL);
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (punt_db_show_command, static) =
{
.path = "show punt db",
.short_help = "show the punt DB",
.function = punt_db_show,
};
-/* *INDENT-ON* */
static clib_error_t *
punt_stats_show (vlib_main_t * vm,
@@ -699,14 +687,12 @@ punt_stats_show (vlib_main_t * vm,
return (NULL);
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (punt_stats_show_command, static) =
{
.path = "show punt stats",
.short_help = "show the punt stats",
.function = punt_stats_show,
};
-/* *INDENT-ON* */
static clib_error_t *
punt_init (vlib_main_t * vm)
diff --git a/src/vlib/punt_node.c b/src/vlib/punt_node.c
index de721046057..4b81a61715a 100644
--- a/src/vlib/punt_node.c
+++ b/src/vlib/punt_node.c
@@ -280,7 +280,6 @@ VLIB_NODE_FN (punt_dispatch_node) (vlib_main_t * vm,
return frame->n_vectors;
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (punt_dispatch_node) = {
.name = "punt-dispatch",
.vector_size = sizeof (u32),
@@ -293,7 +292,6 @@ VLIB_REGISTER_NODE (punt_dispatch_node) = {
},
};
-/* *INDENT-ON* */
#ifndef CLIB_MARCH_VARIANT
clib_error_t *
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index b96cbf9470c..f0cb69b3400 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -280,7 +280,6 @@ vlib_thread_init (vlib_main_t * vm)
if (tr->coremask)
{
uword c;
- /* *INDENT-OFF* */
clib_bitmap_foreach (c, tr->coremask) {
if (clib_bitmap_get(avail_cpu, c) == 0)
return clib_error_return (0, "cpu %u is not available to be used"
@@ -288,7 +287,6 @@ vlib_thread_init (vlib_main_t * vm)
avail_cpu = clib_bitmap_set(avail_cpu, c, 0);
}
- /* *INDENT-ON* */
}
else
{
@@ -1623,13 +1621,11 @@ vlib_worker_thread_fn (void *arg)
vlib_worker_loop (vm);
}
-/* *INDENT-OFF* */
VLIB_REGISTER_THREAD (worker_thread_reg, static) = {
.name = "workers",
.short_name = "wk",
.function = vlib_worker_thread_fn,
};
-/* *INDENT-ON* */
extern clib_march_fn_registration
*vlib_frame_queue_dequeue_with_aux_fn_march_fn_registrations;
@@ -1751,14 +1747,12 @@ show_clock_command_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (f_command, static) =
{
.path = "show clock",
.short_help = "show clock",
.function = show_clock_command_fn,
};
-/* *INDENT-ON* */
vlib_thread_main_t *
vlib_get_thread_main_not_inline (void)
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index 9617cdd32e3..ac0c1d5d266 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -363,12 +363,10 @@ vlib_worker_thread_barrier_check (void)
if (PREDICT_FALSE (vlib_worker_threads->barrier_elog_enabled))
{
vlib_worker_thread_t *w = vlib_worker_threads + thread_index;
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) = {
.format = "barrier-wait-thread-%d",
.format_args = "i4",
};
- /* *INDENT-ON* */
struct
{
@@ -412,12 +410,10 @@ vlib_worker_thread_barrier_check (void)
{
t = vlib_time_now (vm) - t;
vlib_worker_thread_t *w = vlib_worker_threads + thread_index;
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) = {
.format = "barrier-refork-thread-%d",
.format_args = "i4",
};
- /* *INDENT-ON* */
struct
{
@@ -439,12 +435,10 @@ vlib_worker_thread_barrier_check (void)
{
t = vlib_time_now (vm) - t;
vlib_worker_thread_t *w = vlib_worker_threads + thread_index;
- /* *INDENT-OFF* */
ELOG_TYPE_DECLARE (e) = {
.format = "barrier-released-thread-%d: %dus",
.format_args = "i4i4",
};
- /* *INDENT-ON* */
struct
{
diff --git a/src/vlib/threads_cli.c b/src/vlib/threads_cli.c
index 9b304664283..2872a025d66 100644
--- a/src/vlib/threads_cli.c
+++ b/src/vlib/threads_cli.c
@@ -85,13 +85,11 @@ show_threads_fn (vlib_main_t * vm,
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_threads_command, static) = {
.path = "show threads",
.short_help = "Show threads",
.function = show_threads_fn,
};
-/* *INDENT-ON* */
/*
* Trigger threads to grab frame queue trace data
@@ -181,14 +179,12 @@ done:
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cmd_trace_frame_queue,static) = {
.path = "trace frame-queue",
.short_help = "trace frame-queue (on|off)",
.function = trace_frame_queue,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
/*
@@ -363,21 +359,17 @@ show_frame_queue_histogram (vlib_main_t * vm, unformat_input_t * input,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cmd_show_frame_queue_trace,static) = {
.path = "show frame-queue",
.short_help = "show frame-queue trace",
.function = show_frame_queue_trace,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cmd_show_frame_queue_histogram,static) = {
.path = "show frame-queue histogram",
.short_help = "show frame-queue histogram",
.function = show_frame_queue_histogram,
};
-/* *INDENT-ON* */
/*
@@ -446,13 +438,11 @@ done:
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cmd_test_frame_queue_nelts,static) = {
.path = "test frame-queue nelts",
.short_help = "test frame-queue nelts (4,8,16,32)",
.function = test_frame_queue_nelts,
};
-/* *INDENT-ON* */
/*
@@ -525,13 +515,11 @@ done:
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cmd_test_frame_queue_threshold,static) = {
.path = "test frame-queue threshold",
.short_help = "test frame-queue threshold N (0=no limit)",
.function = test_frame_queue_threshold,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/trace.c b/src/vlib/trace.c
index 15355572cb9..fa085387e4b 100644
--- a/src/vlib/trace.c
+++ b/src/vlib/trace.c
@@ -173,12 +173,10 @@ format_vlib_trace (u8 * s, va_list * va)
}
/* Root of all trace cli commands. */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (trace_cli_command,static) = {
.path = "trace",
.short_help = "Packet tracer commands",
};
-/* *INDENT-ON* */
int
trace_time_cmp (void *a1, void *a2)
@@ -256,7 +254,6 @@ trace_apply_filter (vlib_main_t * vm)
* of any N traces.
*/
n_accepted = 0;
- /* *INDENT-OFF* */
pool_foreach (h, tm->trace_buffer_pool)
{
accept = filter_accept(tm, h[0]);
@@ -266,7 +263,6 @@ trace_apply_filter (vlib_main_t * vm)
else
n_accepted++;
}
- /* *INDENT-ON* */
/* remove all traces that we don't want to keep */
for (index = 0; index < vec_len (traces_to_remove); index++)
@@ -357,13 +353,11 @@ cli_show_trace_buffer (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_trace_cli,static) = {
.path = "show trace",
.short_help = "Show trace buffer [max COUNT]",
.function = cli_show_trace_buffer,
};
-/* *INDENT-ON* */
int vlib_enable_disable_pkt_trace_filter (int enable) __attribute__ ((weak));
@@ -471,13 +465,11 @@ done:
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (add_trace_cli,static) = {
.path = "trace add",
.short_help = "trace add <input-graph-node> <add'l-pkts-for-node-> [filter] [verbose]",
.function = cli_add_trace_buffer,
};
-/* *INDENT-ON* */
/*
* Configure a filter for packet traces.
@@ -575,13 +567,11 @@ cli_filter_trace (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (filter_trace_cli,static) = {
.path = "trace filter",
.short_help = "trace filter none | [include|exclude] NODE COUNT",
.function = cli_filter_trace,
};
-/* *INDENT-ON* */
static clib_error_t *
cli_clear_trace_buffer (vlib_main_t * vm,
@@ -591,13 +581,11 @@ cli_clear_trace_buffer (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (clear_trace_cli,static) = {
.path = "clear trace",
.short_help = "Clear trace buffer and free memory",
.function = cli_clear_trace_buffer,
};
-/* *INDENT-ON* */
/* Placeholder function to get us linked in. */
void
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index cb13e0f09fa..90cf61d811d 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -3317,21 +3317,17 @@ unix_cli_quit (vlib_main_t * vm,
* If VPP is running in @em interactive mode and this is the console session
* (that is, the session on @c stdin) then this will also terminate VPP.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (unix_cli_quit_command, static) = {
.path = "quit",
.short_help = "Exit CLI",
.function = unix_cli_quit,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (unix_cli_q_command, static) = {
.path = "q",
.short_help = "Exit CLI",
.function = unix_cli_quit,
};
-/* *INDENT-ON* */
/** CLI command to execute a VPP command script. */
static clib_error_t *
@@ -3466,14 +3462,12 @@ done:
* Example of how to execute a set of CLI commands from a file:
* @cliexcmd{exec /usr/share/vpp/scripts/gigup.txt}
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_exec, static) = {
.path = "exec",
.short_help = "exec <filename>",
.function = unix_cli_exec,
.is_mp_safe = 1,
};
-/* *INDENT-ON* */
/** CLI command to show various unix error statistics. */
static clib_error_t *
@@ -3542,13 +3536,11 @@ done:
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_show_errors, static) = {
.path = "show unix errors",
.short_help = "Show Unix system call error history",
.function = unix_show_errors,
};
-/* *INDENT-ON* */
/** CLI command to show various unix error statistics. */
static clib_error_t *
@@ -3564,7 +3556,6 @@ unix_show_files (vlib_main_t * vm,
vlib_cli_output (vm, "%3s %6s %12s %12s %12s %-32s %s", "FD", "Thread",
"Read", "Write", "Error", "File Name", "Description");
- /* *INDENT-OFF* */
pool_foreach (f, fm->file_pool)
{
int rv;
@@ -3579,19 +3570,16 @@ unix_show_files (vlib_main_t * vm,
path, f->description);
vec_reset_length (s);
}
- /* *INDENT-ON* */
vec_free (s);
return error;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_show_files, static) = {
.path = "show unix files",
.short_help = "Show Unix files in use",
.function = unix_show_files,
};
-/* *INDENT-ON* */
/** CLI command to show session command history. */
static clib_error_t *
@@ -3622,13 +3610,11 @@ unix_cli_show_history (vlib_main_t * vm,
/*?
* Displays the command history for the current session, if any.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_show_history, static) = {
.path = "history",
.short_help = "Show current session command history",
.function = unix_cli_show_history,
};
-/* *INDENT-ON* */
/** CLI command to show terminal status. */
static clib_error_t *
@@ -3695,13 +3681,11 @@ unix_cli_show_terminal (vlib_main_t * vm,
* CRLF mode: LF
* @cliexend
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_show_terminal, static) = {
.path = "show terminal",
.short_help = "Show current session terminal settings",
.function = unix_cli_show_terminal,
};
-/* *INDENT-ON* */
/** CLI command to display a list of CLI sessions. */
static clib_error_t *
@@ -3778,13 +3762,11 @@ unix_cli_show_cli_sessions (vlib_main_t * vm,
* - @em P EPIPE detected on connection; it will close soon.
* - @em A ANSI-capable terminal.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_show_cli_sessions, static) = {
.path = "show cli-sessions",
.short_help = "Show current CLI sessions",
.function = unix_cli_show_cli_sessions,
};
-/* *INDENT-ON* */
/** CLI command to set terminal pager settings. */
static clib_error_t *
@@ -3835,13 +3817,11 @@ done:
* Additionally allows the pager buffer size to be set; though note that
* this value is set globally and not per session.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_pager, static) = {
.path = "set terminal pager",
.short_help = "set terminal pager [on|off] [limit <lines>]",
.function = unix_cli_set_terminal_pager,
};
-/* *INDENT-ON* */
/** CLI command to set terminal history settings. */
static clib_error_t *
@@ -3906,13 +3886,11 @@ done:
* This command also allows the maximum size of the history buffer for
* this session to be altered.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_history, static) = {
.path = "set terminal history",
.short_help = "set terminal history [on|off] [limit <lines>]",
.function = unix_cli_set_terminal_history,
};
-/* *INDENT-ON* */
/** CLI command to set terminal ANSI settings. */
static clib_error_t *
@@ -3945,13 +3923,11 @@ unix_cli_set_terminal_ansi (vlib_main_t * vm,
* ANSI control sequences are used in a small number of places to provide,
* for example, color text output and to control the cursor in the pager.
?*/
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_ansi, static) = {
.path = "set terminal ansi",
.short_help = "set terminal ansi [on|off]",
.function = unix_cli_set_terminal_ansi,
};
-/* *INDENT-ON* */
#define MAX_CLI_WAIT 86400
@@ -3985,13 +3961,11 @@ unix_wait_cmd (vlib_main_t * vm,
unformat_free (line_input);
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_wait_cmd, static) = {
.path = "wait",
.short_help = "wait <sec>",
.function = unix_wait_cmd,
};
-/* *INDENT-ON* */
static clib_error_t *
echo_cmd (vlib_main_t * vm,
@@ -4012,13 +3986,11 @@ echo_cmd (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_unix_echo_cmd, static) = {
.path = "echo",
.short_help = "echo <rest-of-line>",
.function = echo_cmd,
};
-/* *INDENT-ON* */
static clib_error_t *
define_cmd_fn (vlib_main_t * vm,
@@ -4050,14 +4022,12 @@ define_cmd_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (define_cmd, static) = {
.path = "define",
.short_help = "define <variable-name> <value>",
.function = define_cmd_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
undefine_cmd_fn (vlib_main_t * vm,
@@ -4076,13 +4046,11 @@ undefine_cmd_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (undefine_cmd, static) = {
.path = "undefine",
.short_help = "undefine <variable-name>",
.function = undefine_cmd_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
show_macro_cmd_fn (vlib_main_t * vm,
@@ -4100,13 +4068,11 @@ show_macro_cmd_fn (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_macro, static) = {
.path = "show macro",
.short_help = "show macro [noevaluate]",
.function = show_macro_cmd_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
unix_cli_init (vlib_main_t * vm)
diff --git a/src/vlib/unix/input.c b/src/vlib/unix/input.c
index 6d244b049c9..e96cd902466 100644
--- a/src/vlib/unix/input.c
+++ b/src/vlib/unix/input.c
@@ -370,13 +370,11 @@ linux_epoll_input (vlib_main_t * vm,
return linux_epoll_input_inline (vm, node, frame, thread_index);
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (linux_epoll_input_node,static) = {
.function = linux_epoll_input,
.type = VLIB_NODE_TYPE_PRE_INPUT,
.name = "unix-epoll-input",
};
-/* *INDENT-ON* */
clib_error_t *
linux_epoll_input_init (vlib_main_t * vm)
@@ -419,12 +417,10 @@ unix_input_init (vlib_main_t * vm)
return 0;
}
-/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (unix_input_init) =
{
.runs_before = VLIB_INITS ("linux_epoll_input_init"),
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index f09a537a48d..38eef4125a9 100644
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -71,12 +71,10 @@ unix_main_init (vlib_main_t * vm)
return 0;
}
-/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (unix_main_init) =
{
.runs_before = VLIB_INITS ("unix_input_init"),
};
-/* *INDENT-ON* */
static int
unsetup_signal_handlers (int sig)
@@ -284,14 +282,12 @@ startup_config_process (vlib_main_t * vm,
return 0;
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (startup_config_node,static) = {
.function = startup_config_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "startup-config-process",
.process_log2_n_stack_bytes = 18,
};
-/* *INDENT-ON* */
static clib_error_t *
unix_config (vlib_main_t * vm, unformat_input_t * input)
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index 1260089f4ff..fd3a050b944 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -640,7 +640,6 @@ vlib_plugins_show_cmd_fn (vlib_main_t * vm,
s = format (s, " Plugin path is: %s\n\n", pm->plugin_path);
s = format (s, " %-41s%-33s%s\n", "Plugin", "Version", "Description");
- /* *INDENT-OFF* */
hash_foreach_mem (key, value, pm->plugin_by_name_hash,
{
if (key != 0)
@@ -652,21 +651,18 @@ vlib_plugins_show_cmd_fn (vlib_main_t * vm,
index++;
}
});
- /* *INDENT-ON* */
vlib_cli_output (vm, "%v", s);
vec_free (s);
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (plugins_show_cmd, static) =
{
.path = "show plugins",
.short_help = "show loaded plugins",
.function = vlib_plugins_show_cmd_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
config_one_plugin (vlib_main_t * vm, char *name, unformat_input_t * input)