virtio: Use new buffer optimization
[vpp.git] / src / vnet / devices / virtio / pci.c
index 0ff453e..ffc18f4 100644 (file)
@@ -646,15 +646,15 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif)
       pos = cap.cap_next;
     }
 
-  if (!pci_cfg)
-    clib_error_return (error, "modern virtio pci device found");
-
   if (common_cfg == 0 || notify_base == 0 || dev_cfg == 0 || isr == 0)
     {
       virtio_log_debug (vim, vif, "legacy virtio pci device found");
       return error;
     }
 
+  if (!pci_cfg)
+    clib_error_return (error, "modern virtio pci device found");
+
   virtio_log_debug (vim, vif, "transitional virtio pci device found");
   return error;
 }
@@ -873,6 +873,7 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
   vnet_hw_interface_set_input_node (vnm, vif->hw_if_index,
                                    virtio_input_node.index);
   vnet_hw_interface_assign_rx_thread (vnm, vif->hw_if_index, 0, ~0);
+  virtio_vring_set_numa_node (vm, vif, 0);
 
   if (virtio_pci_is_link_up (vm, vif) & VIRTIO_NET_S_LINK_UP)
     {