From e69e423743630b52e13db58c3f0229df8a46c07f Mon Sep 17 00:00:00 2001 From: Filip Varga Date: Wed, 13 Feb 2019 01:42:59 -0800 Subject: NAT: VPP-1552 code migration from old multiarch scheme Change-Id: I88f3df8aaa521e7707ef3335acdbf1ab41e7ee28 Signed-off-by: Filip Varga --- src/plugins/nat/nat_det_in2out.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/plugins/nat/nat_det_in2out.c') diff --git a/src/plugins/nat/nat_det_in2out.c b/src/plugins/nat/nat_det_in2out.c index e4aa0463a06..918e1f5f9c0 100644 --- a/src/plugins/nat/nat_det_in2out.c +++ b/src/plugins/nat/nat_det_in2out.c @@ -63,8 +63,6 @@ static char *nat_det_in2out_error_strings[] = { #undef _ }; -vlib_node_registration_t snat_det_in2out_node; - static u8 * format_nat_det_in2out_trace (u8 * s, va_list * args) { @@ -78,6 +76,7 @@ format_nat_det_in2out_trace (u8 * s, va_list * args) return s; } +#ifndef CLIB_MARCH_VARIANT /** * Get address and port values to be used for ICMP packet translation * and create session if needed @@ -242,10 +241,11 @@ out: *(snat_det_map_t **) e = dm0; return next0; } +#endif -static uword -snat_det_in2out_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (snat_det_in2out_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { u32 n_left_from, *from, *to_next; nat_det_in2out_next_t next_index; @@ -849,7 +849,7 @@ snat_det_in2out_node_fn (vlib_main_t * vm, vlib_put_next_frame (vm, node, next_index, n_left_to_next); } - vlib_node_increment_counter (vm, snat_det_in2out_node.index, + vlib_node_increment_counter (vm, sm->det_in2out_node_index, NAT_DET_IN2OUT_ERROR_IN2OUT_PACKETS, pkts_processed); return frame->n_vectors; @@ -857,7 +857,6 @@ snat_det_in2out_node_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_REGISTER_NODE (snat_det_in2out_node) = { - .function = snat_det_in2out_node_fn, .name = "nat44-det-in2out", .vector_size = sizeof (u32), .format_trace = format_nat_det_in2out_trace, @@ -874,8 +873,6 @@ VLIB_REGISTER_NODE (snat_det_in2out_node) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (snat_det_in2out_node, snat_det_in2out_node_fn); - /* * fd.io coding-style-patch-verification: ON * -- cgit 1.2.3-korg