]> xenbits.xensource.com Git - libvirt.git/commitdiff
ch: Introduce version based cap for network support
authorPraveen K Paladugu <prapal@linux.microsoft.com>
Tue, 16 Jan 2024 21:25:42 +0000 (15:25 -0600)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Feb 2024 09:58:31 +0000 (10:58 +0100)
This capability checks if ch can receive multiple fds along with net-add
api. This capability is required to enable multiple queues for
domain/guest interfaces.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/ch/ch_capabilities.c
src/ch/ch_capabilities.h

index b10485820c130e812f4e7f0725a25b630d266895..b9e62d2d5bf535c46ffd730f16ebe815538cf61a 100644 (file)
@@ -50,6 +50,15 @@ virCHCapsInitCHVersionCaps(int version)
     if (version >= 18000000)
         virCHCapsSet(chCaps, CH_SERIAL_CONSOLE_IN_PARALLEL);
 
+    /* Starting Version 22, add-net api can accept multiple FDs in the request
+     * This is required to be able to configure queues for virtio-net devices
+     * from libvirt.
+     * This capability will be used to gate networking support for ch guests.
+     * https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v22.0
+     */
+    if (version >= 22000000)
+        virCHCapsSet(chCaps, CH_MULTIFD_IN_ADDNET);
+
     return g_steal_pointer(&chCaps);
 
 }
index 703a6dbfe2c7bd3083a23d81f2300779521e4092..ffb8881a11170f02a924f88572aceb2fbf55a8b5 100644 (file)
@@ -26,6 +26,7 @@ typedef enum {
     /* 0 */
     CH_KERNEL_API_DEPRCATED, /* Use `payload` in place of `kernel` api */
     CH_SERIAL_CONSOLE_IN_PARALLEL, /* Serial and Console ports can work in parallel */
+    CH_MULTIFD_IN_ADDNET, /* Cloud-hypervisor can accept multiple FDs in add-net api */
 
     CH_CAPS_LAST /* this must always be the last item */
 } virCHCapsFlags;