[dts] [PATCH V1] Add test plan about vhost qemu mtu

lihong lihongx.ma at intel.com
Thu Mar 29 02:48:34 CEST 2018


Signed-off-by: lihong <lihongx.ma at intel.com>
---
 test_plans/vhost_qemu_mtu_test_plan.rst | 139 ++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)
 create mode 100644 test_plans/vhost_qemu_mtu_test_plan.rst

diff --git a/test_plans/vhost_qemu_mtu_test_plan.rst b/test_plans/vhost_qemu_mtu_test_plan.rst
new file mode 100644
index 0000000..26300b7
--- /dev/null
+++ b/test_plans/vhost_qemu_mtu_test_plan.rst
@@ -0,0 +1,139 @@
+.. Copyright (c) <2018>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===================
+Vhost TSO Test Plan
+===================
+
+The feature test the setting of MTU value of virtio-net and kernel driver.
+
+Prerequisites:
+==============
+
+The guests kernel should grand than 4.10
+The qemu version should greater or equal to 2.9
+
+Test Case: Test the MTU in virtio-net
+=====================================
+1. Launch the tetspmd by below commands on host::
+
+    ./testpmd -c 0xc -n 4 --socket-mem 2048,2048 \
+    --vdev 'net_vhost0,iface=vhost-net,queues=1' \
+    -- -i --txd=512 --rxd=128 --nb-cores=1 --port-topology=chained
+    testpmd> set fwd mac
+    testpmd> start
+
+2. Launch VM::
+
+    Use the qemu_2.9 or qemu 2.10 to start the VM and the VM kernel should
+    grand than 4.10, set the mtu value to 1472
+
+    taskset -c 4,5 qemu-system-x86_64  -name vm0 -enable-kvm \
+    -chardev socket,path=/tmp/vm0_qga0.sock,server,nowait,id=vm0_qga0 \
+    -device virtio-serial -device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 \
+    -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \
+    -chardev socket,id=char0,path=./vhost-net -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \
+    -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01,mrg_rxbuf=on,host_mtu=1472 \
+    -cpu host -smp 4 -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on \
+    -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu-ker-410.img -vnc :4
+
+3. Check the MTU value in VM::
+ 
+    Use the ifconfig command to check the MTU value of
+    virtio kernel driver is 1472 in VM.
+
+Test Case: Test the MTU in pmd
+==============================
+1. Continue use the VM in Test Case1, bind the kernel driver to igb_uio::
+
+2. Launch testpmd in VM::
+
+    ./testpmd -c 0x03 -n 3 \
+    -- -i --txd=512 --rxd=128 --tx-offloads=0x0 --enable-hw-vlan-strip
+    testpmd> set fwd mac
+    testpmd> start
+
+3. Run `show port info 0` in VM, and check the MTU value is equal to 1472.
+
+Test Case: Test the function about MTU
+======================================
+This case is to check if the testpmd can receive and forward the packet after
+change the mtu value. Send the IP packet and the packet size smaller than MTU
+value, equal to MTU value, greater than MTU value, check the testpmd can receive
+and forward all the packet.
+
+1. Continue use the VM in Test Case2.
+
+2. Send a IP packet with size 1470, samller than MTU value::
+    testpmd> clear port stats all
+    testpmd> show port stats 0
+
+    ######################## NIC statistics for port 0  #######################
+      RX-packets: 1          RX-missed: 0          RX-bytes:  1470
+      RX-errors: 0
+      RX-nombuf:  0
+      TX-packets: 1          TX-errors: 0          TX-bytes:  1470
+
+      Throughput (since last show)
+      Rx-pps:            0
+      Tx-pps:            0
+    ###########################################################################
+
+3. Send a IP packet with size 1472, equal to MTU value::
+    testpmd> clear port stats all
+    testpmd> show port stats 0
+
+    ######################## NIC statistics for port 0  #######################
+      RX-packets: 1          RX-missed: 0          RX-bytes:  1472
+      RX-errors: 0
+      RX-nombuf:  0
+      RX-packets: 1          TX-errors: 0          TX-bytes:  1472
+
+      Throughput (since last show)
+      Rx-pps:            0
+      Tx-pps:            0
+    ###########################################################################
+
+4. Send a IP packet with size 1500, greater than MTU value::
+    testpmd> clear port stats all
+    testpmd> show port stats 0
+
+    ######################## NIC statistics for port 0  #######################
+      RX-packets: 1          RX-missed: 0          RX-bytes:  1500
+      RX-errors: 0
+      RX-nombuf:  0
+      TX-packets: 1          TX-errors: 0          TX-bytes:  1500
+
+      Throughput (since last show)
+      Rx-pps:            0
+      Tx-pps:            0
+    ###########################################################################
-- 
2.7.4



More information about the dts mailing list