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(a)linux.microsoft.com>
---
src/ch/ch_capabilities.c | 9 +++++++++
src/ch/ch_capabilities.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/src/ch/ch_capabilities.c b/src/ch/ch_capabilities.c
index b10485820c..b9e62d2d5b 100644
--- a/src/ch/ch_capabilities.c
+++ b/src/ch/ch_capabilities.c
@@ -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);
}
diff --git a/src/ch/ch_capabilities.h b/src/ch/ch_capabilities.h
index 703a6dbfe2..ffb8881a11 100644
--- a/src/ch/ch_capabilities.h
+++ b/src/ch/ch_capabilities.h
@@ -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;
--
2.41.0