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_in_out_acl.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_in_out_acl.c')
-rw-r--r-- | src/vnet/l2/l2_in_out_acl.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/vnet/l2/l2_in_out_acl.c b/src/vnet/l2/l2_in_out_acl.c index 1ca13613078..50e87f3258b 100644 --- a/src/vnet/l2/l2_in_out_acl.c +++ b/src/vnet/l2/l2_in_out_acl.c @@ -80,10 +80,14 @@ format_l2_outacl_trace (u8 * s, va_list * args) return format_l2_in_out_acl_trace (s, IN_OUT_ACL_OUTPUT_TABLE_GROUP, args); } +extern l2_in_out_acl_main_t l2_in_out_acl_main; + +#ifndef CLIB_MARCH_VARIANT l2_in_out_acl_main_t l2_in_out_acl_main; +#endif /* CLIB_MARCH_VARIANT */ -static vlib_node_registration_t l2_inacl_node; -static vlib_node_registration_t l2_outacl_node; +extern vlib_node_registration_t l2_inacl_node; +extern vlib_node_registration_t l2_outacl_node; #define foreach_l2_inacl_error \ _(NONE, "valid input ACL packets") \ @@ -445,25 +449,24 @@ l2_in_out_acl_node_fn (vlib_main_t * vm, return frame->n_vectors; } -static uword -l2_inacl_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (l2_inacl_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return l2_in_out_acl_node_fn (vm, node, frame, IN_OUT_ACL_INPUT_TABLE_GROUP); } -static uword -l2_outacl_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (l2_outacl_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return l2_in_out_acl_node_fn (vm, node, frame, IN_OUT_ACL_OUTPUT_TABLE_GROUP); } /* *INDENT-OFF* */ -VLIB_REGISTER_NODE (l2_inacl_node,static) = { - .function = l2_inacl_node_fn, +VLIB_REGISTER_NODE (l2_inacl_node) = { .name = "l2-input-acl", .vector_size = sizeof (u32), .format_trace = format_l2_inacl_trace, @@ -480,8 +483,7 @@ VLIB_REGISTER_NODE (l2_inacl_node,static) = { }, }; -VLIB_REGISTER_NODE (l2_outacl_node,static) = { - .function = l2_outacl_node_fn, +VLIB_REGISTER_NODE (l2_outacl_node) = { .name = "l2-output-acl", .vector_size = sizeof (u32), .format_trace = format_l2_outacl_trace, @@ -497,12 +499,10 @@ VLIB_REGISTER_NODE (l2_outacl_node,static) = { [ACL_NEXT_INDEX_DENY] = "error-drop", }, }; - -VLIB_NODE_FUNCTION_MULTIARCH (l2_inacl_node, l2_inacl_node_fn) -VLIB_NODE_FUNCTION_MULTIARCH (l2_outacl_node, l2_outacl_node_fn) /* *INDENT-ON* */ +#ifndef CLIB_MARCH_VARIANT clib_error_t * l2_in_out_acl_init (vlib_main_t * vm) { @@ -527,6 +527,7 @@ l2_in_out_acl_init (vlib_main_t * vm) } VLIB_INIT_FUNCTION (l2_in_out_acl_init); +#endif /* CLIB_MARCH_VARIANT */ /* * fd.io coding-style-patch-verification: ON |