127. vhost PMD Xstats Tests restart test plan¶
127.1. Description¶
This test plan will cover the basic vhost pmd xstats test with each path of split ring and packed ring, includes split virtqueue in-order mergeable, in-order non-mergeable, mergeable, non-mergeable, vector_rx path test and packed virtqueue in-order mergeable, in-order non-mergeable, mergeable, non-mergeable path, also cover a stability case. Note IXIA or Scapy packes includes 4 CRC bytes and vhost side will remove the CRC when receive packests.
127.2. Test flow¶
TG –> NIC –> Vhost –> Virtio–> Vhost –> NIC –> TG
127.3. Test Case 1: xstats test with packed ring mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,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
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
4. On host run “show port xstats 1”, and check the statistic type and number is correct. For example: send 1000 packets with 1028B size(includes 4 CRC bytes), the statistic number of tx_size_1024_to_1522_packets and rx_size_1024_to_1522_packets should both 1000.
- Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
6. On host run “show port xstats 1”, and check the statistic type and number is correct. For example: send 1000 packets with ucast type, the number of tx_unicast_packets and rx_unicast_packets should both 1000.
127.4. Test Case 2: xstats test with packed ring non-mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,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
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
127.5. Test Case 3: xstats stability test with split ring inorder mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,queues=2,in_order=1,mrg_rxbuf=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
7.Send packets for 10 minutes with low speed, check the statistic type and number is correct.
127.6. Test Case 4: xstats test with split ring inorder non-mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,queues=2,in_order=1,mrg_rxbuf=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
127.7. Test Case 5: xstats test with split ring mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,queues=2,in_order=0,mrg_rxbuf=1 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
127.8. Test Case 6: xstats test with split ring non-mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,queues=2,in_order=0,mrg_rxbuf=0 \ -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
127.9. Test Case 7: xstats test with split ring vector_rx path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,queues=2,in_order=0,mrg_rxbuf=0 \ -- -i --tx-offloads=0x0 --rss-ip --nb-cores=2 --rxq=2 --txq=2 >set fwd mac >start
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
127.10. Test Case 8: xstats test with packed ring inorder mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,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
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.
7.Send packets for 10 minutes with low speed, check the statistic type and number is correct.
127.11. Test Case 9: xstats test with packed ring inorder non-mergeable path¶
Bind one port to vfio-pci, then launch vhost by below command:
rm -rf vhost-net* ./testpmd -n 4 -l 2-4 --socket-mem 1024,1024 --legacy-mem \ --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,client=0' -- -i --nb-cores=2 --rxq=2 --txq=2 testpmd>set fwd mac testpmd>start
Launch virtio-user by below command:
./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,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
Let TG generate send 10000 packets for each packet sizes(64,128,255, 512, 1024, 1523).
On host run “show port xstats 1”, and check the statistic type and number is correct.
Let TG generate send 10000 packets for each different types (broadcast, multicast, ucast).
On host run “show port xstats 1”, and check the statistic type and number is correct.