> -----Original Message----- > From: discuss [mailto:discuss-boun...@openvswitch.org] On Behalf Of Ali > Volkan Atli > Sent: Thursday, December 3, 2015 7:39 AM > To: discuss@openvswitch.org > Subject: [ovs-discuss] DPDK vhost-user socket problem for QEMU > > Hi all > > I followed the INSTALL and INSTALL.DPDK docs but when I try to attach a vhost > port to QEMU VM, I'm getting the error: > > argela@argela-HP-Z800-Workstation:~$ sudo qemu-system-x86_64 -cpu host - > boot c -hda qemu_images/Fedora-Cloud-Base-23-20151030.x86_64.qcow2 -snapshot > -m 1024M -smp 2 --enable-kvm -vnc :1 -net user,hostfwd=tcp::10022-:22 -net > nic -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user-0 > -netdev type=vhost-user,id=mynet0,chardev=char0,vhostforce -device virtio- > net-pci,mac=00:00:00:00:00:01,netdev=mynet0 -chardev > socket,id=char1,path=/usr/local/var/run/openvswitch/vhost-user-1 -netdev > type=vhost-user,id=mynet1,chardev=char1,vhostforce -device virtio-net- > pci,mac=00:00:00:00:00:02,netdev=mynet1 -object memory-backend- > file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem > -mem-prealloc > qemu-system-x86_64: -chardev > socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user-0: Failed to > connect socket: Connection refused > > argela@argela-HP-Z800-Workstation:~$ ll > /usr/local/var/run/openvswitch/vhost-user* > srwxr-xr-x 1 root root 0 Ara 1 15:59 > /usr/local/var/run/openvswitch/vhost-user-0 > srwxr-xr-x 1 root root 0 Ara 1 15:59 > /usr/local/var/run/openvswitch/vhost-user-1 > > Actually I'm getting related errors for the vhost users while starting ovs- > vswitchd as follows > > argela@argela-HP-Z800-Workstation:~$ sudo ovs-vswitchd --dpdk -c 0x1 -n 4 > --socket-mem 1024,0 -- unix:$DB_SOCK --pidfile --detach > 2015-12-03T07:08:57Z|00001|dpdk|INFO|No -vhost_sock_dir provided - > defaulting to /usr/local/var/run/openvswitch > ... > VHOST_CONFIG: socket created, fd:48 > VHOST_CONFIG: fail to bind fd:48, remove > file:/usr/local/var/run/openvswitch/vhost-user-1 and try again.
Maybe the code you are using does not have the below commit? Try removing the file manually before re-running. commit e04f7e4f2f574500334326dbda1bb808cf25c721 Author: Ciara Loftus <ciara.lof...@intel.com> Date: Wed Oct 21 14:50:36 2015 +0100 netdev-dpdk: Clean-up after vHost User port delete Unregister and delete the socket associated with a vhost-user port when the port is deleted and/or the switch is brought down. Do not delete the socket if the vhost-user device is still attached to the guest. > 2015-12-03T07:09:15Z|00021|dpdk|ERR|vhost-user socket device setup > failure for socket /usr/local/var/run/openvswitch/vhost-user-1 > 2015-12-03T07:09:15Z|00022|dpdk|INFO|Socket > /usr/local/var/run/openvswitch/vhost-user-1 created for vhost-user port > vhost-user-1 > 2015-12-03T07:09:15Z|00003|dpif_netdev(pmd16)|INFO|Core 0 processing port > 'dpdk1' > 2015-12-03T07:09:15Z|00004|dpif_netdev(pmd16)|INFO|Core 0 processing port > 'vhost-user-1' > 2015-12-03T07:09:15Z|00023|bridge|INFO|bridge br0: added interface vhost- > user-1 on port 4 > VHOST_CONFIG: socket created, fd:48 > VHOST_CONFIG: fail to bind fd:48, remove > file:/usr/local/var/run/openvswitch/vhost-user-0 and try again. > 2015-12-03T07:09:15Z|00024|dpdk|ERR|vhost-user socket device setup > failure for socket /usr/local/var/run/openvswitch/vhost-user-0 > 2015-12-03T07:09:15Z|00025|dpdk|INFO|Socket > /usr/local/var/run/openvswitch/vhost-user-0 created for vhost-user port > vhost-user-0 > 2015-12-03T07:09:15Z|00005|dpif_netdev(pmd16)|INFO|Core 0 processing port > 'vhost-user-0' > 2015-12-03T07:09:15Z|00006|dpif_netdev(pmd16)|INFO|Core 0 processing port > 'dpdk1' > 2015-12-03T07:09:15Z|00007|dpif_netdev(pmd16)|INFO|Core 0 processing port > 'vhost-user-1' > 2015-12-03T07:09:15Z|00026|bridge|INFO|bridge br0: added interface vhost- > user-0 on port 3 > ... > > argela@argela-HP-Z800-Workstation:~$ sudo ovs-vsctl show > a0ba4b74-4412-45ba-a8ab-fea39afbf10f > Bridge "br0" > Port "vhost-user-1" > Interface "vhost-user-1" > type: dpdkvhostuser > Port "dpdk0" > Interface "dpdk0" > type: dpdk > Port "br0" > Interface "br0" > type: internal > Port "vhost-user-0" > Interface "vhost-user-0" > type: dpdkvhostuser > Port "dpdk1" > Interface "dpdk1" > type: dpdk > > > What am I doing wrong? Thanks in advance.. > > - Volkan > _______________________________________________ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss