test suite reviews and discussions
 help / color / mirror / Atom feed
From: Yinan <yinan.wang@intel.com>
To: dts@dpdk.org
Cc: Wang Yinan <yinan.wang@intel.com>
Subject: [dts] [PATCH 06/11 v1] test_plans: add packed ring test cases for vhost_event_idx_interrupt
Date: Fri, 28 Feb 2020 06:09:42 +0000	[thread overview]
Message-ID: <20200228060947.26001-7-yinan.wang@intel.com> (raw)
In-Reply-To: <20200228060947.26001-1-yinan.wang@intel.com>

From: Wang Yinan <yinan.wang@intel.com>

Signed-off-by: Wang Yinan <yinan.wang@intel.com>
---
 .../vhost_event_idx_interrupt_test_plan.rst   | 182 +++++++++++++++++-
 1 file changed, 175 insertions(+), 7 deletions(-)

diff --git a/test_plans/vhost_event_idx_interrupt_test_plan.rst b/test_plans/vhost_event_idx_interrupt_test_plan.rst
index e785755..28f079d 100644
--- a/test_plans/vhost_event_idx_interrupt_test_plan.rst
+++ b/test_plans/vhost_event_idx_interrupt_test_plan.rst
@@ -37,15 +37,18 @@ vhost event idx interrupt mode test plan
 Description
 ===========
 
-Vhost event idx interrupt need test with l3fwd-power sample, send small packets from virtio-net to vhost side,check vhost-user cores can be wakeup status,and vhost-user cores should be sleep status after stop sending packets from virtio side.
+Vhost event idx interrupt need test with l3fwd-power sample, send small packets
+from virtio-net to vhost side,check vhost-user cores can be wakeup status,and
+vhost-user cores should be sleep status after stop sending packets from virtio
+side.For packed virtqueue test, need using qemu version > 4.2.0.
 
 Test flow
 =========
 
 Virtio-net --> Vhost-user
 
-Test Case 1: wake up vhost-user core with event idx interrupt mode
-==================================================================
+Test Case 1: wake up split ring vhost-user core with event idx interrupt mode
+=============================================================================
 
 1. Launch l3fwd-power example app with client mode::
 
@@ -86,8 +89,8 @@ Test Case 1: wake up vhost-user core with event idx interrupt mode
 
 5. Check vhost related core is waked up by reading l3fwd-power log.
 
-Test Case 2: wake up vhost-user cores with event idx interrupt mode 16 queues test
-==================================================================================
+Test Case 2: wake up split ring vhost-user cores with event idx interrupt mode 16 queues test
+=============================================================================================
 
 1. Launch l3fwd-power example app with client mode::
 
@@ -150,8 +153,8 @@ Test Case 2: wake up vhost-user cores with event idx interrupt mode 16 queues te
     ...
     L3FWD_POWER: lcore 15 is waked up from rx interrupt on port 0 queue 15
 
-Test Case 3: wake up vhost-user cores by multi virtio-net in VMs with event idx interrupt mode
-==============================================================================================
+Test Case 3: wake up split ring vhost-user cores by multi virtio-net in VMs with event idx interrupt mode
+=========================================================================================================
 
 1. Launch l3fwd-power example app with client mode::
 
@@ -208,3 +211,168 @@ Test Case 3: wake up vhost-user cores by multi virtio-net in VMs with event idx
     #send packets to vhost
 
 6. Check vhost related cores are waked up with l3fwd-power log.
+
+Test Case 4: wake up packed ring vhost-user core with event idx interrupt mode
+==============================================================================
+
+1. Launch l3fwd-power example app with client mode::
+
+    ./l3fwd-power -l 1 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \
+    -- -p 0x1 \
+    --parse-ptype 1 \
+    --config "(0,0,1)"
+
+2. Launch VM1 with server mode::
+
+     taskset -c 33 \
+     qemu-system-x86_64 -name us-vhost-vm1 \
+     -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6001-:22 \
+     -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img  \
+     -chardev socket,server,id=char0,path=/vhost-net0 \
+     -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
+     -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,packed=on -vnc :10 -daemonize
+
+3. Relauch l3fwd-power sample for port up::
+
+    ./l3fwd-power -l 0-3 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \
+    -- -p 0x1 \
+    --parse-ptype 1 \
+    --config "(0,0,1)"
+
+4. On VM, set ip for virtio device and send packets to vhost by cmds::
+
+    ifconfig [ens3] 1.1.1.2
+    #[ens3] is the virtual device name
+    ping 1.1.1.3
+    #send packets to vhost
+
+5. Check vhost related core is waked up by reading l3fwd-power log.
+
+Test Case 5: wake up packed ring vhost-user cores with event idx interrupt mode 16 queues test
+==============================================================================================
+
+1. Launch l3fwd-power example app with client mode::
+
+    ./l3fwd-power -l 1-16 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \
+    -- -p 0x1 \
+    --parse-ptype 1 \
+    --config "(0,0,1),(0,1,2),(0,2,3),(0,3,4),(0,4,5),(0,5,6),(0,6,7),(0,7,8),(0,8,9),(0,9,10),(0,10,11),(0,11,12),(0,12,13),(0,13,14),(0,14,15),(0,15,16)"
+
+2. Launch VM1 with server mode::
+
+     taskset -c 17-18 \
+     qemu-system-x86_64 -name us-vhost-vm1 \
+     -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6001-:22 \
+     -smp cores=16,sockets=1 -drive file=/home/osimg/ubuntu16.img  \
+     -chardev socket,server,id=char0,path=/vhost-net0 \
+     -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce,queues=16 \
+     -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,mq=on,packed=on,vectors=40 -vnc :10 -daemonize
+
+3. Relauch l3fwd-power sample for port up::
+
+    ./l3fwd-power -l 1-16 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=16,client=1' \
+    -- -p 0x1 \
+    --parse-ptype 1 \
+    --config "(0,0,1),(0,1,2),(0,2,3),(0,3,4),(0,4,5),(0,5,6),(0,6,7),(0,7,8),(0,8,9),(0,9,10),(0,10,11),(0,11,12),(0,12,13),(0,13,14),(0,14,15),(0,15,16)"
+
+4. Set vitio-net with 16 quques and give vitio-net ip address::
+
+    ethtool -L [ens3] combined 16    # [ens3] is the name of virtio-net
+    ifconfig [ens3] 1.1.1.1
+
+5. Send packets with different IPs from virtio-net, notice to bind each vcpu to different send packets process::
+
+    taskset -c 0 ping 1.1.1.2
+    taskset -c 1 ping 1.1.1.3
+    taskset -c 2 ping 1.1.1.4
+    taskset -c 3 ping 1.1.1.5
+    taskset -c 4 ping 1.1.1.6
+    taskset -c 5 ping 1.1.1.7
+    taskset -c 6 ping 1.1.1.8
+    taskset -c 7 ping 1.1.1.9
+    taskset -c 8 ping 1.1.1.2
+    taskset -c 9 ping 1.1.1.2
+    taskset -c 10 ping 1.1.1.2
+    taskset -c 11 ping 1.1.1.2
+    taskset -c 12 ping 1.1.1.2
+    taskset -c 13 ping 1.1.1.2
+    taskset -c 14 ping 1.1.1.2
+    taskset -c 15 ping 1.1.1.2
+
+6. Check vhost related cores are waked up with l3fwd-power log, such as following::
+
+    L3FWD_POWER: lcore 0 is waked up from rx interrupt on port 0 queue 0
+    ...
+    ...
+    L3FWD_POWER: lcore 15 is waked up from rx interrupt on port 0 queue 15
+
+Test Case 6: wake up packed ring vhost-user cores by multi virtio-net in VMs with event idx interrupt mode
+==========================================================================================================
+
+1. Launch l3fwd-power example app with client mode::
+
+    ./l3fwd-power -l 1-2 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \
+    --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \
+    -- -p 0x3 \
+    --parse-ptype 1 \
+    --config "(0,0,1),(1,0,2)"
+
+2. Launch VM1 and VM2 with server mode::
+
+     taskset -c 33 \
+     qemu-system-x86_64 -name us-vhost-vm1 \
+     -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6001-:22 \
+     -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16.img  \
+     -chardev socket,server,id=char0,path=/vhost-net0 \
+     -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
+     -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,csum=on,packed=on -vnc :10 -daemonize
+
+     taskset -c 34 \
+     qemu-system-x86_64 -name us-vhost-vm2 \
+     -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net nic,vlan=2,macaddr=00:00:00:08:e8:aa,addr=1f -net user,vlan=2,hostfwd=tcp:127.0.0.1:6002-:22 \
+     -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu16-2.img  \
+     -chardev socket,server,id=char0,path=/vhost-net1 \
+     -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
+     -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,csum=on,packed=on -vnc :11 -daemonize
+
+3. Relauch l3fwd-power sample for port up::
+
+    ./l3fwd-power -l 0-3 \
+    -n 4 --socket-mem 1024,1024 --legacy-mem --no-pci\
+    --log-level=9 \
+    --vdev 'eth_vhost0,iface=/vhost-net0,queues=1,client=1' \
+    --vdev 'eth_vhost1,iface=/vhost-net1,queues=1,client=1' \
+    -- -p 0x3 \
+    --parse-ptype 1 \
+    --config "(0,0,1),(1,0,2)"
+
+4. On VM1, set ip for virtio device and send packets to vhost::
+
+    ifconfig [ens3] 1.1.1.2
+    #[ens3] is the virtual device name
+    ping 1.1.1.3
+    #send packets to vhost
+
+5. On VM2, also set ip for virtio device and send packets to vhost::
+
+    ifconfig [ens3] 1.1.1.4
+    #[ens3] is the virtual device name
+    ping 1.1.1.5
+    #send packets to vhost
+
+6. Check vhost related cores are waked up with l3fwd-power log.
-- 
2.17.1


  parent reply	other threads:[~2020-02-28 13:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  6:09 [dts] [PATCH 00/11 v1] test_plans: add packed ring cases Yinan
2020-02-28  6:09 ` [dts] [PATCH 01/11 v1] test_plans: add packed ring cases for loopback_multi_paths_port_restart Yinan
2020-02-28  6:09 ` [dts] [PATCH 02/11 v1] test_plans: add packed ring cases for loopback_multi_queues Yinan
2020-02-28  6:09 ` [dts] [PATCH 03/11 v1] test_plans: add packed ring test case for pvp_virtio_user_2M_hugepages Yinan
2020-02-28  6:09 ` [dts] [PATCH 04/11 v1] test_plans: add packed ring cases for pvp_virtio_user_4k_pages Yinan
2020-02-28  6:09 ` [dts] [PATCH 05/11 v1] test_plans: add packed ring test case for vhost_enqueue_interrupt Yinan
2020-02-28  6:09 ` Yinan [this message]
2020-02-28  6:09 ` [dts] [PATCH 07/11 v1] test_plans: add packed ring test cases for vhost_user_live_migration Yinan
2020-02-28  6:09 ` [dts] [PATCH 08/11 v1] test_plans: add packed ring test cases for vhost_virtio_pmd_interrupt Yinan
2020-02-28  6:09 ` [dts] [PATCH 09/11 v1] test_plans: add packed ring test cases for vhost_virtio_user_interrupt Yinan
2020-02-28  6:09 ` [dts] [PATCH 10/11 v1] test_plans: add test cases for virtio_event_idx_interrupt Yinan
2020-02-28  6:09 ` [dts] [PATCH 11/11 v1] test_plans: add packed ring test cases for virtio_pvp_regression Yinan
2020-03-03  7:28 ` [dts] [PATCH 00/11 v1] test_plans: add packed ring cases Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228060947.26001-7-yinan.wang@intel.com \
    --to=yinan.wang@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).