summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-03-05 04:50:23 -0800
committerDamjan Marion <dmarion@me.com>2019-03-06 11:38:22 +0000
commit7a542f4ce9d4699e4efececed594972d90ca39dc (patch)
treecf0cfc74f8f3ff60588e73e86a7802c63fa4905a
parenta5a458f3807f549c2519781c7a08d30cbfce0bf0 (diff)
ipip: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I9c05225b71b60dc2b419a96daeb71d89757aef98 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r--src/vnet/CMakeLists.txt4
-rw-r--r--src/vnet/ipip/node.c16
2 files changed, 9 insertions, 11 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index 04fd6d18809..77cba7b7e3b 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -643,6 +643,10 @@ list(APPEND VNET_SOURCES
ipip/ipip_cli.c
)
+list(APPEND VNET_MULTIARCH_SOURCES
+ ipip/node.c
+)
+
list(APPEND VNET_HEADERS
ipip/ipip.h
)
diff --git a/src/vnet/ipip/node.c b/src/vnet/ipip/node.c
index 6171d3e5d71..0cea4d50895 100644
--- a/src/vnet/ipip/node.c
+++ b/src/vnet/ipip/node.c
@@ -45,7 +45,7 @@ typedef struct
u8 is_ipv6;
} ipip_rx_trace_t;
-u8 *
+static u8 *
format_ipip_rx_trace (u8 * s, va_list * args)
{
CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
@@ -216,16 +216,14 @@ ipip_input (vlib_main_t * vm, vlib_node_runtime_t * node,
return from_frame->n_vectors;
}
-static uword
-ipip4_input (vlib_main_t * vm, vlib_node_runtime_t * node,
- vlib_frame_t * from_frame)
+VLIB_NODE_FN (ipip4_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
{
return ipip_input (vm, node, from_frame, /* is_ip6 */ false);
}
-static uword
-ipip6_input (vlib_main_t * vm, vlib_node_runtime_t * node,
- vlib_frame_t * from_frame)
+VLIB_NODE_FN (ipip6_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
{
return ipip_input (vm, node, from_frame, /* is_ip6 */ true);
}
@@ -238,7 +236,6 @@ static char *ipip_error_strings[] = {
/* *INDENT-OFF* */
VLIB_REGISTER_NODE(ipip4_input_node) = {
- .function = ipip4_input,
.name = "ipip4-input",
/* Takes a vector of packets. */
.vector_size = sizeof(u32),
@@ -255,7 +252,6 @@ VLIB_REGISTER_NODE(ipip4_input_node) = {
};
VLIB_REGISTER_NODE(ipip6_input_node) = {
- .function = ipip6_input,
.name = "ipip6-input",
/* Takes a vector of packets. */
.vector_size = sizeof(u32),
@@ -271,8 +267,6 @@ VLIB_REGISTER_NODE(ipip6_input_node) = {
.format_trace = format_ipip_rx_trace,
};
-VLIB_NODE_FUNCTION_MULTIARCH(ipip4_input_node, ipip4_input)
-VLIB_NODE_FUNCTION_MULTIARCH(ipip6_input_node, ipip6_input)
/* *INDENT-ON* */
/*