[PATCHv2 1/3] qemu: detect support for vhost-net busy polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@xxxxxxxxxx>

Detect support for vhost-net busy polling (the "poll-us" commandline
option). This was added to upstream qemu in version 2.7.0, commit
69e87b32.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@xxxxxxxxxx>
---

 Addressed comments:
 - Commit message updated
 - s/QEMU_CAPS_VHOST_NET_POLL_US/QEMU_CAPS_NETDEV_POLL_US
 - s/vhost-net.poll_us/netdev.poll-us

 src/qemu/qemu_capabilities.c                     | 5 +++++
 src/qemu/qemu_capabilities.h                     | 1 +
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml  | 1 +
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml  | 1 +
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
 7 files changed, 11 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 04aa8d5..b3e5a3d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -431,6 +431,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "virtio.ats",
               "loadparm",
               "spapr-pci-host-bridge",
+              "netdev.poll-us",
     );
 
 
@@ -4826,6 +4827,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
     if (qemuCaps->version >= 2006000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT);
 
+    /* Support for busy polling ("-netdev tap,...,poll-us=n") */
+    if (qemuCaps->version >= 2007000)
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV_POLL_US);
+
     if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
         goto cleanup;
 
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 8250b57..7638e2e 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -417,6 +417,7 @@ typedef enum {
     QEMU_CAPS_VIRTIO_PCI_ATS, /* virtio-*-pci.ats */
     QEMU_CAPS_LOADPARM, /* -machine loadparm */
     QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, /* -device spapr-pci-host-bridge */
+    QEMU_CAPS_NETDEV_POLL_US, /* -netdev poll-us= */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
index ec79115..715b4f7 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -131,6 +131,7 @@
   <flag name='query-named-block-nodes'/>
   <flag name='kernel-irqchip'/>
   <flag name='kernel-irqchip.split'/>
+  <flag name='netdev.poll-us'/>
   <version>2007000</version>
   <kvmVersion>0</kvmVersion>
   <package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 5f98db8..66b5409 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -204,6 +204,7 @@
   <flag name='kernel-irqchip'/>
   <flag name='kernel-irqchip.split'/>
   <flag name='intel-iommu.intremap'/>
+  <flag name='netdev.poll-us'/>
   <version>2007000</version>
   <kvmVersion>0</kvmVersion>
   <package> (v2.7.0)</package>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index ac40ecc..03c757e 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -133,6 +133,7 @@
   <flag name='query-named-block-nodes'/>
   <flag name='kernel-irqchip'/>
   <flag name='kernel-irqchip.split'/>
+  <flag name='netdev.poll-us'/>
   <version>2007093</version>
   <kvmVersion>0</kvmVersion>
   <package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index e42e47a..9b73e80 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -206,6 +206,7 @@
   <flag name='kernel-irqchip.split'/>
   <flag name='intel-iommu.intremap'/>
   <flag name='intel-iommu.eim'/>
+  <flag name='netdev.poll-us'/>
   <version>2008000</version>
   <kvmVersion>0</kvmVersion>
   <package> (v2.8.0)</package>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index ae1530b..54f9cf3 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -217,6 +217,7 @@
   <flag name='intel-iommu.device-iotlb'/>
   <flag name='virtio.iommu_platform'/>
   <flag name='virtio.ats'/>
+  <flag name='netdev.poll-us'/>
   <version>2009000</version>
   <kvmVersion>0</kvmVersion>
   <package> (v2.9.0)</package>
-- 
2.9.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux