50. vhost/virtio-user loopback server mode test plan¶
Virtio-user server mode is a feature to enable virtio-user as the server, vhost as the client, thus after vhost-user is killed then relaunched, virtio-user can reconnect back to vhost-user again; at another hand, virtio-user also can reconnect back to vhost-user after virtio-user is killed. This feature test need cover different rx/tx paths with virtio 1.0 and virtio 1.1, includes split ring mergeable, non-mergeable, inorder mergeable, inorder non-mergeable, vector_rx path and packed ring mergeable, non-mergeable, inorder non-mergeable, inorder mergeable path.
50.1. Test Case 1: Basic test for packed ring server mode¶
Launch virtio-user as server mode:
./testpmd -l 1-2 -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/sock0,server=1,queues=1,packed_vq=1 -- -i --rxq=1 --txq=1 --no-numa >set fwd mac >start
Launch vhost as client mode:
./testpmd -l 3-4 -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'net_vhost0,iface=/tmp/sock0,client=1,queues=1' -- -i --rxq=1 --txq=1 --nb-cores=1 >set fwd mac >start tx_first 32
Run below command to get throughput,verify the loopback throughput is not zero:
testpmd>show port stats all
50.2. Test Case 2: Basic test for split ring server mode¶
Launch virtio-user as server mode:
./testpmd -l 1-2 -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/sock0,server=1,queues=1 -- -i --rxq=1 --txq=1 --no-numa >set fwd mac >start
Launch vhost as client mode:
./testpmd -l 3-4 -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'net_vhost0,iface=/tmp/sock0,client=1,queues=1' -- -i --rxq=1 --txq=1 --nb-cores=1 >set fwd mac >start tx_first 32
Run below command to get throughput,verify the loopback throughput is not zero:
testpmd>show port stats all
50.3. Test Case 3: loopback reconnect test with split ring mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=1,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=1,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.4. Test Case 4: loopback reconnect test with split ring inorder mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=1,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=1,in_order=1\ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.5. Test Case 5: loopback reconnect test with split ring inorder non-mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.6. Test Case 6: loopback reconnect test with split ring non-mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.7. Test Case 7: loopback reconnect test with split ring vector_rx path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=0 \ -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,mrg_rxbuf=0,in_order=0 \ -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.8. Test Case 8: loopback reconnect test with packed ring mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.9. Test Case 9: loopback reconnect test with packed ring non-mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.10. Test Case 10: loopback reconnect test with packed ring inorder mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=1,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
50.11. Test Case 11: loopback reconnect test with packed ring inorder non-mergeable path and server mode¶
launch vhost as client mode with 2 queues:
rm -rf vhost-net* ./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Launch virtio-user as server mode with 2 queues:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Quit vhost side testpmd, check the virtio-user side link status:
testpmd> show port info 0 #it should show "down"
Relaunch vhost and send packets:
./testpmd -c 0xe -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=vhost \ --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=2' -- -i --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the virtio-user side link status and run below command to get throughput,verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop
Quit virtio-user side testpmd, check the vhost side link status:
testpmd> show port info 0 #it should show "down"
Relaunch virtio-user and send packets:
./testpmd -n 4 -l 5-7 --socket-mem 1024,1024 --legacy-mem --no-pci --file-prefix=virtio \ --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=2,packed_vq=1,mrg_rxbuf=0,in_order=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start tx_first 32
Check the vhost side link status and run below command to get throughput, verify the loopback throughput is not zero:
testpmd> show port info 0 #it should show up" testpmd>show port stats all
Port restart at vhost side by below command and re-calculate the average throughput:
testpmd>stop testpmd>port stop 0 testpmd>port start 0 testpmd>start tx_first 32 testpmd>show port stats all
Check each RX/TX queue has packets:
testpmd>stop