<div dir="ltr">Hi Ashish, <div><br></div><div>I have tested with your xml in the first mail, and it works for <span style="font-size:12.8px">rx_queue_size(see below)</span>. </div><div>multiqueue need to work with vhost backend driver. And when you set "queues=1" it will ignored.</div><div><br></div><div>Please check your qemu-kvm-rhev package, should be newer than <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px">qemu-kvm-rhev-2.9.0-16.<wbr>el7_4.2</span></div><div><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">And the logs?</span></font></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px"><br></span></div><div>tx_queue_size='512' will not work in the guest with direct type interface, in fact, no matter what you set, it will not work and guest will get the default '256'. <br></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">We only support vhost-user backend to have more than 256. </span>refer to <a href="https://libvirt.org/formatdomain.html#elementsNICSEthernet" target="_blank">https://libvirt.org/<wbr>formatdomain.html#<wbr>elementsNICSEthernet</a></div><div><br></div><div><div><div><span style="font-family:LibvirtOverpassMono;font-weight:bold;color:rgb(0,0,0);font-size:medium">tx_queue_size</span></div><dd style="margin-left:2em;margin-right:2em;margin-bottom:0.5em;color:rgb(0,0,0);font-family:LibvirtOverpass;font-size:medium">The optional <code style="font-family:LibvirtOverpassMono;background-color:rgb(238,238,238)">tx_queue_size</code> <wbr>attribute controls the size of virtio ring for each queue as described above. The default value is hypervisor dependent and may change across its releases. Moreover, some hypervisors may pose some restrictions on actual value. For instance, QEMU v2.9 requires value to be a power of two from [256, 1024] range. In addition to that, this may work only for a subset of interface types, e.g. aforementioned QEMU enables this option only for <code style="font-family:LibvirtOverpassMono;background-color:rgb(238,238,238)">vhostuser</code> type. <span class="gmail-m_843597909639990587gmail-since" style="color:rgb(60,133,124);font-style:italic;font-weight:bold">Since 3.7.0 (QEMU and KVM only)</span></dd></div></div><div>multiqueue only supports vhost as backend driver.<br></div><div><br></div><div><div># rpm -q libvirt qemu-kvm-rhev</div><div>libvirt-3.2.0-14.el7_4.3.x86_64</div><div>qemu-kvm-rhev-2.9.0-16.el7_4.9.x86_64</div></div><div><br></div><div>1. the xml as below</div><div><div>   <interface type='direct'></div><div>      <mac address='52:54:00:00:b5:99'/></div><div>      <source dev='eno1' mode='vepa'/></div><div>      <model type='virtio'/></div><div>      <driver name='vhost' queues='5' rx_queue_size='512' tx_queue_size='512'></div><div>        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/></div><div>        <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/></div><div>      </driver></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/></div><div>    </interface></div></div><div><br></div><div>2. after start the vm, check the qemu command line:</div><div><b>-netdev tap,fds=26:28:29:30:31,id=hostnet0,vhost=on,vhostfds=32:33:34:35:36</b> -device virtio-net-pci,csum=off,gso=off,host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,mrg_rxbuf=off,guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,<b>mq=on,vectors=12,rx_queue_size=512,tx_queue_size=512</b>,netdev=hostnet0,id=net0,mac=52:54:00:00:b5:99,bus=pci.0,addr=0x3 <br></div><div><br></div><div>3. check on guest</div><div><div># ethtool -g eth0</div><div>Ring parameters for eth0:</div><div>Pre-set maximums:</div><div>RX:<span style="white-space:pre">           </span><b>512 ==> rx_queue_size works</b></div><div>RX Mini:<span style="white-space:pre">     </span>0</div><div>RX Jumbo:<span style="white-space:pre">    </span>0</div><div>TX:<span style="white-space:pre">          </span><b>256   ===> no change</b></div><div>Current hardware settings:</div><div>RX:<span style="white-space:pre">               </span><b>512 </b><b>==> rx_queue_size works</b></div><div>RX Mini:<span style="white-space:pre"> </span>0</div><div>RX Jumbo:<span style="white-space:pre">    </span>0</div><div>TX:<span style="white-space:pre">          </span><b>256 ===> no change</b></div><div><br></div></div><div><div># ethtool -l eth0</div><div>Channel parameters for eth0:</div><div>Pre-set maximums:</div><div>RX:<span style="white-space:pre">                </span>0</div><div>TX:<span style="white-space:pre">          </span>0</div><div>Other:<span style="white-space:pre">               </span>0</div><div>Combined:<span style="white-space:pre">    </span><b>5  ==> queues what we set</b></div><div>Current hardware settings:</div><div>RX:<span style="white-space:pre">          </span>0</div><div>TX:<span style="white-space:pre">          </span>0</div><div>Other:<span style="white-space:pre">               </span>0</div><div>Combined:<span style="white-space:pre">    </span>1</div></div><div><br></div><div><br></div><div>If change to qemu as driver, </div><div># virsh edit rhel7<br></div><div>..</div><div><div>  <interface type='direct'></div><div>      <mac address='52:54:00:00:b5:99'/></div><div>      <source dev='eno1' mode='vepa'/></div><div>      <model type='virtio'/></div><div>      <driver name='qemu' queues='5' rx_queue_size='512' tx_queue_size='512'></div><div>        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/></div><div>        <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/></div><div>      </driver></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/></div><div>    </interface></div></div><div>..</div><div>Domain rhel7 XML configuration edited. ==> the xml can validate and save<br></div><div><br></div><div><div># virsh start rhel7</div><div>Domain rhel7 started</div></div><div><br></div><div><br></div><div><div># virsh dumpxml rhel7 | grep /interface -B9</div><div>      <source dev='eno1' mode='vepa'/></div><div>      <target dev='macvtap0'/></div><div>      <model type='virtio'/></div><div>      <b><driver name='qemu' queues='5' rx_queue_size='512' tx_queue_size='512'></b></div><div>        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/></div><div>        <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/></div><div>      </driver></div><div>      <alias name='net0'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/></div><div>    </interface></div></div><div><br></div><div><br></div><div><b> -netdev tap,fds=26:28:29:30:31</b>,id=hostnet0 -device virtio-net-pci,csum=off,gso=off,host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,mrg_rxbuf=off,guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,<b>rx_queue_size=512,tx_queue_size=512</b>,netdev=hostnet0,id=net0,mac=52:54:00:00:b5:99,bus=pci.0,addr=0x3</div><div><br></div><div><b>"mq=on,vectors=12" is missing</b>, indicates there is no multiqueue<br></div><div><br></div><div>and check on guest</div><div><br></div><div><div># ethtool -l eth0</div><div>Channel parameters for eth0:</div><div>Pre-set maximums:</div><div>RX:<span style="white-space:pre">                </span>0</div><div>TX:<span style="white-space:pre">          </span>0</div><div>Other:<span style="white-space:pre">               </span>0</div><div>Combined:<span style="white-space:pre">    </span>1  ==> no multiqueue</div><div>Current hardware settings:</div><div>RX:<span style="white-space:pre">          </span>0</div><div>TX:<span style="white-space:pre">          </span>0</div><div>Other:<span style="white-space:pre">               </span>0</div><div>Combined:<span style="white-space:pre">    </span>1</div><div><br></div><div># ethtool -g eth0</div><div>Ring parameters for eth0:</div><div>Pre-set maximums:</div><div>RX:<span style="white-space:pre">         </span><b>512</b></div><div>RX Mini:<span style="white-space:pre">        </span>0</div><div>RX Jumbo:<span style="white-space:pre">    </span>0</div><div>TX:<span style="white-space:pre">          </span>256</div><div>Current hardware settings:</div><div>RX:<span style="white-space:pre">               </span><b>512</b></div><div>RX Mini:<span style="white-space:pre">        </span>0</div><div>RX Jumbo:<span style="white-space:pre">    </span>0</div><div>TX:<span style="white-space:pre">          </span>256</div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br><br>-------<br>Best Regards,<br>Yalan Zhang<br>IRC: yalzhang<br>Internal phone: 8389413</div></div>
<br><div class="gmail_quote">On Thu, Oct 26, 2017 at 2:33 AM, Ashish Kurian <span dir="ltr"><<a href="mailto:ashishbnv@gmail.com" target="_blank">ashishbnv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Michal,<div><br></div><div>An update to what I have already said : when I try adding <span style="font-size:12.8px"><driver name='qemu' txmode='iothread' ioeventfd='on' event_idx='off' queues='1' rx_queue_size='512' tx_queue_size='512'> although it showed me the error as mentioned, when I checked the xml again I saw that </span><span style="font-size:12.8px"><driver name='qemu' txmode='iothread' ioeventfd='on' event_idx='off' > is added to the interface.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">The missing parameters are : </span><span style="font-size:12.8px">queues='1' rx_queue_size='512' tx_queue_size='512'</span></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-212787898175025196gmail_signature" data-smartmail="gmail_signature">Best Regards,<br>Ashish Kurian</div></div><div><div class="h5">
<br><div class="gmail_quote">On Wed, Oct 25, 2017 at 5:07 PM, Ashish Kurian <span dir="ltr"><<a href="mailto:ashishbnv@gmail.com" target="_blank">ashishbnv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Michal,<div><br></div><div>What I found was that when I restarted the machine and did a virsh edit command to see the xml config, I see that it is was not actually changed. This suggests why I saw 256 again after restarting.</div><div><br></div><div>So now I tried again to edit the xml via virsh edit command and used the following to set the parameters.</div><div><br></div><div><driver name='qemu' txmode='iothread' ioeventfd='on' event_idx='off' queues='1' rx_queue_size='512' tx_queue_size='512'><br></div><div></driver><br></div><div><br></div><div>It was not accepted and I got the error saying :</div><div><br></div><div><br></div><div><div>error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/dom<wbr>ain.rng</div><div>Extra element devices in interleave</div><div>Element domain failed to validate content</div></div><div><br></div><div>What does this imply? I have two more other interfaces and do I have to the same to them also?</div><div><br></div><div>Btw, there are now logs generated now in the domain log or libvirtd log</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-212787898175025196m_8788737298834798581gmail_signature" data-smartmail="gmail_signature">Best Regards,<br>Ashish Kurian</div></div><div><div class="m_-212787898175025196h5">
<br><div class="gmail_quote">On Wed, Oct 25, 2017 at 2:50 PM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-212787898175025196m_8788737298834798581HOEnZb"><div class="m_-212787898175025196m_8788737298834798581h5">On 10/25/2017 01:53 PM, Ashish Kurian wrote:<br>
> Dear Users/Developers,<br>
><br>
> I am using a KVM Ubuntu VM as a degrader to apply specific delays to<br>
> incoming packets. As the delay for my packets can be higher than 7.5<br>
> seconds, there is not enough buffer on my interface to buffer all the<br>
> packets. Therefore those overflowing packets are dropped in the machine and<br>
> not forwarded.<br>
><br>
> When I tried to use the command  ethtool -G ens8 rx 512 to increase the<br>
> buffer size, I get the following error.<br>
><br>
> Cannot set device ring parameters: Operation not permitted<br>
><br>
> I have kept the VM xml files as specified in the link :<br>
> <a href="https://libvirt.org/formatdomain.html" rel="noreferrer" target="_blank">https://libvirt.org/formatdoma<wbr>in.html</a>. The value that I kept in my xml file<br>
> is as follows.<br>
><br>
> <interface type='direct'><br>
>       <mac address='52:54:00:72:f9:eb'/><br>
>       <source dev='enp7s0f0' mode='vepa'/><br>
>       <model type='virtio'/><br>
>       <driver name='vhost' queues='5' rx_queue_size='512'<br>
> tx_queue_size='512'><br>
>       <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off'<br>
> mrg_rxbuf='off'/><br>
>       <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/><br>
>       </driver><br>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'<br>
> function='0x0'/><br>
>     </interface><br>
>     <interface type='direct'><br>
>       <mac address='52:54:00:00:b5:99'/><br>
>       <source dev='enp7s0f1' mode='vepa'/><br>
>       <model type='virtio'/><br>
>       <driver name='vhost' queues='5' rx_queue_size='512'<br>
> tx_queue_size='512'><br>
>       <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off'<br>
> mrg_rxbuf='off'/><br>
>       <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/><br>
>       </driver><br>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'<br>
> function='0x0'/><br>
<br>
</div></div>So what does the qemu command line look like? You can find it in either<br>
libvirtd log or domain log.<br>
<br>
<a href="http://wiki.libvirt.org/page/DebugLogs" rel="noreferrer" target="_blank">http://wiki.libvirt.org/page/D<wbr>ebugLogs</a><br>
<span class="m_-212787898175025196m_8788737298834798581HOEnZb"><font color="#888888"><br>
Michal<br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
libvirt-users mailing list<br>
<a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvirt-users" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/libvirt-users</a><br></blockquote></div><br></div>