> my steps at host: > 1. enabling VHOST defines and building x86_64-native-linuxapp-gcc. > > 2. both interfaces are bind like: > 0000:04:00.0 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=ixgbe > 0000:04:00.1 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=ixgbe > > 3. then making the project examples/vhost and executing: > ./build/vhost-switch -c 0x03 -n 4 --socket-mem 1024 --file-prefix p1 -- > -p 1 --vm2vm 0 --socket-file /tmp/sock1 --client -P > ./build/vhost-switch -c 0x30 -n 4 --socket-mem 1024 --file-prefix p2 -- > -p 2 --vm2vm 0 --socket-file /tmp/sock2 --client -P > > 4. creating the guest > qemu- system-x86_64 -chardev socket,id=char1,path=/tmp/sock1,server > -netdev type=vhost-user,id=hostnet1,chardev=char1,queues=2 -device > virtio-net-pci,mq=on,vectors=2,netdev=hostnet1,id=net1,mac=00:00:00:00:00:01 > -chardev socket,id=char2,path=/tmp/sock2,server -netdev > type=vhost-user,id=hostnet2,chardev=char2,queues=2 -device > virtio-net-pci,mq=on,vectors=2,netdev=hostnet2,id=net2,mac=00:00:00:00:00:02 > -object > memory-backend-file,id=mem2,size=2048M,mem-path=/run/hugepages,share=on ... > > my steps on the guest: > 1. enabling VHOST defines and building x86_64-native-linuxapp-gcc. > > 2. successfully setting up environment: > modprobe uio_pci_generic > ./tools/dpdk-devbind.py -b uio_pci_generic 0000:00:07.0 > ./tools/dpdk-devbind.py -b uio_pci_generic 0000:00:08.0 > ./examples/l3fwd/build/l3fwd -c 0x3 -n 3 -- --parse-ptype -p 0x3 -P -L > --config="(0,0,0),(0,1,1),(1,0,0),(1,1,1)" --no-numa
(gdb) set args -l 0-3 -n 4 --socket-mem 1024 -- --socket-file /tmp/sock0 --client -p 0x1 (gdb) r Starting program: /data1/dpdk-19.11/examples/vhost/build/app/vhost-switch -l 0-3 -n 4 --socket-mem 1024 -- --socket-file /tmp/sock0 --client -p 0x1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes [New Thread 0xffffbe43d910 (LWP 52584)] EAL: Multi-process socket /var/run/dpdk/rte/mp_socket [New Thread 0xffffbdc2d910 (LWP 52585)] EAL: Selected IOVA mode 'VA' EAL: No available hugepages reported in hugepages-2048kB EAL: Probing VFIO support... EAL: VFIO support initialized [New Thread 0xffffbd40d910 (LWP 52586)] [New Thread 0xffffbcbfd910 (LWP 52587)] [New Thread 0xffffbc3ed910 (LWP 52588)] EAL: PCI device 0000:05:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic EAL: using IOMMU type 1 (Type 1) net_hinic: Initializing pf hinic-0000:05:00.0 in primary process net_hinic: Hwif is not ready net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0 net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0 net_hinic: Create nic device failed, dev_name: 0000:05:00.0 net_hinic: Initialize 0000:05:00.0 in primary failed EAL: Releasing pci mapped resource for 0000:05:00.0 EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300000000 EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300030000 EAL: Requested device 0000:05:00.0 cannot be used EAL: PCI device 0000:06:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic EAL: using IOMMU type 1 (Type 1) net_hinic: Initializing pf hinic-0000:06:00.0 in primary process net_hinic: Hwif is not ready net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0 net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0 net_hinic: Create nic device failed, dev_name: 0000:06:00.0 net_hinic: Initialize 0000:06:00.0 in primary failed EAL: Releasing pci mapped resource for 0000:06:00.0 EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300130000 EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300160000 EAL: Requested device 0000:06:00.0 cannot be used EAL: PCI device 0000:7d:00.0 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.1 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 EAL: PCI device 0000:7d:00.2 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.3 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 VHOST_PORT: Specified port number(1) exceeds total system port number(0) VHOST_DATA: Procesing on Core 1 started Breakpoint 1, rte_vhost_driver_register (path=0x10c5550 "/tmp/sock0", flags=