summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/CMakeLists.txt5
-rw-r--r--src/vnet/classify/flow_classify_node.c18
-rw-r--r--src/vnet/classify/ip_classify.c24
3 files changed, 21 insertions, 26 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index 705f6b73e1d..6ebb48569d8 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -369,6 +369,11 @@ list(APPEND VNET_SOURCES
classify/classify_api.c
)
+list(APPEND VNET_MULTIARCH_SOURCES
+ classify/ip_classify.c
+ classify/flow_classify_node.c
+)
+
list(APPEND VNET_HEADERS
classify/vnet_classify.h
classify/in_out_acl.h
diff --git a/src/vnet/classify/flow_classify_node.c b/src/vnet/classify/flow_classify_node.c
index 5941b6dd9b3..865281ec032 100644
--- a/src/vnet/classify/flow_classify_node.c
+++ b/src/vnet/classify/flow_classify_node.c
@@ -275,16 +275,15 @@ flow_classify_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-ip4_flow_classify (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip4_flow_classify_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return flow_classify_inline (vm, node, frame, FLOW_CLASSIFY_TABLE_IP4);
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_flow_classify_node) = {
- .function = ip4_flow_classify,
.name = "ip4-flow-classify",
.vector_size = sizeof (u32),
.format_trace = format_flow_classify_trace,
@@ -297,18 +296,15 @@ VLIB_REGISTER_NODE (ip4_flow_classify_node) = {
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_flow_classify_node, ip4_flow_classify);
-
-static uword
-ip6_flow_classify (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip6_flow_classify_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return flow_classify_inline (vm, node, frame, FLOW_CLASSIFY_TABLE_IP6);
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_flow_classify_node) = {
- .function = ip6_flow_classify,
.name = "ip6-flow-classify",
.vector_size = sizeof (u32),
.format_trace = format_flow_classify_trace,
@@ -322,8 +318,6 @@ VLIB_REGISTER_NODE (ip6_flow_classify_node) = {
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_flow_classify_node, ip6_flow_classify);
-
static clib_error_t *
flow_classify_init (vlib_main_t * vm)
diff --git a/src/vnet/classify/ip_classify.c b/src/vnet/classify/ip_classify.c
index 1a8e1dd41e5..43ad2e8e8bb 100644
--- a/src/vnet/classify/ip_classify.c
+++ b/src/vnet/classify/ip_classify.c
@@ -37,9 +37,6 @@ format_ip_classify_trace (u8 * s, va_list * args)
return s;
}
-vlib_node_registration_t ip4_classify_node;
-vlib_node_registration_t ip6_classify_node;
-
#define foreach_ip_classify_error \
_(MISS, "Classify misses") \
_(HIT, "Classify hits") \
@@ -311,9 +308,9 @@ ip_classify_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-ip4_classify (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip4_classify_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return ip_classify_inline (vm, node, frame, 1 /* is_ip4 */ );
}
@@ -321,7 +318,6 @@ ip4_classify (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_classify_node) = {
- .function = ip4_classify,
.name = "ip4-classify",
.vector_size = sizeof (u32),
.sibling_of = "ip4-lookup",
@@ -333,10 +329,9 @@ VLIB_REGISTER_NODE (ip4_classify_node) = {
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_classify_node, ip4_classify)
- static uword
- ip6_classify (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip6_classify_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return ip_classify_inline (vm, node, frame, 0 /* is_ip4 */ );
}
@@ -344,7 +339,6 @@ VLIB_NODE_FUNCTION_MULTIARCH (ip4_classify_node, ip4_classify)
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_classify_node) = {
- .function = ip6_classify,
.name = "ip6-classify",
.vector_size = sizeof (u32),
.sibling_of = "ip6-lookup",
@@ -356,13 +350,15 @@ VLIB_REGISTER_NODE (ip6_classify_node) = {
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_classify_node, ip6_classify)
- static clib_error_t *ip_classify_init (vlib_main_t * vm)
+#ifndef CLIB_MARCH_VARIANT
+static clib_error_t *
+ip_classify_init (vlib_main_t * vm)
{
return 0;
}
VLIB_INIT_FUNCTION (ip_classify_init);
+#endif /* CLIB_MARCH_VARIANT */
/*
* fd.io coding-style-patch-verification: ON