[dts] [PATCH v2] test_plans/vhost_virtio_user_interrupt: add test plan for vhost/virtio-user test
Yinan
yinan.wang at intel.com
Mon Apr 22 01:23:53 CEST 2019
From: Wang Yinan <yinan.wang at intel.com>
Signed-off-by: Wang Yinan <yinan.wang at intel.com>
---
.../vhost_virtio_user_interrupt_test_plan.rst | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 test_plans/vhost_virtio_user_interrupt_test_plan.rst
diff --git a/test_plans/vhost_virtio_user_interrupt_test_plan.rst b/test_plans/vhost_virtio_user_interrupt_test_plan.rst
new file mode 100644
index 0000000..d948dc7
--- /dev/null
+++ b/test_plans/vhost_virtio_user_interrupt_test_plan.rst
@@ -0,0 +1,108 @@
+.. Copyright (c) <2019>, 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/virtio-user interrupt mode test plan
+==========================================
+
+Virtio-user interrupt need test with l3fwd-power sample, small packets send from traffic generator to virtio side, check virtio-user cores can be wakeup status, and virtio-user cores should be sleep status after stop sending packets from traffic generator.
+This test plan cover both vhost-net and vhost-user as the backend.
+
+Test Case1: Virtio-user interrupt test with vhost-user as backend
+=================================================================
+
+flow: TG --> NIC --> Vhost --> Virtio
+
+1. Bind one NIC port to igb_uio, launch testpmd with a virtual vhost device as backend::
+
+ ./testpmd -c 0x7c -n 4 --socket-mem 1024,1024 --legacy-mem --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --rxq=1 --txq=1
+ testpmd>start
+
+2. Start l3fwd-power with a virtio-user device::
+
+ ./l3fwd-power -c 0xc000 -n 4 --socket-mem 1024,1024 --log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd \
+ --vdev=virtio_user0,path=./vhost-net -- -p 1 -P --config="(0,0,14)" --parse-ptype
+
+3. Send packets with packet generator, check the virtio-user related core can be wakeup status.
+
+4. Stop sending packets with packet generator, check virtio-user related core change to sleep status.
+
+5. Restart sending packets with packet generator, check virtio-user related core change to wakeup status again.
+
+Test Case2: Virtio-user interrupt test with vhost-net as backend
+===============================================================================
+
+flow: Tap --> Vhost-net --> Virtio
+
+1. Start l3fwd-power with a virtio-user device, vhost-net as backend::
+
+ ./l3fwd-power -c 0xc000 -n 4 --socket-mem 1024,1024 --legacy-mem --log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd \
+ --vdev=virtio_user0,path=/dev/vhost-net -- -p 1 -P --config="(0,0,14)" --parse-ptype
+
+2. Vhost-net will generate one tap device, normally, it's TAP0, config it and generate packets on it using pind cmd::
+
+ ifconfig tap0 up
+ ifconfig tap0 1.1.1.1
+ ping -I tap0 1.1.1.2
+
+3. Check the virtio-user related core can be wake up.
+
+4. Stop sending packets with tap device, check virtio-user related core change to sleep status.
+
+5. Restart sending packets with tap device, check virtio-user related core change to wakeup status again.
+
+Test Case3: LSC event between vhost-user and virtio-user
+===============================================================================
+
+flow: Vhost <--> Virtio
+
+1. Start vhost-user side::
+
+ ./testpmd -c 0x3000 -n 4 --socket-mem 1024,1024 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' -- -i
+ testpmd>set fwd mac
+ testpmd>start
+
+2. Start virtio-user side::
+
+ ./testpmd -c 0xc000 -n 4 --socket-mem 1024,1024 --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net -- -i --tx-offloads=0x00
+ testpmd>set fwd mac
+ testpmd>start
+
+3. Check the virtio-user side link status::
+
+ testpmd> show port info 0
+ #it should show "up"
+
+4. Quit the vhost-user side with testpmd, then check the virtio-user side link status::
+
+ testpmd> show port info 0
+ #it should show "down"
--
2.17.1
More information about the dts
mailing list