summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/CMakeLists.txt5
-rw-r--r--src/vnet/adj/adj_l2.c12
-rw-r--r--src/vnet/adj/adj_nsh.c14
3 files changed, 11 insertions, 20 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index f8dafc05997..1c2ab2d9958 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -1235,6 +1235,11 @@ list(APPEND VNET_SOURCES
adj/adj_delegate.c
)
+list(APPEND VNET_MULTIARCH_SOURCES
+ adj/adj_nsh.c
+ adj/adj_l2.c
+)
+
list(APPEND VNET_HEADERS
adj/adj.h
adj/adj_types.h
diff --git a/src/vnet/adj/adj_l2.c b/src/vnet/adj/adj_l2.c
index 09bf468ac40..8a2126b2d7f 100644
--- a/src/vnet/adj/adj_l2.c
+++ b/src/vnet/adj/adj_l2.c
@@ -152,16 +152,14 @@ adj_l2_rewrite_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-adj_l2_rewrite (vlib_main_t * vm,
+VLIB_NODE_FN (adj_l2_rewrite_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
return adj_l2_rewrite_inline (vm, node, frame, 0);
}
-static uword
-adj_l2_midchain (vlib_main_t * vm,
+VLIB_NODE_FN (adj_l2_midchain_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -169,7 +167,6 @@ adj_l2_midchain (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (adj_l2_rewrite_node) = {
- .function = adj_l2_rewrite,
.name = "adj-l2-rewrite",
.vector_size = sizeof (u32),
@@ -181,10 +178,7 @@ VLIB_REGISTER_NODE (adj_l2_rewrite_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (adj_l2_rewrite_node, adj_l2_rewrite)
-
VLIB_REGISTER_NODE (adj_l2_midchain_node) = {
- .function = adj_l2_midchain,
.name = "adj-l2-midchain",
.vector_size = sizeof (u32),
@@ -195,5 +189,3 @@ VLIB_REGISTER_NODE (adj_l2_midchain_node) = {
[ADJ_L2_REWRITE_NEXT_DROP] = "error-drop",
},
};
-
-VLIB_NODE_FUNCTION_MULTIARCH (adj_l2_midchain_node, adj_l2_midchain)
diff --git a/src/vnet/adj/adj_nsh.c b/src/vnet/adj/adj_nsh.c
index 76503f59309..1a01471d8bc 100644
--- a/src/vnet/adj/adj_nsh.c
+++ b/src/vnet/adj/adj_nsh.c
@@ -17,7 +17,9 @@
#include <vnet/adj/adj_nsh.h>
#include <vnet/ip/ip.h>
+#ifndef CLIB_MARCH_VARIANT
nsh_main_dummy_t nsh_main_dummy;
+#endif /* CLIB_MARCH_VARIANT */
/**
* @brief Trace data for a NSH Midchain
@@ -149,16 +151,14 @@ adj_nsh_rewrite_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-adj_nsh_rewrite (vlib_main_t * vm,
+VLIB_NODE_FN (adj_nsh_rewrite_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
return adj_nsh_rewrite_inline (vm, node, frame, 0);
}
-static uword
-adj_nsh_midchain (vlib_main_t * vm,
+VLIB_NODE_FN (adj_nsh_midchain_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -166,7 +166,6 @@ adj_nsh_midchain (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (adj_nsh_rewrite_node) = {
- .function = adj_nsh_rewrite,
.name = "adj-nsh-rewrite",
.vector_size = sizeof (u32),
@@ -178,10 +177,7 @@ VLIB_REGISTER_NODE (adj_nsh_rewrite_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (adj_nsh_rewrite_node, adj_nsh_rewrite)
-
VLIB_REGISTER_NODE (adj_nsh_midchain_node) = {
- .function = adj_nsh_midchain,
.name = "adj-nsh-midchain",
.vector_size = sizeof (u32),
@@ -193,8 +189,6 @@ VLIB_REGISTER_NODE (adj_nsh_midchain_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (adj_nsh_midchain_node, adj_nsh_midchain)
-
/* Built-in ip4 tx feature path definition */
/* *INDENT-OFF* */
VNET_FEATURE_ARC_INIT (nsh_output, static) =