summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
3bf6c2b)
This significantly reduces need for
...
in multiarch code. Simply constructor macros will jost create static unused
entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by
compiler.
Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
18 files changed:
return acl_fa_node_fn (vm, node, frame, 0, 0, 0, 0, &acl_out_fa_ip4_node);
}
return acl_fa_node_fn (vm, node, frame, 0, 0, 0, 0, &acl_out_fa_ip4_node);
}
-#ifndef CLIB_MARCH_VARIANT
static u8 *
format_fa_5tuple (u8 * s, va_list * args)
{
static u8 *
format_fa_5tuple (u8 * s, va_list * args)
{
p5t->pkt.tcp_flags, p5t->pkt.flags_reserved);
}
p5t->pkt.tcp_flags, p5t->pkt.flags_reserved);
}
+#ifndef CLIB_MARCH_VARIANT
u8 *
format_acl_plugin_5tuple (u8 * s, va_list * args)
{
return format_fa_5tuple (s, args);
}
u8 *
format_acl_plugin_5tuple (u8 * s, va_list * args)
{
return format_fa_5tuple (s, args);
}
/* packet trace format function */
/* packet trace format function */
format_acl_plugin_trace (u8 * s, va_list * args)
{
CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
format_acl_plugin_trace (u8 * s, va_list * args)
{
CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
/* *INDENT-OFF* */
static char *acl_fa_error_strings[] = {
/* *INDENT-OFF* */
static char *acl_fa_error_strings[] = {
.node_name = "acl-plugin-out-ip4-fa",
.runs_before = VNET_FEATURES ("interface-output"),
};
.node_name = "acl-plugin-out-ip4-fa",
.runs_before = VNET_FEATURES ("interface-output"),
};
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (avf_input_node) = {
.name = "avf-input",
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (avf_input_node) = {
.name = "avf-input",
.n_errors = AVF_INPUT_N_ERROR,
.error_strings = avf_input_error_strings,
};
.n_errors = AVF_INPUT_N_ERROR,
.error_strings = avf_input_error_strings,
};
DPDK_TX_FUNC_N_ERROR,
} dpdk_tx_func_error_t;
DPDK_TX_FUNC_N_ERROR,
} dpdk_tx_func_error_t;
-#ifndef CLIB_MARCH_VARIANT
static char *dpdk_tx_func_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_tx_func_error
static char *dpdk_tx_func_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_tx_func_error
static struct rte_mbuf *
dpdk_replicate_packet_mb (vlib_buffer_t * b)
static struct rte_mbuf *
dpdk_replicate_packet_mb (vlib_buffer_t * b)
-#ifndef CLIB_MARCH_VARIANT
static void
dpdk_clear_hw_interface_counters (u32 instance)
{
static void
dpdk_clear_hw_interface_counters (u32 instance)
{
#define UP_DOWN_FLAG_EVENT 1
#define UP_DOWN_FLAG_EVENT 1
-#ifndef CLIB_MARCH_VARIANT
-uword
admin_up_down_process (vlib_main_t * vm,
vlib_node_runtime_t * rt, vlib_frame_t * f)
{
admin_up_down_process (vlib_main_t * vm,
vlib_node_runtime_t * rt, vlib_frame_t * f)
{
-VLIB_REGISTER_NODE (admin_up_down_process_node,static) = {
+VLIB_REGISTER_NODE (admin_up_down_process_node) = {
.function = admin_up_down_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "admin-up-down-process",
.process_log2_n_stack_bytes = 17, // 256KB
};
/* *INDENT-ON* */
.function = admin_up_down_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "admin-up-down-process",
.process_log2_n_stack_bytes = 17, // 256KB
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
/*
* fd.io coding-style-patch-verification: ON
extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
+extern vlib_node_registration_t admin_up_down_process_node;
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);
-uword
-admin_up_down_process (vlib_main_t * vm,
- vlib_node_runtime_t * rt, vlib_frame_t * f);
-
clib_error_t *dpdk_pool_create (vlib_main_t * vm, u8 * pool_name,
u32 elt_size, u32 num_elts,
u32 pool_priv_size, u16 cache_size, u8 numa,
clib_error_t *dpdk_pool_create (vlib_main_t * vm, u8 * pool_name,
u32 elt_size, u32 num_elts,
u32 pool_priv_size, u16 cache_size, u8 numa,
#include <dpdk/device/dpdk_priv.h>
#include <dpdk/device/dpdk_priv.h>
-#ifndef CLIB_MARCH_VARIANT
static char *dpdk_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_error
#undef _
};
static char *dpdk_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_error
#undef _
};
STATIC_ASSERT (VNET_DEVICE_INPUT_NEXT_IP4_INPUT - 1 ==
VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT,
STATIC_ASSERT (VNET_DEVICE_INPUT_NEXT_IP4_INPUT - 1 ==
VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT,
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (dpdk_input_node) = {
.type = VLIB_NODE_TYPE_INPUT,
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (dpdk_input_node) = {
.type = VLIB_NODE_TYPE_INPUT,
.error_strings = dpdk_error_strings,
};
/* *INDENT-ON* */
.error_strings = dpdk_error_strings,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
/*
* fd.io coding-style-patch-verification: ON
/* Only suspend for the admin_down_process */
vlib_process_t *proc = vlib_get_current_process (vm);
if (!(proc->flags & VLIB_PROCESS_IS_RUNNING) ||
/* Only suspend for the admin_down_process */
vlib_process_t *proc = vlib_get_current_process (vm);
if (!(proc->flags & VLIB_PROCESS_IS_RUNNING) ||
- (proc->node_runtime.function != admin_up_down_process))
+ (proc->node_runtime.node_index !=
+ admin_up_down_process_node.index))
return 0;
f64 delay = 1e-6 * us;
return 0;
f64 delay = 1e-6 * us;
MEMIF_TX_N_ERROR,
} memif_tx_func_error_t;
MEMIF_TX_N_ERROR,
} memif_tx_func_error_t;
-static __clib_unused char *memif_tx_func_error_strings[] = {
+static char *memif_tx_func_error_strings[] = {
#define _(n,s) s,
foreach_memif_tx_func_error
#undef _
#define _(n,s) s,
foreach_memif_tx_func_error
#undef _
-static __clib_unused u8 *
format_memif_device (u8 * s, va_list * args)
{
u32 dev_instance = va_arg (*args, u32);
format_memif_device (u8 * s, va_list * args)
{
u32 dev_instance = va_arg (*args, u32);
-static __clib_unused u8 *
format_memif_tx_trace (u8 * s, va_list * args)
{
s = format (s, "Unimplemented...");
format_memif_tx_trace (u8 * s, va_list * args)
{
s = format (s, "Unimplemented...");
-static __clib_unused void
memif_set_interface_next_node (vnet_main_t * vnm, u32 hw_if_index,
u32 node_index)
{
memif_set_interface_next_node (vnet_main_t * vnm, u32 hw_if_index,
u32 node_index)
{
vlib_node_add_next (vlib_get_main (), memif_input_node.index, node_index);
}
vlib_node_add_next (vlib_get_main (), memif_input_node.index, node_index);
}
-static __clib_unused void
memif_clear_hw_interface_counters (u32 instance)
{
/* Nothing for now */
}
memif_clear_hw_interface_counters (u32 instance)
{
/* Nothing for now */
}
-static __clib_unused clib_error_t *
memif_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid,
vnet_hw_interface_rx_mode mode)
{
memif_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid,
vnet_hw_interface_rx_mode mode)
{
-static __clib_unused clib_error_t *
memif_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
{
memif_main_t *mm = &memif_main;
memif_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
{
memif_main_t *mm = &memif_main;
-static __clib_unused clib_error_t *
memif_subif_add_del_function (vnet_main_t * vnm,
u32 hw_if_index,
struct vnet_sw_interface_t *st, int is_add)
memif_subif_add_del_function (vnet_main_t * vnm,
u32 hw_if_index,
struct vnet_sw_interface_t *st, int is_add)
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (memif_device_class) = {
.name = "memif",
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (memif_device_class) = {
.name = "memif",
.rx_mode_change_function = memif_interface_rx_mode_change,
};
.rx_mode_change_function = memif_interface_rx_mode_change,
};
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (memif_input_node) = {
.name = "memif-input",
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (memif_input_node) = {
.name = "memif-input",
.n_errors = MEMIF_INPUT_N_ERROR,
.error_strings = memif_input_error_strings,
};
.n_errors = MEMIF_INPUT_N_ERROR,
.error_strings = memif_input_error_strings,
};
vlib_cli_command_t *cli_command_registrations;
} vlib_cli_main_t;
vlib_cli_command_t *cli_command_registrations;
} vlib_cli_main_t;
+#ifndef CLIB_MARCH_VARIANT
#define VLIB_CLI_COMMAND(x,...) \
__VA_ARGS__ vlib_cli_command_t x; \
static void __vlib_cli_command_registration_##x (void) \
#define VLIB_CLI_COMMAND(x,...) \
__VA_ARGS__ vlib_cli_command_t x; \
static void __vlib_cli_command_registration_##x (void) \
next_cli_command); \
} \
__VA_ARGS__ vlib_cli_command_t x
next_cli_command); \
} \
__VA_ARGS__ vlib_cli_command_t x
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VLIB_CLI_COMMAND(x,...) \
+static __clib_unused vlib_cli_command_t __clib_unused_##x
+#endif
+
#define VLIB_CLI_PARSE_RULE(x) \
vlib_cli_parse_rule_t x
/* Output to current CLI connection. */
#define VLIB_CLI_PARSE_RULE(x) \
vlib_cli_parse_rule_t x
/* Output to current CLI connection. */
/* Declaration is global (e.g. not static) so that init functions can
be called from other modules to resolve init function depend. */
/* Declaration is global (e.g. not static) so that init functions can
be called from other modules to resolve init function depend. */
+#ifndef CLIB_MARCH_VARIANT
#define VLIB_DECLARE_INIT_FUNCTION(x, tag) \
vlib_init_function_t * _VLIB_INIT_FUNCTION_SYMBOL (x, tag) = x; \
static void __vlib_add_##tag##_function_##x (void) \
#define VLIB_DECLARE_INIT_FUNCTION(x, tag) \
vlib_init_function_t * _VLIB_INIT_FUNCTION_SYMBOL (x, tag) = x; \
static void __vlib_add_##tag##_function_##x (void) \
next = next->next_init_function; \
} \
}
next = next->next_init_function; \
} \
}
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VLIB_DECLARE_INIT_FUNCTION(x, tag) \
+static __clib_unused void * __clib_unused_##tag##_##x = x;
+#endif
#define VLIB_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,init)
#define VLIB_WORKER_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,worker_init)
#define VLIB_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,init)
#define VLIB_WORKER_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,worker_init)
#define VLIB_MAIN_LOOP_EXIT_FUNCTION(x) \
VLIB_DECLARE_INIT_FUNCTION(x,main_loop_exit)
#define VLIB_MAIN_LOOP_EXIT_FUNCTION(x) \
VLIB_DECLARE_INIT_FUNCTION(x,main_loop_exit)
+#ifndef CLIB_MARCH_VARIANT
#define VLIB_CONFIG_FUNCTION(x,n,...) \
__VA_ARGS__ vlib_config_function_runtime_t \
VLIB_CONFIG_FUNCTION_SYMBOL(x); \
#define VLIB_CONFIG_FUNCTION(x,n,...) \
__VA_ARGS__ vlib_config_function_runtime_t \
VLIB_CONFIG_FUNCTION_SYMBOL(x); \
.function = x, \
.is_early = 0, \
}
.function = x, \
.is_early = 0, \
}
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VLIB_CONFIG_FUNCTION(x,n,...) \
+ static __clib_unused vlib_config_function_runtime_t \
+ VLIB_CONFIG_FUNCTION_SYMBOL (__clib_unused_##x) \
+ = { \
+ .name = n, \
+ .function = x, \
+ .is_early = 0, \
+ }
+#endif
+#ifndef CLIB_MARCH_VARIANT
#define VLIB_EARLY_CONFIG_FUNCTION(x,n,...) \
__VA_ARGS__ vlib_config_function_runtime_t \
VLIB_CONFIG_FUNCTION_SYMBOL(x); \
#define VLIB_EARLY_CONFIG_FUNCTION(x,n,...) \
__VA_ARGS__ vlib_config_function_runtime_t \
VLIB_CONFIG_FUNCTION_SYMBOL(x); \
.function = x, \
.is_early = 1, \
}
.function = x, \
.is_early = 1, \
}
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VLIB_EARLY_CONFIG_FUNCTION(x,n,...) \
+ static __clib_unused vlib_config_function_runtime_t \
+ VLIB_CONFIG_FUNCTION_SYMBOL (__clib_unused_##x) \
+ = { \
+ .name = n, \
+ .function = x, \
+ .is_early = 1, \
+ }
+#endif
/* Call given init function: used for init function dependencies. */
#define vlib_call_init_function(vm, x) \
/* Call given init function: used for init function dependencies. */
#define vlib_call_init_function(vm, x) \
} vlib_node_registration_t;
} vlib_node_registration_t;
+#ifndef CLIB_MARCH_VARIANT
#define VLIB_REGISTER_NODE(x,...) \
__VA_ARGS__ vlib_node_registration_t x; \
static void __vlib_add_node_registration_##x (void) \
#define VLIB_REGISTER_NODE(x,...) \
__VA_ARGS__ vlib_node_registration_t x; \
static void __vlib_add_node_registration_##x (void) \
&x, next_registration); \
} \
__VA_ARGS__ vlib_node_registration_t x
&x, next_registration); \
} \
__VA_ARGS__ vlib_node_registration_t x
+#else
+#define VLIB_REGISTER_NODE(x,...) \
+static __clib_unused vlib_node_registration_t __clib_unused_##x
+#endif
#define VLIB_NODE_FN(node) \
uword CLIB_MARCH_SFX (node##_fn)(); \
#define VLIB_NODE_FN(node) \
uword CLIB_MARCH_SFX (node##_fn)(); \
BOND_INPUT_N_ERROR,
} bond_input_error_t;
BOND_INPUT_N_ERROR,
} bond_input_error_t;
-#ifndef CLIB_MARCH_VARIANT
static char *bond_input_error_strings[] = {
#define _(n,s) s,
foreach_bond_input_error
static char *bond_input_error_strings[] = {
#define _(n,s) s,
foreach_bond_input_error
return frame->n_vectors;
}
return frame->n_vectors;
}
-#ifndef CLIB_MARCH_VARIANT
static clib_error_t *
bond_input_init (vlib_main_t * vm)
{
static clib_error_t *
bond_input_init (vlib_main_t * vm)
{
}
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (bond_hw_interface_up_down);
}
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (bond_hw_interface_up_down);
/*
* fd.io coding-style-patch-verification: ON
/*
* fd.io coding-style-patch-verification: ON
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (vhost_user_input_node) = {
.type = VLIB_NODE_TYPE_INPUT,
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (vhost_user_input_node) = {
.type = VLIB_NODE_TYPE_INPUT,
.error_strings = vhost_user_input_func_error_strings,
};
/* *INDENT-ON* */
.error_strings = vhost_user_input_func_error_strings,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
/*
* fd.io coding-style-patch-verification: ON
return /* no error */ 0;
}
return /* no error */ 0;
}
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (vhost_user_device_class) = {
.name = "vhost-user",
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (vhost_user_device_class) = {
.name = "vhost-user",
.format_tx_trace = format_vhost_trace,
};
.format_tx_trace = format_vhost_trace,
};
extern vnet_feature_main_t feature_main;
extern vnet_feature_main_t feature_main;
+#ifndef CLIB_MARCH_VARIANT
#define VNET_FEATURE_ARC_INIT(x,...) \
__VA_ARGS__ vnet_feature_arc_registration_t vnet_feat_arc_##x;\
static void __vnet_add_feature_arc_registration_##x (void) \
#define VNET_FEATURE_ARC_INIT(x,...) \
__VA_ARGS__ vnet_feature_arc_registration_t vnet_feat_arc_##x;\
static void __vnet_add_feature_arc_registration_##x (void) \
VLIB_REMOVE_FROM_LINKED_LIST (fm->next_feature, r, next); \
} \
__VA_ARGS__ vnet_feature_registration_t vnet_feat_##x
VLIB_REMOVE_FROM_LINKED_LIST (fm->next_feature, r, next); \
} \
__VA_ARGS__ vnet_feature_registration_t vnet_feat_##x
+#else
+#define VNET_FEATURE_ARC_INIT(x,...) \
+extern vnet_feature_arc_registration_t __clib_unused vnet_feat_arc_##x; \
+static vnet_feature_arc_registration_t __clib_unused __clib_unused_vnet_feat_arc_##x
+#define VNET_FEATURE_INIT(x,...) \
+extern vnet_feature_registration_t __clib_unused vnet_feat_##x; \
+static vnet_feature_registration_t __clib_unused __clib_unused_vnet_feat_##x
+#endif
void
vnet_config_update_feature_count (vnet_feature_main_t * fm, u8 arc,
void
vnet_config_update_feature_count (vnet_feature_main_t * fm, u8 arc,
clib_error_t *(*fp) (struct vnet_main_t * vnm, u32 if_index, u32 flags);
} _vnet_interface_function_list_elt_t;
clib_error_t *(*fp) (struct vnet_main_t * vnm, u32 if_index, u32 flags);
} _vnet_interface_function_list_elt_t;
+#ifndef CLIB_MARCH_VARIANT
#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
\
static void __vnet_interface_function_init_##tag##_##f (void) \
#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
\
static void __vnet_interface_function_init_##tag##_##f (void) \
next = next->next_interface_function; \
} \
}
next = next->next_interface_function; \
} \
}
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
+static __clib_unused void * __clib_unused_##f = f;
+#endif
#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
_VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW)
#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
_VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW)
vnet_interface_set_mac_address_function_t *mac_addr_change_function;
} vnet_device_class_t;
vnet_interface_set_mac_address_function_t *mac_addr_change_function;
} vnet_device_class_t;
+#ifndef CLIB_MARCH_VARIANT
#define VNET_DEVICE_CLASS(x,...) \
__VA_ARGS__ vnet_device_class_t x; \
static void __vnet_add_device_class_registration_##x (void) \
#define VNET_DEVICE_CLASS(x,...) \
__VA_ARGS__ vnet_device_class_t x; \
static void __vnet_add_device_class_registration_##x (void) \
&x, next_class_registration); \
} \
__VA_ARGS__ vnet_device_class_t x
&x, next_class_registration); \
} \
__VA_ARGS__ vnet_device_class_t x
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VNET_DEVICE_CLASS(x,...) \
+static __clib_unused vnet_device_class_t __clib_unused_##x
+#endif
#define VNET_DEVICE_CLASS_TX_FN(devclass) \
uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \
#define VNET_DEVICE_CLASS_TX_FN(devclass) \
uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \
u8 packet_data[64];
} ip4_input_trace_t;
u8 packet_data[64];
} ip4_input_trace_t;
-#ifndef CLIB_MARCH_VARIANT
static u8 *
format_ip4_input_trace (u8 * s, va_list * va)
{
static u8 *
format_ip4_input_trace (u8 * s, va_list * va)
{
static_always_inline u32
ip4_input_set_next (u32 sw_if_index, vlib_buffer_t * b, int arc_enabled)
static_always_inline u32
ip4_input_set_next (u32 sw_if_index, vlib_buffer_t * b, int arc_enabled)
foreach_ip4_error
#undef _
};
foreach_ip4_error
#undef _
};
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_input_node) = {
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_input_node) = {
hdlc_register_input_protocol (vm, HDLC_PROTOCOL_ip4, ip4_input_node.index);
{
hdlc_register_input_protocol (vm, HDLC_PROTOCOL_ip4, ip4_input_node.index);
{
+ extern vlib_node_registration_t ip4_input_no_checksum_node;
pg_node_t *pn;
pn = pg_get_node (ip4_input_node.index);
pn->unformat_edit = unformat_pg_ip4_header;
pg_node_t *pn;
pn = pg_get_node (ip4_input_node.index);
pn->unformat_edit = unformat_pg_ip4_header;
VLIB_MAIN_LOOP_ENTER_FUNCTION (ip4_main_loop_enter);
VLIB_MAIN_LOOP_ENTER_FUNCTION (ip4_main_loop_enter);
/*
* fd.io coding-style-patch-verification: ON
*
/*
* fd.io coding-style-patch-verification: ON
*
u8 raw[12]; /* raw data */
} l2output_trace_t;
u8 raw[12]; /* raw data */
} l2output_trace_t;
-#ifndef CLIB_MARCH_VARIANT
/* packet trace format function */
static u8 *
format_l2output_trace (u8 * s, va_list * args)
/* packet trace format function */
static u8 *
format_l2output_trace (u8 * s, va_list * args)
foreach_l2output_error
#undef _
};
foreach_l2output_error
#undef _
};
/**
* Check for split horizon violations.
/**
* Check for split horizon violations.
return frame->n_vectors;
}
return frame->n_vectors;
}
-#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (l2output_node) = {
.name = "l2-output",
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (l2output_node) = {
.name = "l2-output",
* sending packets to the error-drop node to drop the packet. Then, stale L2FIB
* entries for delted tunnels won't cause possible packet or memory corrpution.
*/
* sending packets to the error-drop node to drop the packet. Then, stale L2FIB
* entries for delted tunnels won't cause possible packet or memory corrpution.
*/
-static vlib_node_registration_t l2output_bad_intf_node;
-static uword
-l2output_bad_intf_node_fn (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (l2output_bad_intf_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
u32 n_left_from, *from, *to_next;
l2output_next_t next_index = 0;
{
u32 n_left_from, *from, *to_next;
l2output_next_t next_index = 0;
-VLIB_REGISTER_NODE (l2output_bad_intf_node,static) = {
- .function = l2output_bad_intf_node_fn,
+VLIB_REGISTER_NODE (l2output_bad_intf_node) = {
.name = "l2-output-bad-intf",
.vector_size = sizeof (u32),
.type = VLIB_NODE_TYPE_INTERNAL,
.name = "l2-output-bad-intf",
.vector_size = sizeof (u32),
.type = VLIB_NODE_TYPE_INTERNAL,
[0] = "error-drop",
},
};
[0] = "error-drop",
},
};
-
-VLIB_NODE_FUNCTION_MULTIARCH (l2output_bad_intf_node, l2output_bad_intf_node_fn);
/* *INDENT-ON* */
static clib_error_t *
/* *INDENT-ON* */
static clib_error_t *
VLIB_INIT_FUNCTION (l2output_init);
VLIB_INIT_FUNCTION (l2output_init);
+#ifndef CLIB_MARCH_VARIANT
/** Create a mapping in the next node mapping table for the given sw_if_index. */
void
l2output_create_output_node_mapping (vlib_main_t * vlib_main,
/** Create a mapping in the next node mapping table for the given sw_if_index. */
void
l2output_create_output_node_mapping (vlib_main_t * vlib_main,