diff options
-rw-r--r-- | src/vnet/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/vnet/dpo/dvr_dpo.c | 27 | ||||
-rw-r--r-- | src/vnet/dpo/interface_rx_dpo.c | 24 | ||||
-rw-r--r-- | src/vnet/dpo/lookup_dpo.c | 52 | ||||
-rw-r--r-- | src/vnet/dpo/mpls_disposition.c | 28 | ||||
-rw-r--r-- | src/vnet/dpo/mpls_label_dpo.c | 77 |
6 files changed, 59 insertions, 157 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt index 8dd2f73bac7..73fbf3ce82e 100644 --- a/src/vnet/CMakeLists.txt +++ b/src/vnet/CMakeLists.txt @@ -1351,6 +1351,14 @@ list(APPEND VNET_SOURCES dpo/dvr_dpo.c ) +list(APPEND VNET_MULTIARCH_SOURCES + dpo/lookup_dpo.h + dpo/mpls_disposition.c + dpo/dvr_dpo.c + dpo/mpls_label_dpo.c + dpo/interface_rx_dpo.c +) + list(APPEND VNET_HEADERS dpo/load_balance.h dpo/drop_dpo.h 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) diff --git a/src/vnet/dpo/interface_rx_dpo.c b/src/vnet/dpo/interface_rx_dpo.c index 90868b953ca..d3615d0ce76 100644 --- a/src/vnet/dpo/interface_rx_dpo.c +++ b/src/vnet/dpo/interface_rx_dpo.c @@ -17,6 +17,7 @@ #include <vnet/fib/fib_node.h> #include <vnet/l2/l2_input.h> +#ifndef CLIB_MARCH_VARIANT interface_rx_dpo_t *interface_rx_dpo_pool; /* @@ -109,6 +110,7 @@ interface_rx_dpo_add_or_lock (dpo_proto_t proto, dpo_set(dpo, DPO_INTERFACE_RX, proto, interface_rx_dpo_get_index(ido)); } +#endif /* CLIB_MARCH_VARIANT */ static clib_error_t * @@ -149,7 +151,8 @@ interface_rx_dpo_interface_delete (vnet_main_t * vnm, VNET_SW_INTERFACE_ADD_DEL_FUNCTION( interface_rx_dpo_interface_delete); -u8* +#ifndef CLIB_MARCH_VARIANT +static u8* format_interface_rx_dpo (u8* s, va_list *ap) { index_t index = va_arg(*ap, index_t); @@ -219,6 +222,7 @@ interface_rx_dpo_module_init (void) &interface_rx_dpo_vft, interface_rx_dpo_nodes); } +#endif /* CLIB_MARCH_VARIANT */ /** * @brief Interface DPO trace data @@ -377,24 +381,21 @@ format_interface_rx_dpo_trace (u8 * s, va_list * args) return s; } -static uword -interface_rx_dpo_ip4 (vlib_main_t * vm, +VLIB_NODE_FN (interface_rx_dpo_ip4_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { return (interface_rx_dpo_inline(vm, node, from_frame, 0)); } -static uword -interface_rx_dpo_ip6 (vlib_main_t * vm, +VLIB_NODE_FN (interface_rx_dpo_ip6_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { return (interface_rx_dpo_inline(vm, node, from_frame, 0)); } -static uword -interface_rx_dpo_l2 (vlib_main_t * vm, +VLIB_NODE_FN (interface_rx_dpo_l2_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -402,7 +403,6 @@ interface_rx_dpo_l2 (vlib_main_t * vm, } VLIB_REGISTER_NODE (interface_rx_dpo_ip4_node) = { - .function = interface_rx_dpo_ip4, .name = "interface-rx-dpo-ip4", .vector_size = sizeof (u32), .format_trace = format_interface_rx_dpo_trace, @@ -414,11 +414,8 @@ VLIB_REGISTER_NODE (interface_rx_dpo_ip4_node) = { }, }; -VLIB_NODE_FUNCTION_MULTIARCH (interface_rx_dpo_ip4_node, - interface_rx_dpo_ip4) VLIB_REGISTER_NODE (interface_rx_dpo_ip6_node) = { - .function = interface_rx_dpo_ip6, .name = "interface-rx-dpo-ip6", .vector_size = sizeof (u32), .format_trace = format_interface_rx_dpo_trace, @@ -430,11 +427,8 @@ VLIB_REGISTER_NODE (interface_rx_dpo_ip6_node) = { }, }; -VLIB_NODE_FUNCTION_MULTIARCH (interface_rx_dpo_ip6_node, - interface_rx_dpo_ip6) VLIB_REGISTER_NODE (interface_rx_dpo_l2_node) = { - .function = interface_rx_dpo_l2, .name = "interface-rx-dpo-l2", .vector_size = sizeof (u32), .format_trace = format_interface_rx_dpo_trace, @@ -446,5 +440,3 @@ VLIB_REGISTER_NODE (interface_rx_dpo_l2_node) = { }, }; -VLIB_NODE_FUNCTION_MULTIARCH (interface_rx_dpo_l2_node, - interface_rx_dpo_l2) diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c index 3bda3b81186..617fb9e1a62 100644 --- a/src/vnet/dpo/lookup_dpo.c +++ b/src/vnet/dpo/lookup_dpo.c @@ -637,8 +637,7 @@ format_lookup_trace (u8 * s, va_list * args) return s; } -static uword -lookup_ip4_dst (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip4_dst_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -646,16 +645,13 @@ lookup_ip4_dst (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip4_dst_node) = { - .function = lookup_ip4_dst, .name = "lookup-ip4-dst", .vector_size = sizeof (u32), .sibling_of = "ip4-lookup", .format_trace = format_lookup_trace, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip4_dst_node, lookup_ip4_dst) -static uword -lookup_ip4_dst_itf (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip4_dst_itf_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -663,16 +659,13 @@ lookup_ip4_dst_itf (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip4_dst_itf_node) = { - .function = lookup_ip4_dst_itf, .name = "lookup-ip4-dst-itf", .vector_size = sizeof (u32), .sibling_of = "ip4-lookup", .format_trace = format_lookup_trace, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip4_dst_itf_node, lookup_ip4_dst_itf) -static uword -lookup_ip4_src (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip4_src_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -680,13 +673,11 @@ lookup_ip4_src (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip4_src_node) = { - .function = lookup_ip4_src, .name = "lookup-ip4-src", .vector_size = sizeof (u32), .format_trace = format_lookup_trace, .sibling_of = "ip4-lookup", }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip4_src_node, lookup_ip4_src) always_inline uword lookup_dpo_ip6_inline (vlib_main_t * vm, @@ -990,8 +981,7 @@ lookup_dpo_ip6_inline (vlib_main_t * vm, return from_frame->n_vectors; } -static uword -lookup_ip6_dst (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip6_dst_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -999,16 +989,13 @@ lookup_ip6_dst (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip6_dst_node) = { - .function = lookup_ip6_dst, .name = "lookup-ip6-dst", .vector_size = sizeof (u32), .format_trace = format_lookup_trace, .sibling_of = "ip6-lookup", }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip6_dst_node, lookup_ip6_dst) -static uword -lookup_ip6_dst_itf (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip6_dst_itf_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1016,16 +1003,13 @@ lookup_ip6_dst_itf (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip6_dst_itf_node) = { - .function = lookup_ip6_dst_itf, .name = "lookup-ip6-dst-itf", .vector_size = sizeof (u32), .format_trace = format_lookup_trace, .sibling_of = "ip6-lookup", }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip6_dst_itf_node, lookup_ip6_dst_itf) -static uword -lookup_ip6_src (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip6_src_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1033,13 +1017,11 @@ lookup_ip6_src (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip6_src_node) = { - .function = lookup_ip6_src, .name = "lookup-ip6-src", .vector_size = sizeof (u32), .format_trace = format_lookup_trace, .sibling_of = "ip6-lookup", }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip6_src_node, lookup_ip6_src) always_inline uword lookup_dpo_mpls_inline (vlib_main_t * vm, @@ -1196,8 +1178,7 @@ format_lookup_mpls_trace (u8 * s, va_list * args) return s; } -static uword -lookup_mpls_dst (vlib_main_t * vm, +VLIB_NODE_FN (lookup_mpls_dst_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1205,17 +1186,14 @@ lookup_mpls_dst (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_mpls_dst_node) = { - .function = lookup_mpls_dst, .name = "lookup-mpls-dst", .vector_size = sizeof (u32), .sibling_of = "mpls-lookup", .format_trace = format_lookup_mpls_trace, .n_next_nodes = 0, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_mpls_dst_node, lookup_mpls_dst) -static uword -lookup_mpls_dst_itf (vlib_main_t * vm, +VLIB_NODE_FN (lookup_mpls_dst_itf_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1223,14 +1201,12 @@ lookup_mpls_dst_itf (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_mpls_dst_itf_node) = { - .function = lookup_mpls_dst_itf, .name = "lookup-mpls-dst-itf", .vector_size = sizeof (u32), .sibling_of = "mpls-lookup", .format_trace = format_lookup_mpls_trace, .n_next_nodes = 0, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_mpls_dst_itf_node, lookup_mpls_dst_itf) typedef enum lookup_ip_dst_mcast_next_t_ { LOOKUP_IP_DST_MCAST_NEXT_DROP, @@ -1338,8 +1314,7 @@ lookup_dpo_ip_dst_mcast_inline (vlib_main_t * vm, return from_frame->n_vectors; } -static uword -lookup_ip4_dst_mcast (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip4_dst_mcast_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1347,7 +1322,6 @@ lookup_ip4_dst_mcast (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip4_dst_mcast_node) = { - .function = lookup_ip4_dst_mcast, .name = "lookup-ip4-dst-mcast", .vector_size = sizeof (u32), @@ -1358,11 +1332,8 @@ VLIB_REGISTER_NODE (lookup_ip4_dst_mcast_node) = { [LOOKUP_IP_DST_MCAST_NEXT_RPF] = "ip4-mfib-forward-rpf", }, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip4_dst_mcast_node, - lookup_ip4_dst_mcast) -static uword -lookup_ip6_dst_mcast (vlib_main_t * vm, +VLIB_NODE_FN (lookup_ip6_dst_mcast_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { @@ -1370,7 +1341,6 @@ lookup_ip6_dst_mcast (vlib_main_t * vm, } VLIB_REGISTER_NODE (lookup_ip6_dst_mcast_node) = { - .function = lookup_ip6_dst_mcast, .name = "lookup-ip6-dst-mcast", .vector_size = sizeof (u32), @@ -1381,8 +1351,6 @@ VLIB_REGISTER_NODE (lookup_ip6_dst_mcast_node) = { [LOOKUP_IP_DST_MCAST_NEXT_RPF] = "ip6-mfib-forward-rpf", }, }; -VLIB_NODE_FUNCTION_MULTIARCH (lookup_ip6_dst_mcast_node, - lookup_ip6_dst_mcast) static void lookup_dpo_mem_show (void) diff --git a/src/vnet/dpo/mpls_disposition.c b/src/vnet/dpo/mpls_disposition.c index c2c9065f787..cf0b5fcf1ef 100644 --- a/src/vnet/dpo/mpls_disposition.c +++ b/src/vnet/dpo/mpls_disposition.c @@ -18,6 +18,7 @@ #include <vnet/dpo/mpls_disposition.h> #include <vnet/mpls/mpls.h> +#ifndef CLIB_MARCH_VARIANT /* * pool of all MPLS Label DPOs */ @@ -123,6 +124,7 @@ mpls_disp_dpo_unlock (dpo_id_t *dpo) pool_put(mpls_disp_dpo_pool, mdd); } } +#endif /* CLIB_MARCH_VARIANT */ /** * @brief A struct to hold tracing information for the MPLS label disposition @@ -405,8 +407,7 @@ format_mpls_label_disposition_trace (u8 * s, va_list * args) return (s); } -static uword -ip4_mpls_label_disposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_disposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -415,7 +416,6 @@ ip4_mpls_label_disposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE(ip4_mpls_label_disposition_pipe_node) = { - .function = ip4_mpls_label_disposition_pipe, .name = "ip4-mpls-label-disposition-pipe", .vector_size = sizeof(u32), @@ -424,11 +424,8 @@ VLIB_REGISTER_NODE(ip4_mpls_label_disposition_pipe_node) = { .n_errors = IP4_N_ERROR, .error_strings = ip4_error_strings, }; -VLIB_NODE_FUNCTION_MULTIARCH(ip4_mpls_label_disposition_pipe_node, - ip4_mpls_label_disposition_pipe) -static uword -ip6_mpls_label_disposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_disposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -437,7 +434,6 @@ ip6_mpls_label_disposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE(ip6_mpls_label_disposition_pipe_node) = { - .function = ip6_mpls_label_disposition_pipe, .name = "ip6-mpls-label-disposition-pipe", .vector_size = sizeof(u32), @@ -446,11 +442,8 @@ VLIB_REGISTER_NODE(ip6_mpls_label_disposition_pipe_node) = { .n_errors = IP6_N_ERROR, .error_strings = ip6_error_strings, }; -VLIB_NODE_FUNCTION_MULTIARCH(ip6_mpls_label_disposition_pipe_node, - ip6_mpls_label_disposition_pipe) -static uword -ip4_mpls_label_disposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_disposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -459,7 +452,6 @@ ip4_mpls_label_disposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE(ip4_mpls_label_disposition_uniform_node) = { - .function = ip4_mpls_label_disposition_uniform, .name = "ip4-mpls-label-disposition-uniform", .vector_size = sizeof(u32), @@ -468,11 +460,8 @@ VLIB_REGISTER_NODE(ip4_mpls_label_disposition_uniform_node) = { .n_errors = IP4_N_ERROR, .error_strings = ip4_error_strings, }; -VLIB_NODE_FUNCTION_MULTIARCH(ip4_mpls_label_disposition_uniform_node, - ip4_mpls_label_disposition_uniform) -static uword -ip6_mpls_label_disposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_disposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -481,7 +470,6 @@ ip6_mpls_label_disposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE(ip6_mpls_label_disposition_uniform_node) = { - .function = ip6_mpls_label_disposition_uniform, .name = "ip6-mpls-label-disposition-uniform", .vector_size = sizeof(u32), @@ -490,9 +478,8 @@ VLIB_REGISTER_NODE(ip6_mpls_label_disposition_uniform_node) = { .n_errors = IP6_N_ERROR, .error_strings = ip6_error_strings, }; -VLIB_NODE_FUNCTION_MULTIARCH(ip6_mpls_label_disposition_uniform_node, - ip6_mpls_label_disposition_uniform) +#ifndef CLIB_MARCH_VARIANT static void mpls_disp_dpo_mem_show (void) { @@ -550,3 +537,4 @@ mpls_disp_dpo_module_init(void) dpo_register(DPO_MPLS_DISPOSITION_UNIFORM, &mdd_vft, mpls_label_disp_uniform_nodes); } +#endif /* CLIB_MARCH_VARIANT */ diff --git a/src/vnet/dpo/mpls_label_dpo.c b/src/vnet/dpo/mpls_label_dpo.c index ab8c06df4d5..1074a959310 100644 --- a/src/vnet/dpo/mpls_label_dpo.c +++ b/src/vnet/dpo/mpls_label_dpo.c @@ -18,6 +18,7 @@ #include <vnet/mpls/mpls.h> #include <vnet/dpo/drop_dpo.h> +#ifndef CLIB_MARCH_VARIANT /* * pool of all MPLS Label DPOs */ @@ -247,6 +248,7 @@ mpls_label_dpo_unlock (dpo_id_t *dpo) pool_put(mpls_label_dpo_pool, mld); } } +#endif /* CLIB_MARCH_VARIANT */ /** * @brief A struct to hold tracing information for the MPLS label imposition @@ -902,8 +904,7 @@ format_mpls_label_imposition_trace (u8 * s, va_list * args) return (s); } -static uword -mpls_mpls_label_imposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (mpls_mpls_label_imposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -913,7 +914,6 @@ mpls_mpls_label_imposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE (mpls_mpls_label_imposition_pipe_node) = { - .function = mpls_mpls_label_imposition_pipe, .name = "mpls-label-imposition-pipe", .vector_size = sizeof (u32), @@ -923,11 +923,8 @@ VLIB_REGISTER_NODE (mpls_mpls_label_imposition_pipe_node) = { [0] = "mpls-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (mpls_mpls_label_imposition_pipe_node, - mpls_mpls_label_imposition_pipe) -static uword -ip4_mpls_label_imposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_imposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -937,7 +934,6 @@ ip4_mpls_label_imposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_node) = { - .function = ip4_mpls_label_imposition_pipe, .name = "ip4-mpls-label-imposition-pipe", .vector_size = sizeof (u32), @@ -947,11 +943,8 @@ VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_node) = { [0] = "ip4-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_imposition_pipe_node, - ip4_mpls_label_imposition_pipe) -static uword -ip6_mpls_label_imposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_imposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -961,7 +954,6 @@ ip6_mpls_label_imposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_node) = { - .function = ip6_mpls_label_imposition_pipe, .name = "ip6-mpls-label-imposition-pipe", .vector_size = sizeof (u32), @@ -971,11 +963,8 @@ VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_node) = { [0] = "ip6-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_imposition_pipe_node, - ip6_mpls_label_imposition_pipe) -static uword -ethernet_mpls_label_imposition_pipe (vlib_main_t * vm, +VLIB_NODE_FN (ethernet_mpls_label_imposition_pipe_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -985,7 +974,6 @@ ethernet_mpls_label_imposition_pipe (vlib_main_t * vm, } VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_pipe_node) = { - .function = ethernet_mpls_label_imposition_pipe, .name = "ethernet-mpls-label-imposition-pipe", .vector_size = sizeof (u32), @@ -996,11 +984,7 @@ VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_pipe_node) = { } }; -VLIB_NODE_FUNCTION_MULTIARCH (ethernet_mpls_label_imposition_pipe_node, - ethernet_mpls_label_imposition_pipe) - -static uword -mpls_mpls_label_imposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (mpls_mpls_label_imposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1010,7 +994,6 @@ mpls_mpls_label_imposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE (mpls_mpls_label_imposition_uniform_node) = { - .function = mpls_mpls_label_imposition_uniform, .name = "mpls-label-imposition-uniform", .vector_size = sizeof (u32), @@ -1020,11 +1003,8 @@ VLIB_REGISTER_NODE (mpls_mpls_label_imposition_uniform_node) = { [0] = "mpls-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (mpls_mpls_label_imposition_uniform_node, - mpls_mpls_label_imposition_uniform) -static uword -ip4_mpls_label_imposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_imposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1034,7 +1014,6 @@ ip4_mpls_label_imposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_node) = { - .function = ip4_mpls_label_imposition_uniform, .name = "ip4-mpls-label-imposition-uniform", .vector_size = sizeof (u32), @@ -1044,11 +1023,8 @@ VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_node) = { [0] = "ip4-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_imposition_uniform_node, - ip4_mpls_label_imposition_uniform) -static uword -ip6_mpls_label_imposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_imposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1058,7 +1034,6 @@ ip6_mpls_label_imposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_node) = { - .function = ip6_mpls_label_imposition_uniform, .name = "ip6-mpls-label-imposition-uniform", .vector_size = sizeof (u32), @@ -1068,11 +1043,8 @@ VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_node) = { [0] = "ip6-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_imposition_uniform_node, - ip6_mpls_label_imposition_uniform) -static uword -ethernet_mpls_label_imposition_uniform (vlib_main_t * vm, +VLIB_NODE_FN (ethernet_mpls_label_imposition_uniform_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1082,7 +1054,6 @@ ethernet_mpls_label_imposition_uniform (vlib_main_t * vm, } VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_uniform_node) = { - .function = ethernet_mpls_label_imposition_uniform, .name = "ethernet-mpls-label-imposition-uniform", .vector_size = sizeof (u32), @@ -1093,11 +1064,8 @@ VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_uniform_node) = { } }; -VLIB_NODE_FUNCTION_MULTIARCH (ethernet_mpls_label_imposition_uniform_node, - ethernet_mpls_label_imposition_uniform) -static uword -ip4_mpls_label_imposition_pipe_no_ip_ttl_decr (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1107,7 +1075,6 @@ ip4_mpls_label_imposition_pipe_no_ip_ttl_decr (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node) = { - .function = ip4_mpls_label_imposition_pipe_no_ip_ttl_decr, .name = "ip4-mpls-label-imposition-pipe-no-ip-ttl-decr", .vector_size = sizeof (u32), @@ -1117,11 +1084,8 @@ VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node) = { [0] = "ip4-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node, - ip4_mpls_label_imposition_pipe_no_ip_ttl_decr) -static uword -ip6_mpls_label_imposition_pipe_no_ip_ttl_decr (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1131,7 +1095,6 @@ ip6_mpls_label_imposition_pipe_no_ip_ttl_decr (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node) = { - .function = ip6_mpls_label_imposition_pipe_no_ip_ttl_decr, .name = "ip6-mpls-label-imposition-pipe-no-ip-ttl-decr", .vector_size = sizeof (u32), @@ -1141,11 +1104,8 @@ VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node) = { [0] = "ip6-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node, - ip6_mpls_label_imposition_pipe_no_ip_ttl_decr) -static uword -ip4_mpls_label_imposition_uniform_no_ip_ttl_decr (vlib_main_t * vm, +VLIB_NODE_FN (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1156,7 +1116,6 @@ ip4_mpls_label_imposition_uniform_no_ip_ttl_decr (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node) = { - .function = ip4_mpls_label_imposition_uniform_no_ip_ttl_decr, .name = "ip4-mpls-label-imposition-uniform-no-ip-ttl-decr", .vector_size = sizeof (u32), @@ -1166,11 +1125,8 @@ VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node) = { [0] = "ip4-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node, - ip4_mpls_label_imposition_uniform_no_ip_ttl_decr) -static uword -ip6_mpls_label_imposition_uniform_no_ip_ttl_decr (vlib_main_t * vm, +VLIB_NODE_FN (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -1181,7 +1137,6 @@ ip6_mpls_label_imposition_uniform_no_ip_ttl_decr (vlib_main_t * vm, } VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node) = { - .function = ip6_mpls_label_imposition_uniform_no_ip_ttl_decr, .name = "ip6-mpls-label-imposition-uniform-no-ip-ttl-decr", .vector_size = sizeof (u32), @@ -1191,10 +1146,9 @@ VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node) = { [0] = "ip6-drop", } }; -VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node, - ip6_mpls_label_imposition_uniform_no_ip_ttl_decr) +#ifndef CLIB_MARCH_VARIANT static void mpls_label_dpo_mem_show (void) { @@ -1359,3 +1313,4 @@ mpls_label_dpo_get_type (mpls_label_dpo_flags_t flags) { return (mpls_label_dpo_types[flags]); } +#endif /* CLIB_MARCH_VARIANT */ |