/*
- * 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:
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;
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),
.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),
.n_next_nodes = 0,
};
-VLIB_NODE_FUNCTION_MULTIARCH (udp6_encap_node, udp6_encap);
/* *INDENT-ON* */