173. vhost PMD Xstats Tests restart test plan

173.1. Description

This test plan will cover the basic vhost pmd xstats test with with 10 tx/rx paths. Includes mergeable, non-mergeable, vectorized_rx, inorder mergeable, inorder non-mergeable, virtio 1.1 mergeable, virtio 1.1 non-mergeable,virtio 1.1 inorder mergeable, virtio 1.1 inorder non-mergeable, virtio1.1 vectorized path, also cover stability cases. Note IXIA or Scapy packes includes 4 CRC bytes and vhost side will remove the CRC when receive packests.

173.2. Test flow

TG –> NIC –> Vhost –> Virtio–> Vhost –> NIC –> TG

173.3. Test Case 1: xstats test with packed ring mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  1. 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.

173.4. Test Case 2: xstats test with packed ring non-mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  5. 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.

173.5. Test Case 3: xstats stability test with split ring inorder mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  5. 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.

7.Send packets for 10 minutes with low speed, check the statistic type and number is correct.

173.6. Test Case 4: xstats test with split ring inorder non-mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  5. 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.

173.7. Test Case 5: xstats test with split ring mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  5. 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.

173.8. Test Case 6: xstats test with split ring non-mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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,vectorized=1 \
    -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2
    >set fwd mac
    >start
    
  3. 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.

  5. 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.

173.9. Test Case 7: xstats test with split ring vector_rx path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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,vectorized=1 \
    -- -i --tx-offloads=0x0 --rss-ip --nb-cores=2 --rxq=2 --txq=2
    >set fwd mac
    >start
    
  3. 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.

  5. 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.

173.10. Test Case 8: xstats test with packed ring inorder mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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
    
  3. 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.

  5. 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.

7.Send packets for 10 minutes with low speed, check the statistic type and number is correct.

173.11. Test Case 9: xstats test with packed ring inorder non-mergeable path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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,vectorized=1 \
    -- -i --rx-offloads=0x10 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --rxq=2 --txq=2
    >set fwd mac
    >start
    
  3. 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.

  5. 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.

173.12. Test Case 10: xstats test with packed ring vectorized path

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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,vectorized=1 \
    -- -i --rss-ip --nb-cores=2 --rxq=2 --txq=2
    >set fwd mac
    >start
    
  3. 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.

  5. 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.

173.13. Test Case 11: xstats test with packed ring vectorized path with ring size is not power of 2

  1. Bind one port to vfio-pci, then launch vhost by below command:

    rm -rf vhost-net*
    ./testpmd -n 4 -l 2-4  \
    --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
    
  2. Launch virtio-user by below command:

    ./testpmd -n 4 -l 5-7 \
    --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,vectorized=1,queue_size=255 \
    -- -i --rss-ip --nb-cores=2 --rxq=2 --txq=2 --txd=255 --rxd=255
    >set fwd mac
    >start
    
  3. 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.

  5. 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.