diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2019-03-07 01:42:11 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-11 09:16:10 +0000 |
commit | eb9a27f247e521a80ce5a3ab31b1e3a483afefab (patch) | |
tree | b2f7e7ad5ef2f1432c4384edcc143ec7dab092cc /src/vnet/dpo/dvr_dpo.c | |
parent | 79c27ebe0f29769d5ec711e3b5f7b156e225c4f4 (diff) |
dpo: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I3043112c3e7584f61e64dc6d20d57604ebceb76a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/dpo/dvr_dpo.c')
-rw-r--r-- | src/vnet/dpo/dvr_dpo.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/vnet/dpo/dvr_dpo.c b/src/vnet/dpo/dvr_dpo.c index a362d23e890..877f42a9893 100644 --- a/src/vnet/dpo/dvr_dpo.c +++ b/src/vnet/dpo/dvr_dpo.c @@ -18,6 +18,7 @@ #include <vnet/ip/ip.h> #include <vnet/ethernet/ethernet.h> +#ifndef CLIB_MARCH_VARIANT dvr_dpo_t *dvr_dpo_pool; /** @@ -124,6 +125,7 @@ dvr_dpo_add_or_lock (u32 sw_if_index, dpo_set(dpo, DPO_DVR, dproto, dvr_dpo_get_index(dd)); } +#endif /* CLIB_MARCH_VARIANT */ static clib_error_t * @@ -164,7 +166,8 @@ dvr_dpo_interface_delete (vnet_main_t * vnm, VNET_SW_INTERFACE_ADD_DEL_FUNCTION( dvr_dpo_interface_delete); -u8* +#ifndef CLIB_MARCH_VARIANT +static u8* format_dvr_dpo (u8* s, va_list *ap) { index_t index = va_arg(*ap, index_t); @@ -226,6 +229,7 @@ dvr_dpo_module_init (void) &dvr_dpo_vft, dvr_dpo_nodes); } +#endif /* CLIB_MARCH_VARIANT */ /** * @brief Interface DPO trace data @@ -397,16 +401,14 @@ format_dvr_dpo_trace (u8 * s, va_list * args) return s; } -static uword -ip4_dvr_dpo (vlib_main_t * vm, +VLIB_NODE_FN (ip4_dvr_dpo_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { return (dvr_dpo_inline(vm, node, from_frame, 0)); } -static uword -ip6_dvr_dpo (vlib_main_t * vm, +VLIB_NODE_FN (ip6_dvr_dpo_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -414,23 +416,18 @@ ip6_dvr_dpo (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_dvr_dpo_node) = { - .function = ip4_dvr_dpo, .name = "ip4-dvr-dpo", .vector_size = sizeof (u32), .format_trace = format_dvr_dpo_trace, .sibling_of = "ip4-rewrite", }; VLIB_REGISTER_NODE (ip6_dvr_dpo_node) = { - .function = ip6_dvr_dpo, .name = "ip6-dvr-dpo", .vector_size = sizeof (u32), .format_trace = format_dvr_dpo_trace, .sibling_of = "ip6-rewrite", }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_dvr_dpo_node, ip4_dvr_dpo) -VLIB_NODE_FUNCTION_MULTIARCH (ip6_dvr_dpo_node, ip6_dvr_dpo) - typedef enum dvr_reinject_next_t_ { DVR_REINJECT_OUTPUT = 0, @@ -538,16 +535,14 @@ dvr_reinject_inline (vlib_main_t * vm, return from_frame->n_vectors; } -static uword -ip4_dvr_reinject (vlib_main_t * vm, +VLIB_NODE_FN (ip4_dvr_reinject_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { return (dvr_reinject_inline(vm, node, from_frame)); } -static uword -ip6_dvr_reinject (vlib_main_t * vm, +VLIB_NODE_FN (ip6_dvr_reinject_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -555,7 +550,6 @@ ip6_dvr_reinject (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_dvr_reinject_node) = { - .function = ip4_dvr_reinject, .name = "ip4-dvr-reinject", .vector_size = sizeof (u32), .format_trace = format_dvr_dpo_trace, @@ -567,7 +561,6 @@ VLIB_REGISTER_NODE (ip4_dvr_reinject_node) = { }; VLIB_REGISTER_NODE (ip6_dvr_reinject_node) = { - .function = ip6_dvr_reinject, .name = "ip6-dvr-reinject", .vector_size = sizeof (u32), .format_trace = format_dvr_dpo_trace, @@ -592,5 +585,3 @@ VNET_FEATURE_INIT (ip6_dvr_reinject_feat_node, static) = .runs_after = VNET_FEATURES ("acl-plugin-out-ip6-fa"), }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_dvr_reinject_node, ip4_dvr_reinject) -VLIB_NODE_FUNCTION_MULTIARCH (ip6_dvr_reinject_node, ip6_dvr_reinject) |