Add support for multiple microarchitectures in single binary
[vpp.git] / vnet / vnet / devices / netmap / node.c
index f866a28..f4c39e6 100644 (file)
  *------------------------------------------------------------------
  */
 
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
+
 #include <vlib/vlib.h>
 #include <vlib/unix/unix.h>
 #include <vnet/ethernet/ethernet.h>
 
+#include <vnet/devices/netmap/net_netmap.h>
 #include <vnet/devices/netmap/netmap.h>
 
 #define foreach_netmap_input_error
@@ -235,7 +240,7 @@ netmap_device_input_fn  (vlib_main_t * vm, vlib_node_runtime_t * node,
     }
 
   if (n_rx_packets)
-    ioctl(nif->fd, NIOCTXSYNC, NULL);
+    ioctl(nif->fd, NIOCRXSYNC, NULL);
 
   vlib_increment_combined_counter
     (vnet_get_main()->interface_main.combined_sw_if_counters
@@ -265,7 +270,6 @@ netmap_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
   return n_rx_packets;
 }
 
-
 VLIB_REGISTER_NODE (netmap_input_node) = {
   .function = netmap_input_fn,
   .name = "netmap-input",
@@ -282,3 +286,5 @@ VLIB_REGISTER_NODE (netmap_input_node) = {
   },
 };
 
+VLIB_NODE_FUNCTION_MULTIARCH (netmap_input_node, netmap_input_fn)
+