diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2019-03-11 04:26:37 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-12 19:07:42 +0000 |
commit | 44f0f71b6b1e6dac466452664817abc388662efd (patch) | |
tree | 7c17c324b7e941c10a8a6ffa00feb8055f35a4d6 /src/vnet/l2/l2_input_vtr.c | |
parent | c4be9850f21ce59b7b8b830661db0f0437dd1063 (diff) |
l2: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I8370c06150ce4499475e9d6dc6b3ab8be2016202
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_input_vtr.c')
-rw-r--r-- | src/vnet/l2/l2_input_vtr.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/vnet/l2/l2_input_vtr.c b/src/vnet/l2/l2_input_vtr.c index 25b3bd03e65..be3e6ba85f4 100644 --- a/src/vnet/l2/l2_input_vtr.c +++ b/src/vnet/l2/l2_input_vtr.c @@ -57,9 +57,9 @@ format_l2_invtr_trace (u8 * s, va_list * args) return s; } +#ifndef CLIB_MARCH_VARIANT l2_invtr_main_t l2_invtr_main; - -static vlib_node_registration_t l2_invtr_node; +#endif /* CLIB_MARCH_VARIANT */ #define foreach_l2_invtr_error \ _(L2_INVTR, "L2 inverter packets") \ @@ -86,9 +86,9 @@ typedef enum } l2_invtr_next_t; -static uword -l2_invtr_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (l2_invtr_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { u32 n_left_from, *from, *to_next; l2_invtr_next_t next_index; @@ -320,8 +320,7 @@ l2_invtr_node_fn (vlib_main_t * vm, /* *INDENT-OFF* */ -VLIB_REGISTER_NODE (l2_invtr_node,static) = { - .function = l2_invtr_node_fn, +VLIB_REGISTER_NODE (l2_invtr_node) = { .name = "l2-input-vtr", .vector_size = sizeof (u32), .format_trace = format_l2_invtr_trace, @@ -339,8 +338,9 @@ VLIB_REGISTER_NODE (l2_invtr_node,static) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (l2_invtr_node, l2_invtr_node_fn) - clib_error_t *l2_invtr_init (vlib_main_t * vm) +#ifndef CLIB_MARCH_VARIANT +clib_error_t * +l2_invtr_init (vlib_main_t * vm) { l2_invtr_main_t *mp = &l2_invtr_main; @@ -358,6 +358,7 @@ VLIB_NODE_FUNCTION_MULTIARCH (l2_invtr_node, l2_invtr_node_fn) } VLIB_INIT_FUNCTION (l2_invtr_init); +#endif /* CLIB_MARCH_VARIANT */ /* |