[RFC PATCH 03/10] qemu_command: Added "rss" and "hash" properties.

Andrew Melnychenko posted 10 patches 4 years, 6 months ago
There is a newer version of this series
[RFC PATCH 03/10] qemu_command: Added "rss" and "hash" properties.
Posted by Andrew Melnychenko 4 years, 6 months ago
If domain config contains "rss" and/or "rss_hash_report" options for driver.
Also if the qemu has device capabilities for RSS. Libvirt will create an NIC device
command line with enabled "rss"/"hash".

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
---
 src/qemu/qemu_command.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 156af4caee..67a396a513 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3495,6 +3495,16 @@ qemuBuildNicDevStr(virDomainDef *def,
         if (net->driver.virtio.tx_queue_size)
             virBufferAsprintf(&buf, ",tx_queue_size=%u", net->driver.virtio.tx_queue_size);
 
+        if (net->driver.virtio.rss == VIR_TRISTATE_SWITCH_ON) {
+            virBufferAsprintf(&buf, ",rss=%s",
+                    virTristateSwitchTypeToString(net->driver.virtio.rss));
+        }
+
+        if (net->driver.virtio.rss_hash_report == VIR_TRISTATE_SWITCH_ON) {
+            virBufferAsprintf(&buf, ",hash=%s",
+                    virTristateSwitchTypeToString(net->driver.virtio.rss_hash_report));
+        }
+
         if (net->mtu)
             virBufferAsprintf(&buf, ",host_mtu=%u", net->mtu);
 
-- 
2.31.1

Re: [RFC PATCH 03/10] qemu_command: Added "rss" and "hash" properties.
Posted by Michal Prívozník 4 years, 5 months ago
On 7/28/21 10:17 AM, Andrew Melnychenko wrote:
> If domain config contains "rss" and/or "rss_hash_report" options for driver.
> Also if the qemu has device capabilities for RSS. Libvirt will create an NIC device
> command line with enabled "rss"/"hash".
> 
> Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
> ---
>  src/qemu/qemu_command.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

To continue my suggestion from 01/10 this could then introduce xml2argv
test case.

Michal

Re: [RFC PATCH 03/10] qemu_command: Added "rss" and "hash" properties.
Posted by Andrew Melnichenko 4 years, 5 months ago
Hi,
Yea, it is only RFC - later I'll add all tests for review in v2.

On Fri, Aug 20, 2021 at 3:57 PM Michal Prívozník <mprivozn@redhat.com>
wrote:

> On 7/28/21 10:17 AM, Andrew Melnychenko wrote:
> > If domain config contains "rss" and/or "rss_hash_report" options for
> driver.
> > Also if the qemu has device capabilities for RSS. Libvirt will create an
> NIC device
> > command line with enabled "rss"/"hash".
> >
> > Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
> > ---
> >  src/qemu/qemu_command.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
>
> To continue my suggestion from 01/10 this could then introduce xml2argv
> test case.
>
> Michal
>
>