aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-03-07 00:30:03 -0800
committerDamjan Marion <dmarion@me.com>2019-03-11 09:15:28 +0000
commit79c27ebe0f29769d5ec711e3b5f7b156e225c4f4 (patch)
tree073d5cb90aa41900ead9da81e962fdf15926695a /src
parentbf7ce2cd3c4e5561f7cc70a49e6da4fab557b873 (diff)
mfib: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I7114cd55ce1fc320d17b36cab731546fe4c58a72 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/CMakeLists.txt4
-rw-r--r--src/vnet/mfib/mfib_forward.c38
2 files changed, 13 insertions, 29 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index 6ebb48569d8..8dd2f73bac7 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -1383,6 +1383,10 @@ list(APPEND VNET_SOURCES
mfib/mfib_table.c
)
+list(APPEND VNET_MULTIARCH_SOURCES
+ mfib/mfib_forward.c
+)
+
list(APPEND VNET_HEADERS
mfib/ip4_mfib.h
mfib/mfib_types.h
diff --git a/src/vnet/mfib/mfib_forward.c b/src/vnet/mfib/mfib_forward.c
index 634b675999e..c5e1dfc9344 100644
--- a/src/vnet/mfib/mfib_forward.c
+++ b/src/vnet/mfib/mfib_forward.c
@@ -42,7 +42,7 @@ format_mfib_forward_lookup_trace (u8 * s, va_list * args)
}
/* Common trace function for all ip4-forward next nodes. */
-void
+static void
mfib_forward_lookup_trace (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
@@ -184,16 +184,14 @@ mfib_forward_lookup (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-ip4_mfib_forward_lookup (vlib_main_t * vm,
+VLIB_NODE_FN (ip4_mfib_forward_lookup_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
return (mfib_forward_lookup (vm, node, frame, 1));
}
-VLIB_REGISTER_NODE (ip4_mfib_forward_lookup_node, static) = {
- .function = ip4_mfib_forward_lookup,
+VLIB_REGISTER_NODE (ip4_mfib_forward_lookup_node) = {
.name = "ip4-mfib-forward-lookup",
.vector_size = sizeof (u32),
@@ -205,19 +203,14 @@ VLIB_REGISTER_NODE (ip4_mfib_forward_lookup_node, static) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_mfib_forward_lookup_node,
- ip4_mfib_forward_lookup)
-
-static uword
-ip6_mfib_forward_lookup (vlib_main_t * vm,
+VLIB_NODE_FN (ip6_mfib_forward_lookup_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
return (mfib_forward_lookup (vm, node, frame, 0));
}
-VLIB_REGISTER_NODE (ip6_mfib_forward_lookup_node, static) = {
- .function = ip6_mfib_forward_lookup,
+VLIB_REGISTER_NODE (ip6_mfib_forward_lookup_node) = {
.name = "ip6-mfib-forward-lookup",
.vector_size = sizeof (u32),
@@ -229,9 +222,6 @@ VLIB_REGISTER_NODE (ip6_mfib_forward_lookup_node, static) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_mfib_forward_lookup_node,
- ip6_mfib_forward_lookup)
-
typedef struct mfib_forward_rpf_trace_t_ {
u32 entry_index;
@@ -483,8 +473,7 @@ mfib_forward_rpf (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-ip4_mfib_forward_rpf (vlib_main_t * vm,
+VLIB_NODE_FN (ip4_mfib_forward_rpf_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -492,8 +481,7 @@ ip4_mfib_forward_rpf (vlib_main_t * vm,
}
-VLIB_REGISTER_NODE (ip4_mfib_forward_rpf_node, static) = {
- .function = ip4_mfib_forward_rpf,
+VLIB_REGISTER_NODE (ip4_mfib_forward_rpf_node) = {
.name = "ip4-mfib-forward-rpf",
.vector_size = sizeof (u32),
@@ -505,11 +493,7 @@ VLIB_REGISTER_NODE (ip4_mfib_forward_rpf_node, static) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_mfib_forward_rpf_node,
- ip4_mfib_forward_rpf)
-
-static uword
-ip6_mfib_forward_rpf (vlib_main_t * vm,
+VLIB_NODE_FN (ip6_mfib_forward_rpf_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -517,8 +501,7 @@ ip6_mfib_forward_rpf (vlib_main_t * vm,
}
-VLIB_REGISTER_NODE (ip6_mfib_forward_rpf_node, static) = {
- .function = ip6_mfib_forward_rpf,
+VLIB_REGISTER_NODE (ip6_mfib_forward_rpf_node) = {
.name = "ip6-mfib-forward-rpf",
.vector_size = sizeof (u32),
@@ -530,6 +513,3 @@ VLIB_REGISTER_NODE (ip6_mfib_forward_rpf_node, static) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_mfib_forward_rpf_node,
- ip6_mfib_forward_rpf)
-