ip: add support for buffer offload metadata in ip midchain
[vpp.git] / src / vnet / ip / ip4_input.c
index 94c4aac..106d17d 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <vnet/ip/ip4_input.h>
 #include <vnet/ethernet/ethernet.h>
+#include <vnet/pg/pg.h>
 #include <vnet/ppp/ppp.h>
 #include <vnet/hdlc/hdlc.h>
 #include <vnet/util/throttle.h>
@@ -373,22 +374,13 @@ VLIB_NODE_FN (ip4_input_no_checksum_node) (vlib_main_t * vm,
   return ip4_input_inline (vm, node, frame, /* verify_checksum */ 0);
 }
 
-#ifndef CLIB_MARCH_VARIANT
-char *ip4_error_strings[] = {
-#define _(sym,string) string,
-  foreach_ip4_error
-#undef _
-};
-#endif
-
-/* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ip4_input_node) = {
   .name = "ip4-input",
   .vector_size = sizeof (u32),
   .protocol_hint = VLIB_NODE_PROTO_HINT_IP4,
 
   .n_errors = IP4_N_ERROR,
-  .error_strings = ip4_error_strings,
+  .error_counters = ip4_error_counters,
 
   .n_next_nodes = IP4_INPUT_N_NEXT,
   .next_nodes = {
@@ -398,7 +390,6 @@ VLIB_REGISTER_NODE (ip4_input_node) = {
     [IP4_INPUT_NEXT_LOOKUP] = "ip4-lookup",
     [IP4_INPUT_NEXT_LOOKUP_MULTICAST] = "ip4-mfib-forward-lookup",
     [IP4_INPUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
-    [IP4_INPUT_NEXT_REASSEMBLY] = "ip4-reassembly",
   },
 
   .format_buffer = format_ip4_header,
@@ -413,7 +404,6 @@ VLIB_REGISTER_NODE (ip4_input_no_checksum_node) = {
   .format_buffer = format_ip4_header,
   .format_trace = format_ip4_input_trace,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 ip4_init (vlib_main_t * vm)
@@ -436,9 +426,6 @@ ip4_init (vlib_main_t * vm)
   if ((error = vlib_call_init_function (vm, ip4_cli_init)))
     return error;
 
-  if ((error = vlib_call_init_function (vm, ip4_source_check_init)))
-    return error;
-
   if ((error = vlib_call_init_function
        (vm, ip4_source_and_port_range_check_init)))
     return error;
@@ -454,20 +441,6 @@ ip4_init (vlib_main_t * vm)
 
 VLIB_INIT_FUNCTION (ip4_init);
 
-static clib_error_t *
-ip4_main_loop_enter (vlib_main_t * vm)
-{
-  ip4_main_t *im = &ip4_main;
-  vlib_thread_main_t *tm = &vlib_thread_main;
-  u32 n_vlib_mains = tm->n_vlib_mains;
-
-  throttle_init (&im->arp_throttle, n_vlib_mains, 1e-3);
-
-  return (NULL);
-}
-
-VLIB_MAIN_LOOP_ENTER_FUNCTION (ip4_main_loop_enter);
-
 /*
  * fd.io coding-style-patch-verification: ON
  *