Public bug reported:

Binding 2nd VM to same OVS vhost-user port caused 1st vm traffic broken.
If it illegal to share same vhost port, how about the first VM open the
path exclusively?

#OVS side to create the vhost-user port:
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
ovs-vsctl add-port br0 phy0 -- set Interface phy0 type=dpdk 
options:dpdk-devargs=0000:0a:00.0
ovs-vsctl add-port br0 dpdkvhostuser0 -- set Interface dpdkvhostuser0 
type=dpdkvhostuser

#QEMU VM1
qemu-system-x86_64 -name vm1 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu1.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off

#VM2
qemu-system-x86_64 -name vm2 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu2.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off

** Affects: qemu
     Importance: Undecided
         Status: New

** Description changed:

  Binding 2nd VM to same OVS vhost-user port caused 1st vm traffic broken.
  If it illegal to share same vhost port, how about the first VM open the
  path exclusively?
- 
  
  #OVS side to create the vhost-user port:
  ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
  ovs-vsctl add-port br0 phy0 -- set Interface phy0 type=dpdk 
options:dpdk-devargs=0000:0a:00.0
  ovs-vsctl add-port br0 dpdkvhostuser0 -- set Interface dpdkvhostuser0 
type=dpdkvhostuser
  
  #QEMU VM1
- qemu-system-x86_64 -name vm1 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu1.qcow2  \
-   -numa node,memdev=mem -mem-prealloc -smp sockets=1,cores=2 \
-   -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on \
-   -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 
\  -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
-   -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off
+ qemu-system-x86_64 -name vm1 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu1.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off
  
  #VM2
- qemu-system-x86_64 -name vm2 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu2.qcow2  \
-   -numa node,memdev=mem -mem-prealloc -smp sockets=1,cores=2 \
-   -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on \
-   -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 
\  -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
-   -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off
+ qemu-system-x86_64 -name vm2 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu2.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1687599

Title:
  Bind 2nd VM to same OVS vhost-user port caused 1st vm traffic broken

Status in QEMU:
  New

Bug description:
  Binding 2nd VM to same OVS vhost-user port caused 1st vm traffic
  broken. If it illegal to share same vhost port, how about the first VM
  open the path exclusively?

  #OVS side to create the vhost-user port:
  ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
  ovs-vsctl add-port br0 phy0 -- set Interface phy0 type=dpdk 
options:dpdk-devargs=0000:0a:00.0
  ovs-vsctl add-port br0 dpdkvhostuser0 -- set Interface dpdkvhostuser0 
type=dpdkvhostuser

  #QEMU VM1
  qemu-system-x86_64 -name vm1 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu1.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off

  #VM2
  qemu-system-x86_64 -name vm2 -cpu host -enable-kvm -m 3072 -drive 
file=/opt/ubuntu2.qcow2 -numa node,memdev=mem -mem-prealloc -smp 
sockets=1,cores=2 -object 
memory-backend-file,id=mem,size=3072m,mem-path=/dev/hugepages,share=on -chardev 
socket,id=char0,path=/usr/local/var/run/openvswitch/dpdkvhostuser0 -netdev 
type=vhost-user,id=mynet1,chardev=char0,vhostforce -device 
virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=off

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1687599/+subscriptions

Reply via email to