204. vhost/virtio-user pvp with 2M hugepage test plan

204.1. Description

Before 18.05, virtio-user can only work 1G hugepage. After 18.05, more hugepage pages can be represented by single fd (file descriptor)file, so virtio-user can work with 2M hugepage now. The key parameter is “–single-file-segments” when launch virtio-user.

204.2. Test Case1: Basic test for virtio-user split ring 2M hugepage

  1. Before the test, plese make sure only 2M hugepage are mounted in host.

  2. Bind one port to igb_uio, launch vhost:

    ./testpmd -l 3-4 -n 4 --file-prefix=vhost \
    --vdev 'net_vhost0,iface=/tmp/sock0,queues=1' -- -i
    
  3. Launch virtio-user with 2M hugepage:

    ./testpmd -l 5-6 -n 4  --no-pci --single-file-segments --file-prefix=virtio-user \
    --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/sock0,queues=1 -- -i
    
  1. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:

    testpmd>show port stats all
    

204.3. Test Case1: Basic test for virtio-user packed ring 2M hugepage

  1. Before the test, plese make sure only 2M hugepage are mounted in host.

  2. Bind one port to igb_uio, launch vhost:

    ./testpmd -l 3-4 -n 4 --file-prefix=vhost \
    --vdev 'net_vhost0,iface=/tmp/sock0,queues=1' -- -i
    
  3. Launch virtio-user with 2M hugepage:

    ./testpmd -l 5-6 -n 4  --no-pci --single-file-segments --file-prefix=virtio-user \
    --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/sock0,packed_vq=1,queues=1 -- -i
    
  1. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:

    testpmd>show port stats all