Anthony Liguori writes:
 > On 04/20/2011 10:33 PM, Jason Wang wrote:
 > > Krishna Kumar2 writes:
 > >   >  Thanks Jason!
 > >   >
 > >   >  So I can use my virtio-net guest driver and test with this patch?
 > >   >  Please provide the script you use to start MQ guest.
 > >   >
 > >
 > > Yes and thanks. Following is a simple script may help you start macvtap mq
 > > guest.
 > >
 > > qemu_path=./qemu-system-x86_64
 > > img_path=/home/kvm_autotest_root/images/mq.qcow2
 > > vtap_dev=/dev/tap104
 > > mac=96:88:12:1C:27:83
 > > smp=2
 > > mq=4
 > >
 > > for i in `seq $mq`
 > > do
 > >      vtap+=" -netdev tap,id=hn$i,fd=$((i+100)) $((i+100))<>$vtap_dev"
 > 
 > So you are basically dup()'ing the tap device.
 > 
 > Does this actually improve performance at all?
 > 

The script maybe not clear. It works only for macvtap (tap does not have
multiqueue support and I plan to add it). A macvtap device needs to be created
first by ip command.

The multiqueue was achieved by opening the macvtap device many times. Each time
 the user open to macvtap device, a new queue (sock) was created. Then macvtap
 device then can forward the packets to different sock/fd based on their RX
 queue of physical nics. So the fd could be used to registered as a backend for
 vhost/qemu.

Performance improvement is expected when using smp guest with mq virtio-net and
mq nic.

 > Regards,
 > 
 > Anthony Liguori
 > 


-- 
Jason Wang

Reply via email to