diff options
author | Filip Varga <fivarga@cisco.com> | 2019-02-13 01:42:59 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-18 16:46:50 +0000 |
commit | e69e423743630b52e13db58c3f0229df8a46c07f (patch) | |
tree | 5471b64b7fe38031f47791c987f9791fc8207fa7 /src/plugins/nat/dslite_in2out.c | |
parent | 7dcb80a202f1ce075434a17ace3334a7a311e84e (diff) |
NAT: VPP-1552 code migration from old multiarch scheme
Change-Id: I88f3df8aaa521e7707ef3335acdbf1ab41e7ee28
Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/dslite_in2out.c')
-rw-r--r-- | src/plugins/nat/dslite_in2out.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/plugins/nat/dslite_in2out.c b/src/plugins/nat/dslite_in2out.c index cbb5d987d01..2a8b548c15f 100644 --- a/src/plugins/nat/dslite_in2out.c +++ b/src/plugins/nat/dslite_in2out.c @@ -16,9 +16,6 @@ #include <nat/nat_inlines.h> #include <nat/nat_syslog.h> -vlib_node_registration_t dslite_in2out_node; -vlib_node_registration_t dslite_in2out_slowpath_node; - typedef enum { DSLITE_IN2OUT_NEXT_IP4_LOOKUP, @@ -249,8 +246,8 @@ dslite_in2out_node_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node, dslite_main_t *dm = &dslite_main; node_index = - is_slow_path ? dslite_in2out_slowpath_node. - index : dslite_in2out_node.index; + is_slow_path ? dm->dslite_in2out_slowpath_node_index : + dm->dslite_in2out_node_index; error_node = vlib_node_get_runtime (vm, node_index); @@ -445,16 +442,15 @@ dslite_in2out_node_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -static uword -dslite_in2out_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, - vlib_frame_t * frame) +VLIB_NODE_FN (dslite_in2out_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return dslite_in2out_node_fn_inline (vm, node, frame, 0); } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_in2out_node) = { - .function = dslite_in2out_node_fn, .name = "dslite-in2out", .vector_size = sizeof (u32), .format_trace = format_dslite_trace, @@ -472,18 +468,15 @@ VLIB_REGISTER_NODE (dslite_in2out_node) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (dslite_in2out_node, dslite_in2out_node_fn); - -static uword -dslite_in2out_slowpath_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, - vlib_frame_t * frame) +VLIB_NODE_FN (dslite_in2out_slowpath_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return dslite_in2out_node_fn_inline (vm, node, frame, 1); } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) = { - .function = dslite_in2out_slowpath_node_fn, .name = "dslite-in2out-slowpath", .vector_size = sizeof (u32), .format_trace = format_dslite_trace, @@ -501,9 +494,6 @@ VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (dslite_in2out_slowpath_node, - dslite_in2out_slowpath_node_fn); - /* * fd.io coding-style-patch-verification: ON * |