misc: remove GNU Indent directives

Type: refactor
Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2024-03-12 17:42:49 +01:00
committed by Florin Coras
parent e2ed599331
commit c3148b1be8
649 changed files with 1 additions and 4341 deletions

View File

@ -22,13 +22,11 @@
handoffdemo_main_t handoffdemo_main;
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = "handoff demo plugin",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -164,7 +164,6 @@ handoffdemo_node_1_fn (vlib_main_t * vm,
0 /* is_trace */ );
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (handoffdemo_node_1) =
{
.name = "handoffdemo-1",
@ -183,7 +182,6 @@ VLIB_REGISTER_NODE (handoffdemo_node_1) =
[HANDOFFDEMO_NEXT_DROP] = "error-drop",
},
};
/* *INDENT-ON* */
uword
handoffdemo_node_2_fn (vlib_main_t * vm,
@ -197,7 +195,6 @@ handoffdemo_node_2_fn (vlib_main_t * vm,
0 /* is_trace */ );
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (handoffdemo_node_2) =
{
.name = "handoffdemo-2",
@ -216,7 +213,6 @@ VLIB_REGISTER_NODE (handoffdemo_node_2) =
[HANDOFFDEMO_NEXT_DROP] = "error-drop",
},
};
/* *INDENT-ON* */
static clib_error_t *
handoffdemo_node_init (vlib_main_t * vm)

View File

@ -688,7 +688,6 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
}
#endif
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (sample_node) =
{
.name = "sample",
@ -706,7 +705,6 @@ VLIB_REGISTER_NODE (sample_node) =
[SAMPLE_NEXT_INTERFACE_OUTPUT] = "interface-output",
},
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -30,12 +30,10 @@
#define REPLY_MSG_ID_BASE sm->msg_id_base
#include <vlibapi/api_helper_macros.h>
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = SAMPLE_PLUGIN_BUILD_VER,
.description = "Sample of VPP Plugin",
};
/* *INDENT-ON* */
sample_main_t sample_main;

View File

@ -105,13 +105,11 @@ test_elog_command_fn (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (test_elog_command, static) = {
.path = "test elog sample",
.short_help = "test elog sample",
.function = test_elog_command_fn,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -30,12 +30,10 @@ main_stub_init (vlib_main_t * vm)
return error;
}
/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (main_stub_init) =
{
.runs_after = VLIB_INITS("unix_physmem_init", "unix_cli_init"),
};
/* *INDENT-ON* */
#if 0
/* Node test code. */
@ -105,7 +103,6 @@ my_func (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
return i;
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (my_node1,static) = {
.function = my_func,
.type = VLIB_NODE_TYPE_INPUT,
@ -117,16 +114,13 @@ VLIB_REGISTER_NODE (my_node1,static) = {
[0] = "my-node2",
},
};
/* *INDENT-ON* */
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (my_node2,static) = {
.function = my_func,
.name = "my-node2",
.scalar_size = sizeof (my_frame_t),
.vector_size = STRUCT_SIZE_OF (my_frame_t, vector[0]),
};
/* *INDENT-ON* */
#endif
@ -209,13 +203,11 @@ my_proc (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
return i;
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (my_proc_node,static) = {
.function = my_proc,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "my-proc",
};
/* *INDENT-ON* */
static uword
my_proc_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
@ -250,13 +242,11 @@ my_proc_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
return 0;
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (my_proc_input_node,static) = {
.function = my_proc_input,
.type = VLIB_NODE_TYPE_INPUT,
.name = "my-proc-input",
};
/* *INDENT-ON* */
static uword
_unformat_farith (unformat_input_t * i, va_list * args)
@ -384,7 +374,6 @@ bar_command (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (bar_command2, static) = {
.path = "bar %decimal_integer",
.short_help = "bar1 command",
@ -403,7 +392,6 @@ VLIB_CLI_COMMAND (bar_command3, static) = {
.function = bar_command,
.function_arg = 3,
};
/* *INDENT-ON* */
#endif

View File

@ -245,12 +245,10 @@ mc_test_process (vlib_main_t * vm,
}
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (mc_test_process_node, static) =
{
.function = mc_test_process,.type = VLIB_NODE_TYPE_PROCESS,.name =
"mc-test-process",};
/* *INDENT-ON* */
static clib_error_t *
mc_test_command (vlib_main_t * vm,
@ -277,12 +275,10 @@ mc_test_command (vlib_main_t * vm,
return unformat_parse_error (input);
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (test_mc_command, static) =
{
.path = "test mc",.short_help = "Test mc command",.function =
mc_test_command,};
/* *INDENT-ON* */
static clib_error_t *
mc_show_command (vlib_main_t * vm,
@ -293,12 +289,10 @@ mc_show_command (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_mc_command, static) =
{
.path = "show mc",.short_help = "Show mc command",.function =
mc_show_command,};
/* *INDENT-ON* */
static clib_error_t *
mc_clear_command (vlib_main_t * vm,
@ -309,12 +303,10 @@ mc_clear_command (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (clear_mc_command, static) =
{
.path = "clear mc",.short_help = "Clear mc command",.function =
mc_clear_command,};
/* *INDENT-ON* */
static clib_error_t *
mc_config (vlib_main_t * vm, unformat_input_t * input)

View File

@ -250,12 +250,10 @@ abf_api_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (abf_api_init);
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "Access Control List (ACL) Based Forwarding",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -399,7 +399,6 @@ abf_itf_attach_cmd (vlib_main_t * vm,
return (NULL);
}
/* *INDENT-OFF* */
/**
* Attach an ABF policy to an interface.
*/
@ -409,7 +408,6 @@ VLIB_CLI_COMMAND (abf_itf_attach_cmd_node, static) = {
.short_help = "abf attach <ip4|ip6> [del] policy <value> <interface>",
// this is not MP safe
};
/* *INDENT-ON* */
static clib_error_t *
abf_show_attach_cmd (vlib_main_t * vm,
@ -438,7 +436,6 @@ abf_show_attach_cmd (vlib_main_t * vm,
vlib_cli_output (vm, "specify an interface");
}
/* *INDENT-OFF* */
FOR_EACH_FIB_IP_PROTOCOL(fproto)
{
if (sw_if_index < vec_len(abf_per_itf[fproto]))
@ -453,31 +450,26 @@ abf_show_attach_cmd (vlib_main_t * vm,
}
}
}
/* *INDENT-ON* */
return (NULL);
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (abf_show_attach_cmd_node, static) = {
.path = "show abf attach",
.function = abf_show_attach_cmd,
.short_help = "show abf attach <interface>",
.is_mp_safe = 1,
};
/* *INDENT-ON* */
void
abf_itf_attach_walk (abf_itf_attach_walk_cb_t cb, void *ctx)
{
u32 aii;
/* *INDENT-OFF* */
pool_foreach_index (aii, abf_itf_attach_pool)
{
if (!cb(aii, ctx))
break;
}
/* *INDENT-ON* */
}
typedef enum abf_next_t_
@ -657,7 +649,6 @@ static char *abf_error_strings[] = {
#undef abf_error
};
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (abf_ip4_node) =
{
.function = abf_input_ip4,
@ -703,7 +694,6 @@ VNET_FEATURE_INIT (abf_ip6_feat, static) =
.node_name = "abf-input-ip6",
.runs_after = VNET_FEATURES ("acl-plugin-in-ip6-fa"),
};
/* *INDENT-ON* */
static fib_node_t *
abf_itf_attach_get_node (fib_node_index_t index)
@ -772,12 +762,10 @@ abf_itf_bond_init (vlib_main_t * vm)
return (NULL);
}
/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (abf_itf_bond_init) =
{
.runs_after = VLIB_INITS("acl_init"),
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -315,7 +315,6 @@ out:
return (NULL);
}
/* *INDENT-OFF* */
/**
* Create an ABF policy.
*/
@ -325,7 +324,6 @@ VLIB_CLI_COMMAND (abf_policy_cmd_node, static) = {
.short_help = "abf policy [add|del] id <index> acl <index> via ...",
.is_mp_safe = 1,
};
/* *INDENT-ON* */
static u8 *
format_abf (u8 * s, va_list * args)
@ -352,13 +350,11 @@ abf_policy_walk (abf_policy_walk_cb_t cb, void *ctx)
{
u32 api;
/* *INDENT-OFF* */
pool_foreach_index (api, abf_policy_pool)
{
if (!cb(api, ctx))
break;
}
/* *INDENT-ON* */
}
static clib_error_t *
@ -381,12 +377,10 @@ abf_show_policy_cmd (vlib_main_t * vm,
if (INDEX_INVALID == policy_id)
{
/* *INDENT-OFF* */
pool_foreach (ap, abf_policy_pool)
{
vlib_cli_output(vm, "%U", format_abf, ap);
}
/* *INDENT-ON* */
}
else
{
@ -401,14 +395,12 @@ abf_show_policy_cmd (vlib_main_t * vm,
return (NULL);
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node, static) = {
.path = "show abf policy",
.function = abf_show_policy_cmd,
.short_help = "show abf policy <value>",
.is_mp_safe = 1,
};
/* *INDENT-ON* */
static fib_node_t *
abf_policy_get_node (fib_node_index_t index)

View File

@ -52,12 +52,10 @@ acl_main_t acl_main;
#include <vppinfra/bihash_template.h>
#include <vppinfra/bihash_template.c>
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "Access Control Lists (ACL)",
};
/* *INDENT-ON* */
/* methods exported from ACL-as-a-service */
static acl_plugin_methods_t acl_plugin;
@ -109,12 +107,10 @@ vl_api_acl_plugin_control_ping_t_handler (vl_api_acl_plugin_control_ping_t *
acl_main_t *am = &acl_main;
int rv = 0;
/* *INDENT-OFF* */
REPLY_MACRO2 (VL_API_ACL_PLUGIN_CONTROL_PING_REPLY,
({
rmp->vpe_pid = ntohl (getpid ());
}));
/* *INDENT-ON* */
}
static void
@ -687,7 +683,6 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index,
format_bitmap_hex, old_seen_acl_bitmap, format_bitmap_hex,
seen_acl_bitmap, format_bitmap_hex, change_acl_bitmap);
/* *INDENT-OFF* */
clib_bitmap_foreach (acln, change_acl_bitmap) {
if (clib_bitmap_get(old_seen_acl_bitmap, acln)) {
/* ACL is being removed. */
@ -701,7 +696,6 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index,
vec_add1((*pinout_sw_if_index_vec_by_acl)[acln], sw_if_index);
}
}
/* *INDENT-ON* */
vec_free ((*pinout_acl_vec_by_sw_if_index)[sw_if_index]);
(*pinout_acl_vec_by_sw_if_index)[sw_if_index] =
@ -1810,12 +1804,10 @@ vl_api_acl_add_replace_t_handler (vl_api_acl_add_replace_t * mp)
rv = VNET_API_ERROR_INVALID_VALUE;
}
/* *INDENT-OFF* */
REPLY_MACRO2(VL_API_ACL_ADD_REPLACE_REPLY,
({
rmp->acl_index = htonl(acl_list_index);
}));
/* *INDENT-ON* */
}
static void
@ -1977,13 +1969,11 @@ vl_api_acl_dump_t_handler (vl_api_acl_dump_t * mp)
if (mp->acl_index == ~0)
{
/* *INDENT-OFF* */
/* Just dump all ACLs */
pool_foreach (acl, am->acls)
{
send_acl_details(am, reg, acl, mp->context);
}
/* *INDENT-ON* */
}
else
{
@ -2063,12 +2053,10 @@ vl_api_acl_interface_list_dump_t_handler (vl_api_acl_interface_list_dump_t *
if (mp->sw_if_index == ~0)
{
/* *INDENT-OFF* */
pool_foreach (swif, im->sw_interfaces)
{
send_acl_interface_list_details(am, reg, swif->sw_if_index, mp->context);
}
/* *INDENT-ON* */
}
else
{
@ -2099,12 +2087,10 @@ vl_api_macip_acl_add_t_handler (vl_api_macip_acl_add_t * mp)
rv = VNET_API_ERROR_INVALID_VALUE;
}
/* *INDENT-OFF* */
REPLY_MACRO2(VL_API_MACIP_ACL_ADD_REPLY,
({
rmp->acl_index = htonl(acl_list_index);
}));
/* *INDENT-ON* */
}
static void
@ -2126,12 +2112,10 @@ vl_api_macip_acl_add_replace_t_handler (vl_api_macip_acl_add_replace_t * mp)
rv = VNET_API_ERROR_INVALID_VALUE;
}
/* *INDENT-OFF* */
REPLY_MACRO2(VL_API_MACIP_ACL_ADD_REPLACE_REPLY,
({
rmp->acl_index = htonl(acl_list_index);
}));
/* *INDENT-ON* */
}
static void
@ -2228,12 +2212,10 @@ vl_api_macip_acl_dump_t_handler (vl_api_macip_acl_dump_t * mp)
if (mp->acl_index == ~0)
{
/* Just dump all ACLs for now, with sw_if_index = ~0 */
/* *INDENT-OFF* */
pool_foreach (acl, am->macip_acls)
{
send_macip_acl_details (am, reg, acl, mp->context);
}
/* *INDENT-ON* */
}
else
{
@ -2437,12 +2419,10 @@ static void
if (mp->sw_if_index == ~0)
{
/* *INDENT-OFF* */
pool_foreach (swif, im->sw_interfaces)
{
send_acl_interface_etype_whitelist_details(am, reg, swif->sw_if_index, mp->context);
}
/* *INDENT-ON* */
}
else
{
@ -3350,7 +3330,6 @@ acl_plugin_show_sessions (acl_main_t * am,
vlib_cli_output (vm, " link list id: %u", sess->link_list_id);
}
vlib_cli_output (vm, " connection add/del stats:", wk);
/* *INDENT-OFF* */
pool_foreach (swif, im->sw_interfaces)
{
u32 sw_if_index = swif->sw_if_index;
@ -3375,7 +3354,6 @@ acl_plugin_show_sessions (acl_main_t * am,
n_dels,
n_epoch_changes);
}
/* *INDENT-ON* */
vlib_cli_output (vm, " connection timeout type lists:", wk);
u8 tt = 0;
@ -3537,7 +3515,6 @@ acl_clear_aclplugin_fn (vlib_main_t * vm,
return error;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (aclplugin_set_command, static) = {
.path = "set acl-plugin",
.short_help = "set acl-plugin session timeout {{udp idle}|tcp {idle|transient}} <seconds>",
@ -3653,7 +3630,6 @@ VLIB_CLI_COMMAND (aclplugin_set_acl_command, static) = {
"rules}",
.function = acl_set_aclplugin_acl_fn,
};
/* *INDENT-ON* */
/*?
* Delete an Access Control List (ACL)

View File

@ -44,7 +44,6 @@ typedef struct
u8 action;
} acl_fa_trace_t;
/* *INDENT-OFF* */
#define foreach_acl_fa_error \
_(ACL_DROP, "ACL deny packets") \
_(ACL_PERMIT, "ACL permit packets") \
@ -63,7 +62,6 @@ typedef enum
ACL_FA_N_ERROR,
} acl_fa_error_t;
/* *INDENT-ON* */
always_inline u16
get_current_policy_epoch (acl_main_t * am, int is_input, u32 sw_if_index0)
@ -728,7 +726,6 @@ format_acl_plugin_trace (u8 * s, va_list * args)
return s;
}
/* *INDENT-OFF* */
static char *acl_fa_error_strings[] = {
#define _(sym,string) string,
@ -973,7 +970,6 @@ VNET_FEATURE_INIT (acl_out_ip4_fa_feature, static) = {
.runs_before = VNET_FEATURES ("ip4-dvr-reinject", "interface-output"),
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -45,7 +45,6 @@ typedef struct
u8 action;
} acl_fa_trace_t;
/* *INDENT-OFF* */
#define foreach_acl_fa_error \
_(ACL_DROP, "ACL deny packets") \
_(ACL_PERMIT, "ACL permit packets") \
@ -64,7 +63,6 @@ typedef enum
ACL_FA_N_ERROR,
} acl_fa_error_t;
/* *INDENT-ON* */
typedef struct
{
@ -109,7 +107,6 @@ _(DROP, "dropped outbound non-whitelisted non-ip packets") \
_(PERMIT, "permitted outbound whitelisted non-ip packets") \
/* *INDENT-OFF* */
typedef enum
{
@ -138,7 +135,6 @@ static char *fa_out_nonip_error_strings[] = {
foreach_nonip_out_error
#undef _
};
/* *INDENT-ON* */
always_inline int
@ -237,7 +233,6 @@ VLIB_NODE_FN (acl_out_nonip_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (acl_in_nonip_node) =
{
@ -283,7 +278,6 @@ VNET_FEATURE_INIT (acl_out_l2_nonip_fa_feature, static) =
.runs_before = VNET_FEATURES ("l2-output-feat-arc-end"),
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -261,13 +261,11 @@ static u32
find_mask_type_index(acl_main_t *am, fa_5tuple_t *mask)
{
ace_mask_type_entry_t *mte;
/* *INDENT-OFF* */
pool_foreach (mte, am->ace_mask_type_pool)
{
if(memcmp(&mte->mask, mask, sizeof(*mask)) == 0)
return (mte - am->ace_mask_type_pool);
}
/* *INDENT-ON* */
return ~0;
}
@ -1159,7 +1157,6 @@ acl_plugin_show_tables_mask_type (void)
ace_mask_type_entry_t *mte;
vlib_cli_output (vm, "Mask-type entries:");
/* *INDENT-OFF* */
pool_foreach (mte, am->ace_mask_type_pool)
{
vlib_cli_output(vm, " %3d: %016llx %016llx %016llx %016llx %016llx %016llx refcount %d",
@ -1167,7 +1164,6 @@ acl_plugin_show_tables_mask_type (void)
mte->mask.kv_40_8.key[0], mte->mask.kv_40_8.key[1], mte->mask.kv_40_8.key[2],
mte->mask.kv_40_8.key[3], mte->mask.kv_40_8.key[4], mte->mask.kv_40_8.value, mte->refcount);
}
/* *INDENT-ON* */
}
void

View File

@ -328,7 +328,6 @@ acl_fa_check_idle_sessions (acl_main_t * am, u16 thread_index, u64 now)
*/
/* *INDENT-OFF* */
#define foreach_acl_fa_cleaner_error \
_(UNKNOWN_EVENT, "unknown event received") \
/* end of errors */
@ -347,7 +346,6 @@ static char *acl_fa_cleaner_error_strings[] = {
#undef _
};
/* *INDENT-ON* */
static vlib_node_registration_t acl_fa_session_cleaner_process_node;
static vlib_node_registration_t acl_fa_worker_session_cleaner_process_node;
@ -927,7 +925,6 @@ show_fa_sessions_hash (vlib_main_t * vm, u32 verbose)
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (acl_fa_worker_session_cleaner_process_node, static) = {
.function = acl_fa_worker_conn_cleaner_process,
@ -947,7 +944,6 @@ VLIB_REGISTER_NODE (acl_fa_session_cleaner_process_node, static) = {
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -150,21 +150,17 @@ adl_init (vlib_main_t * vm)
return 0;
}
/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (adl_init) =
{
.runs_after = VLIB_INITS ("ip4_allowlist_init", "ip6_allowlist_init"),
};
/* *INDENT-ON* */
/* *INDENT-OFF* */
VNET_FEATURE_INIT (adl, static) =
{
.arc_name = "device-input",
.node_name = "adl-input",
.runs_before = VNET_FEATURES ("ethernet-input"),
};
/* *INDENT-ON */
int adl_interface_enable_disable (u32 sw_if_index, int enable_disable)
{
@ -389,7 +385,6 @@ adl_allowlist_enable_disable_command_fn (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (adl_allowlist_command, static) =
{
.path = "adl allowlist",
@ -397,15 +392,12 @@ VLIB_CLI_COMMAND (adl_allowlist_command, static) =
"adl allowlist <interface-name> [ip4][ip6][default][fib-id <NN>][disable]",
.function = adl_allowlist_enable_disable_command_fn,
};
/* *INDENT-ON* */
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = "Allow/deny list plugin",
};
/* *INDENT-ON* */
/*

View File

@ -46,7 +46,6 @@ af_xdp_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
return args.error;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (af_xdp_create_command, static) = {
.path = "create interface af_xdp",
.short_help =
@ -55,7 +54,6 @@ VLIB_CLI_COMMAND (af_xdp_create_command, static) = {
"[prog pathname] [netns ns] [zero-copy|no-zero-copy] [no-syscall-lock]",
.function = af_xdp_create_command_fn,
};
/* *INDENT-ON* */
static clib_error_t *
af_xdp_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
@ -100,14 +98,12 @@ af_xdp_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (af_xdp_delete_command, static) = {
.path = "delete interface af_xdp",
.short_help = "delete interface af_xdp "
"{<interface> | sw_if_index <sw_idx>}",
.function = af_xdp_delete_command_fn,
};
/* *INDENT-ON* */
clib_error_t *
af_xdp_cli_init (vlib_main_t * vm)

View File

@ -857,7 +857,6 @@ af_xdp_clear (u32 dev_instance)
clib_error_free (ad->error);
}
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (af_xdp_device_class) = {
.name = "AF_XDP interface",
.format_device = format_af_xdp_device,
@ -870,7 +869,6 @@ VNET_DEVICE_CLASS (af_xdp_device_class) = {
.mac_addr_change_function = af_xdp_mac_change,
.clear_counters = af_xdp_clear,
};
/* *INDENT-ON* */
clib_error_t *
af_xdp_init (vlib_main_t * vm)

View File

@ -352,7 +352,6 @@ af_xdp_device_input_refill (af_xdp_device_t *ad)
}
#endif /* CLIB_MARCH_VARIANT */
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (af_xdp_input_node) = {
.name = "af_xdp-input",
.sibling_of = "device-input",
@ -363,7 +362,6 @@ VLIB_REGISTER_NODE (af_xdp_input_node) = {
.error_strings = af_xdp_input_error_strings,
.flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -19,12 +19,10 @@
#include <vnet/plugin/plugin.h>
#include <vpp/app/version.h>
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "AF_XDP Device Plugin",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -52,10 +52,8 @@ vl_api_avf_create_t_handler (vl_api_avf_create_t * mp)
avf_create_if (vm, &args);
rv = args.rv;
/* *INDENT-OFF* */
REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY,
({ rmp->sw_if_index = ntohl (args.sw_if_index); }));
/* *INDENT-ON* */
}
static void

View File

@ -63,7 +63,6 @@ avf_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
return args.error;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (avf_create_command, static) = {
.path = "create interface avf",
.short_help = "create interface avf <pci-address> "
@ -71,7 +70,6 @@ VLIB_CLI_COMMAND (avf_create_command, static) = {
"[num-rx-queues <size>]",
.function = avf_create_command_fn,
};
/* *INDENT-ON* */
static clib_error_t *
avf_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
@ -107,7 +105,6 @@ avf_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (avf_delete_command, static) = {
.path = "delete interface avf",
.short_help = "delete interface avf "
@ -115,7 +112,6 @@ VLIB_CLI_COMMAND (avf_delete_command, static) = {
.function = avf_delete_command_fn,
.is_mp_safe = 1,
};
/* *INDENT-ON* */
static clib_error_t *
avf_test_command_fn (vlib_main_t * vm, unformat_input_t * input,
@ -167,14 +163,12 @@ avf_test_command_fn (vlib_main_t * vm, unformat_input_t * input,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (avf_test_command, static) = {
.path = "test avf",
.short_help = "test avf [<interface> | sw_if_index <sw_idx>] [irq] "
"[elog-on] [elog-off]",
.function = avf_test_command_fn,
};
/* *INDENT-ON* */
clib_error_t *
avf_cli_init (vlib_main_t * vm)

View File

@ -1131,7 +1131,6 @@ avf_process_one_device (vlib_main_t * vm, avf_device_t * ad, int is_irq)
if (is_irq == 0)
avf_op_get_stats (vm, ad, &ad->eth_stats);
/* *INDENT-OFF* */
vec_foreach (e, ad->events)
{
avf_log_debug (ad, "event: %s (%u) sev %d",
@ -1227,7 +1226,6 @@ avf_process_one_device (vlib_main_t * vm, avf_device_t * ad, int is_irq)
}
}
}
/* *INDENT-ON* */
vec_reset_length (ad->events);
return;
@ -1403,7 +1401,6 @@ avf_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
/* create local list of device pointers as device pool may grow
* during suspend */
vec_reset_length (dev_pointers);
/* *INDENT-OFF* */
pool_foreach_index (i, am->devices)
{
vec_add1 (dev_pointers, avf_get_device (i));
@ -1413,19 +1410,16 @@ avf_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
{
avf_process_one_device (vm, dev_pointers[i], irq);
};
/* *INDENT-ON* */
last_run_duration = vlib_time_now (vm) - last_periodic_time;
}
return 0;
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (avf_process_node) = {
.function = avf_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "avf-process",
};
/* *INDENT-ON* */
static void
avf_irq_0_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line)
@ -1438,13 +1432,11 @@ avf_irq_0_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line)
if (ad->flags & AVF_DEVICE_F_ELOG)
{
/* *INDENT-OFF* */
ELOG_TYPE_DECLARE (el) =
{
.format = "avf[%d] irq 0: icr0 0x%x",
.format_args = "i4i4",
};
/* *INDENT-ON* */
struct
{
u32 dev_instance;
@ -1474,13 +1466,11 @@ avf_irq_n_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line)
if (ad->flags & AVF_DEVICE_F_ELOG)
{
/* *INDENT-OFF* */
ELOG_TYPE_DECLARE (el) =
{
.format = "avf[%d] irq %d: received",
.format_args = "i4i2",
};
/* *INDENT-ON* */
struct
{
u32 dev_instance;
@ -1526,7 +1516,6 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier)
vlib_physmem_free (vm, ad->atq_bufs);
vlib_physmem_free (vm, ad->arq_bufs);
/* *INDENT-OFF* */
vec_foreach_index (i, ad->rxqs)
{
avf_rxq_t *rxq = vec_elt_at_index (ad->rxqs, i);
@ -1536,10 +1525,8 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier)
rxq->n_enqueued);
vec_free (rxq->bufs);
}
/* *INDENT-ON* */
vec_free (ad->rxqs);
/* *INDENT-OFF* */
vec_foreach_index (i, ad->txqs)
{
avf_txq_t *txq = vec_elt_at_index (ad->txqs, i);
@ -1559,7 +1546,6 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier)
vec_free (txq->tmp_descs);
clib_spinlock_free (&txq->lock);
}
/* *INDENT-ON* */
vec_free (ad->txqs);
vec_free (ad->name);
@ -1622,7 +1608,6 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args)
if (avf_validate_queue_size (args) != 0)
return;
/* *INDENT-OFF* */
pool_foreach (adp, am->devices) {
if ((*adp)->pci_addr.as_u32 == args->addr.as_u32)
{
@ -1633,7 +1618,6 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args)
return;
}
}
/* *INDENT-ON* */
pool_get (am->devices, adp);
adp[0] = ad = clib_mem_alloc_aligned (sizeof (avf_device_t),
@ -1927,7 +1911,6 @@ avf_program_flow (u32 dev_instance, int is_add, enum virthnl_adv_ops vc_op,
return avf_process_request (vm, &req);
}
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (avf_device_class, ) = {
.name = "Adaptive Virtual Function (AVF) interface",
.clear_counters = avf_clear_hw_interface_counters,
@ -1941,7 +1924,6 @@ VNET_DEVICE_CLASS (avf_device_class, ) = {
.tx_function_error_strings = avf_tx_func_error_strings,
.flow_ops_function = avf_flow_ops_fn,
};
/* *INDENT-ON* */
clib_error_t *
avf_init (vlib_main_t * vm)

View File

@ -566,7 +566,6 @@ VLIB_NODE_FN (avf_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
return n_rx;
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (avf_input_node) = {
.name = "avf-input",
.sibling_of = "device-input",
@ -578,7 +577,6 @@ VLIB_REGISTER_NODE (avf_input_node) = {
.flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
};
/* *INDENT-ON* */
/*

View File

@ -19,12 +19,10 @@
#include <vnet/plugin/plugin.h>
#include <vpp/app/version.h>
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () = {
.version = VPP_BUILD_VER,
.description = "Intel Adaptive Virtual Function (AVF) Device Driver",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -97,12 +97,10 @@ handle_get_interface_stats (hss_url_handler_args_t *args)
}
else /* default, HTTP_BUILTIN_METHOD_GET */
{
/* *INDENT-OFF* */
pool_foreach (hi, im->hw_interfaces)
{
vec_add1 (sw_if_indices, hi->sw_if_index);
}
/* *INDENT-ON* */
}
s = format (s, "{%sinterface_stats%s: [\n", q, q);
@ -150,14 +148,12 @@ handle_get_interface_list (hss_url_handler_args_t *args)
int need_comma = 0;
/* Construct vector of active hw_if_indexes ... */
/* *INDENT-OFF* */
pool_foreach (hi, im->hw_interfaces)
{
/* No point in mentioning "local0"... */
if (hi - im->hw_interfaces)
vec_add1 (hw_if_indices, hi - im->hw_interfaces);
}
/* *INDENT-ON* */
/* Build answer */
s = format (s, "{\"interface_list\": [\n");

View File

@ -85,14 +85,12 @@ builtinurl_enable_command_fn (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (builtinurl_enable_command, static) =
{
.path = "builtinurl enable",
.short_help = "Turn on builtin http/https GET and POST urls",
.function = builtinurl_enable_command_fn,
};
/* *INDENT-ON* */
/* API message handler */
static void vl_api_builtinurl_enable_t_handler
@ -124,13 +122,11 @@ builtinurl_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (builtinurl_init);
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = "vpp built-in URL support",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -86,14 +86,12 @@ cdp_command_fn (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cdp_command, static) =
{
.path = "cdp",
.short_help = "cdp enable | disable",
.function = cdp_command_fn,
};
/* *INDENT-ON* */
/* API message handler */
static void vl_api_cdp_enable_disable_t_handler
@ -124,13 +122,11 @@ cdp_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (cdp_init);
/* *INDENT-OFF* */
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = "Cisco Discovery Protocol (CDP)",
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON

View File

@ -416,12 +416,10 @@ cdp_input_init (vlib_main_t * vm)
return 0;
}
/* *INDENT-OFF* */
VLIB_INIT_FUNCTION (cdp_input_init) =
{
.runs_after = VLIB_INITS("cdp_periodic_init"),
};
/* *INDENT-ON* */
static u8 *
@ -437,7 +435,6 @@ format_cdp_neighbors (u8 * s, va_list * va)
"%=25s %=25s %=25s %=10s\n",
"Our Port", "Peer System", "Peer Port", "Last Heard");
/* *INDENT-OFF* */
pool_foreach (n, cm->neighbors)
{
hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index);
@ -447,7 +444,6 @@ format_cdp_neighbors (u8 * s, va_list * va)
hw->name, n->device_name, n->port_id,
n->last_heard);
}
/* *INDENT-ON* */
return s;
}
@ -465,13 +461,11 @@ show_cdp (vlib_main_t * vm,
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_cdp_command, static) = {
.path = "show cdp",
.short_help = "Show cdp command",
.function = show_cdp,
};
/* *INDENT-ON* */
/*

View File

@ -100,7 +100,6 @@ cdp_node_fn (vlib_main_t * vm,
/*
* cdp input graph node declaration
*/
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (cdp_input_node, static) = {
.function = cdp_node_fn,
.name = "cdp-input",
@ -117,7 +116,6 @@ VLIB_REGISTER_NODE (cdp_input_node, static) = {
[CDP_INPUT_NEXT_NORMAL] = "error-drop",
},
};
/* *INDENT-ON* */
/*
* cdp periodic function

Some files were not shown because too many files have changed in this diff Show More