host stack: update stale copyright
[vpp.git] / src / vnet / udp / udp_encap_node.c
index 2d37d8b..e8e3794 100644 (file)
@@ -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* */