From 4349a11f066f8c274eceb0623fcba6e3c46c7419 Mon Sep 17 00:00:00 2001 From: Kristian Feldsam Date: Sun, 17 Dec 2023 21:50:11 +0100 Subject: [PATCH] F #6435: Automatic setting of NIC IO queues Signed-off-by: Kristian Feldsam --- .../create/wizard-tabs/network/nic-tab/html.hbs | 5 ++++- src/vmm/LibVirtDriverKVM.cc | 16 +++++++++++++++- src/vmm_mad/exec/vmm_exec_kvm.conf | 4 +++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab/html.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab/html.hbs index 8477457b53a..244457be2b0 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab/html.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab/html.hbs @@ -313,7 +313,10 @@ {{tr "Transmission queue"}} {{{tip (tr "Only supported for virtio driver.")}}} - +
diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index e4c919ca622..22f926b45ee 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -633,7 +633,8 @@ int LibVirtDriver::deployment_description_kvm( string o_peak_kb; string default_filter; - string default_model ; + string default_model; + string default_virtio_queues; const VectorAttribute * graphics; @@ -1676,6 +1677,8 @@ int LibVirtDriver::deployment_description_kvm( get_attribute(nullptr, host, cluster, "NIC", "MODEL", default_model); + get_attribute(nullptr, host, cluster, "NIC", "VIRTIO_QUEUES", default_virtio_queues); + num = vm->get_template_attribute("NIC", nic); for (int i=0; i\n"; + if (!virtio_queues.empty()) + { + set_queues(virtio_queues, vcpu) + } + else if (!default_virtio_queues.empty()) + { + set_queues(default_virtio_queues, vcpu) + + virtio_queues = default_virtio_queues; + } + if (!virtio_queues.empty() && *the_model == "virtio") { file << "\t\t\t