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_rw.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_rw.c')
-rw-r--r-- | src/vnet/l2/l2_rw.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c index ac83483002a..85a53aa06ff 100644 --- a/src/vnet/l2/l2_rw.c +++ b/src/vnet/l2/l2_rw.c @@ -26,9 +26,9 @@ */ +#ifndef CLIB_MARCH_VARIANT l2_rw_main_t l2_rw_main; - -vlib_node_registration_t l2_rw_node; +#endif /* CLIB_MARCH_VARIANT */ typedef struct { @@ -156,9 +156,8 @@ l2_rw_rewrite (l2_rw_entry_t * rwe, u8 * h) } } -static uword -l2_rw_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (l2_rw_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, vlib_frame_t * frame) { l2_rw_main_t *rw = &l2_rw_main; u32 n_left_from, *from, *to_next, next_index; @@ -347,6 +346,7 @@ l2_rw_node_fn (vlib_main_t * vm, return frame->n_vectors; } +#ifndef CLIB_MARCH_VARIANT int l2_rw_mod_entry (u32 * index, u8 * mask, u8 * value, u32 len, u32 skip, u8 is_del) @@ -395,6 +395,7 @@ l2_rw_mod_entry (u32 * index, return 0; } +#endif /* CLIB_MARCH_VARIANT */ static clib_error_t * l2_rw_entry_cli_fn (vlib_main_t * vm, @@ -453,6 +454,7 @@ VLIB_CLI_COMMAND (l2_rw_entry_cli, static) = { }; /* *INDENT-ON* */ +#ifndef CLIB_MARCH_VARIANT int l2_rw_interface_set_table (u32 sw_if_index, u32 table_index, u32 miss_index) { @@ -470,6 +472,7 @@ l2_rw_interface_set_table (u32 sw_if_index, u32 table_index, u32 miss_index) return 0; } +#endif /* CLIB_MARCH_VARIANT */ static clib_error_t * l2_rw_interface_cli_fn (vlib_main_t * vm, @@ -594,7 +597,7 @@ VLIB_CLI_COMMAND (l2_rw_show_entries_cli, static) = { }; /* *INDENT-ON* */ -int +static int l2_rw_enable_disable (u32 bridge_domain, u8 disable) { u32 mask = L2INPUT_FEAT_RW; @@ -686,7 +689,6 @@ static char *l2_rw_error_strings[] = { /* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_rw_node) = { - .function = l2_rw_node_fn, .name = "l2-rw", .vector_size = sizeof (u32), .format_trace = format_l2_rw_trace, @@ -699,7 +701,6 @@ VLIB_REGISTER_NODE (l2_rw_node) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (l2_rw_node, l2_rw_node_fn) /* * fd.io coding-style-patch-verification: ON * |