summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/CMakeLists.txt6
-rw-r--r--src/vnet/cop/ip4_whitelist.c8
-rw-r--r--src/vnet/cop/ip6_whitelist.c8
-rw-r--r--src/vnet/cop/node1.c8
4 files changed, 9 insertions, 21 deletions
diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt
index f1ac547aa81..a5d5fe44364 100644
--- a/src/vnet/CMakeLists.txt
+++ b/src/vnet/CMakeLists.txt
@@ -93,6 +93,12 @@ list(APPEND VNET_SOURCES
cop/cop_api.c
)
+list(APPEND VNET_MULTIARCH_SOURCES
+ cop/node1.c
+ cop/ip4_whitelist.c
+ cop/ip6_whitelist.c
+)
+
list(APPEND VNET_HEADERS
cop/cop.h
)
diff --git a/src/vnet/cop/ip4_whitelist.c b/src/vnet/cop/ip4_whitelist.c
index 1b5e336b752..484ad3637af 100644
--- a/src/vnet/cop/ip4_whitelist.c
+++ b/src/vnet/cop/ip4_whitelist.c
@@ -33,8 +33,6 @@ static u8 * format_ip4_cop_whitelist_trace (u8 * s, va_list * args)
return s;
}
-vlib_node_registration_t ip4_cop_whitelist_node;
-
#define foreach_ip4_cop_whitelist_error \
_(DROPPED, "ip4 cop whitelist packets dropped")
@@ -51,8 +49,7 @@ static char * ip4_cop_whitelist_error_strings[] = {
#undef _
};
-static uword
-ip4_cop_whitelist_node_fn (vlib_main_t * vm,
+VLIB_NODE_FN (ip4_cop_whitelist_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -304,7 +301,6 @@ ip4_cop_whitelist_node_fn (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (ip4_cop_whitelist_node) = {
- .function = ip4_cop_whitelist_node_fn,
.name = "ip4-cop-whitelist",
.vector_size = sizeof (u32),
.format_trace = format_ip4_cop_whitelist_trace,
@@ -327,8 +323,6 @@ VLIB_REGISTER_NODE (ip4_cop_whitelist_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_cop_whitelist_node, ip4_cop_whitelist_node_fn)
-
static clib_error_t *
ip4_whitelist_init (vlib_main_t * vm)
{
diff --git a/src/vnet/cop/ip6_whitelist.c b/src/vnet/cop/ip6_whitelist.c
index f3fe62e35b1..7cf2368e798 100644
--- a/src/vnet/cop/ip6_whitelist.c
+++ b/src/vnet/cop/ip6_whitelist.c
@@ -33,8 +33,6 @@ static u8 * format_ip6_cop_whitelist_trace (u8 * s, va_list * args)
return s;
}
-vlib_node_registration_t ip6_cop_whitelist_node;
-
#define foreach_ip6_cop_whitelist_error \
_(DROPPED, "ip6 cop whitelist packets dropped")
@@ -51,8 +49,7 @@ static char * ip6_cop_whitelist_error_strings[] = {
#undef _
};
-static uword
-ip6_cop_whitelist_node_fn (vlib_main_t * vm,
+VLIB_NODE_FN (ip6_cop_whitelist_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -264,7 +261,6 @@ ip6_cop_whitelist_node_fn (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (ip6_cop_whitelist_node) = {
- .function = ip6_cop_whitelist_node_fn,
.name = "ip6-cop-whitelist",
.vector_size = sizeof (u32),
.format_trace = format_ip6_cop_whitelist_trace,
@@ -287,8 +283,6 @@ VLIB_REGISTER_NODE (ip6_cop_whitelist_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_cop_whitelist_node, ip6_cop_whitelist_node_fn)
-
static clib_error_t *
ip6_whitelist_init (vlib_main_t * vm)
{
diff --git a/src/vnet/cop/node1.c b/src/vnet/cop/node1.c
index b448b531039..172c13d312e 100644
--- a/src/vnet/cop/node1.c
+++ b/src/vnet/cop/node1.c
@@ -32,8 +32,6 @@ static u8 * format_cop_input_trace (u8 * s, va_list * args)
return s;
}
-vlib_node_registration_t cop_input_node;
-
#define foreach_cop_input_error \
_(PROCESSED, "COP input packets processed")
@@ -50,8 +48,7 @@ static char * cop_input_error_strings[] = {
#undef _
};
-static uword
-cop_input_node_fn (vlib_main_t * vm,
+VLIB_NODE_FN (cop_input_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -259,7 +256,6 @@ cop_input_node_fn (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (cop_input_node) = {
- .function = cop_input_node_fn,
.name = "cop-input",
.vector_size = sizeof (u32),
.format_trace = format_cop_input_trace,
@@ -282,8 +278,6 @@ VLIB_REGISTER_NODE (cop_input_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (cop_input_node, cop_input_node_fn)
-
#define foreach_cop_stub \
_(default-cop-whitelist, default_cop_whitelist)