virtio: enable the interrupt support for uio_pci_generic 03/31403/3
authorMohsin Kazmi <sykazmi@cisco.com>
Mon, 22 Feb 2021 18:27:57 +0000 (18:27 +0000)
committerBeno�t Ganne <bganne@cisco.com>
Wed, 24 Feb 2021 16:43:35 +0000 (16:43 +0000)
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic25ffe9c8e37826733cfb9e62cefb491bb3322bc

src/vnet/devices/virtio/pci.c

index 908aba7..79bd004 100644 (file)
@@ -1451,10 +1451,12 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
       vif->support_int_mode = 1;
       virtio_log_debug (vif, "device supports msix interrupts");
     }
-  else if (interrupt_count == 1)
+  else
     {
       /*
-       * if msix table-size is 1, fall back to intX.
+       * WARN: performance will be sub-optimal.
+       * Fall back to intX, if msix table-size is 1 or
+       * if UIO driver is being used.
        */
       if ((error =
           vlib_pci_register_intx_handler (vm, h, &virtio_pci_irq_handler)))
@@ -1466,15 +1468,6 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
       vif->support_int_mode = 1;
       virtio_log_debug (vif, "pci register interrupt handler");
     }
-  else
-    {
-      /*
-       * WARN: intX is showing some weird behaviour.
-       * Please don't use interrupt mode with UIO driver.
-       */
-      vif->support_int_mode = 0;
-      virtio_log_debug (vif, "driver is configured in poll mode only");
-    }
 
   if ((error = vlib_pci_intr_enable (vm, h)))
     {