From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 41AC7A05D3 for ; Mon, 22 Apr 2019 08:26:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3717F1B49F; Mon, 22 Apr 2019 08:26:20 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1638C1B49E for ; Mon, 22 Apr 2019 08:26:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2019 23:26:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,380,1549958400"; d="scan'208";a="293466713" Received: from npg-dpdk-project-yinanwang-1.sh.intel.com ([10.67.110.176]) by orsmga004.jf.intel.com with ESMTP; 21 Apr 2019 23:26:17 -0700 From: Yinan To: dts@dpdk.org Cc: Wang Yinan Date: Sun, 21 Apr 2019 23:23:53 +0000 Message-Id: <20190421232353.57075-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v2] test_plans/vhost_virtio_user_interrupt: add test plan for vhost/virtio-user test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Wang Yinan Signed-off-by: Wang Yinan --- .../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