X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fudp%2Fudp_encap_node.c;h=e8e379440829d561943f970e8ef6d8709f0a137d;hb=c5df8c71c;hp=2d37d8b58dd42d74df487deab7c44329a8a09455;hpb=43b1f44571fd6989d6442723433cad28a5ab244f;p=vpp.git diff --git a/src/vnet/udp/udp_encap_node.c b/src/vnet/udp/udp_encap_node.c index 2d37d8b58dd..e8e37944082 100644 --- a/src/vnet/udp/udp_encap_node.c +++ b/src/vnet/udp/udp_encap_node.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Cisco and/or its affiliates. + * Copyright (c) 2017-2019 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -67,7 +67,7 @@ udp_encap_inline (vlib_main_t * vm, vlib_combined_counter_main_t *cm = &udp_encap_counters; u32 *from = vlib_frame_vector_args (frame); u32 n_left_from, n_left_to_next, *to_next, next_index; - u32 thread_index = vlib_get_thread_index (); + u32 thread_index = vm->thread_index; n_left_from = frame->n_vectors; next_index = node->cached_next_index; @@ -247,23 +247,22 @@ udp_encap_inline (vlib_main_t * vm, return frame->n_vectors; } -static uword -udp4_encap (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (udp4_encap_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return udp_encap_inline (vm, node, frame, 0); } -static uword -udp6_encap (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (udp6_encap_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return udp_encap_inline (vm, node, frame, 1); } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4_encap_node) = { - .function = udp4_encap, .name = "udp4-encap", .vector_size = sizeof (u32), @@ -271,10 +270,8 @@ VLIB_REGISTER_NODE (udp4_encap_node) = { .n_next_nodes = 0, }; -VLIB_NODE_FUNCTION_MULTIARCH (udp4_encap_node, udp4_encap); VLIB_REGISTER_NODE (udp6_encap_node) = { - .function = udp6_encap, .name = "udp6-encap", .vector_size = sizeof (u32), @@ -282,7 +279,6 @@ VLIB_REGISTER_NODE (udp6_encap_node) = { .n_next_nodes = 0, }; -VLIB_NODE_FUNCTION_MULTIARCH (udp6_encap_node, udp6_encap); /* *INDENT-ON* */