/* Validate IP v6 packets and pass them either to forwarding code
or drop exception packets. */
-static uword
-ip6_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip6_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
vnet_main_t *vnm = vnet_get_main ();
ip6_main_t *im = &ip6_main;
return frame->n_vectors;
}
+#ifndef CLIB_MARCH_VARIANT
char *ip6_error_strings[] = {
#define _(sym,string) string,
foreach_ip6_error
#undef _
};
+#endif /* CLIB_MARCH_VARIANT */
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_input_node) = {
- .function = ip6_input,
.name = "ip6-input",
.vector_size = sizeof (u32),
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_input_node, ip6_input)
- static clib_error_t *ip6_init (vlib_main_t * vm)
+static clib_error_t *
+ip6_init (vlib_main_t * vm)
{
ethernet_register_input_type (vm, ETHERNET_TYPE_IP6, ip6_input_node.index);
ppp_register_input_protocol (vm, PPP_PROTOCOL_ip6, ip6_input_node.index);
VLIB_INIT_FUNCTION (ip6_init);
+static clib_error_t *
+ip6_main_loop_enter (vlib_main_t * vm)
+{
+ ip6_main_t *im = &ip6_main;
+ vlib_thread_main_t *tm = &vlib_thread_main;
+
+ throttle_init (&im->nd_throttle, tm->n_vlib_mains, 1e-3);
+
+ return 0;
+}
+
+VLIB_MAIN_LOOP_ENTER_FUNCTION (ip6_main_loop_enter);
+
/*
* fd.io coding-style-patch-verification: ON
*