From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 977031B341 for ; Mon, 12 Feb 2018 10:58:28 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 169851650; Mon, 12 Feb 2018 01:58:28 -0800 (PST) Received: from lenovo-a010984.shanghai.arm.com (lenovo-a010984.shanghai.arm.com [10.169.40.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9F18D3F41F; Mon, 12 Feb 2018 01:58:27 -0800 (PST) From: Herbert Guan To: dts@dpdk.org Cc: Herbert Guan Date: Mon, 12 Feb 2018 17:57:39 +0800 Message-Id: <1518429462-30299-7-git-send-email-herbert.guan@arm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518429462-30299-1-git-send-email-herbert.guan@arm.com> References: <1518157565-17167-1-git-send-email-herbert.guan@arm.com> <1518429462-30299-1-git-send-email-herbert.guan@arm.com> Subject: [dts] [PATCH v2 6/9] tests/vf_rss: use virt_common for VM creation 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: , X-List-Received-Date: Mon, 12 Feb 2018 09:58:29 -0000 Use 'VM' form virt_common instead of 'QEMUKvm' from qemu_kvm for VM creation. This will allow VM type selection (kvm/libvirt etc.) for each VM defined in test suite's config file. Signed-off-by: Herbert Guan --- conf/vf_rss.cfg | 88 +++-------------------------------------------- tests/TestSuite_vf_rss.py | 4 +-- 2 files changed, 7 insertions(+), 85 deletions(-) diff --git a/conf/vf_rss.cfg b/conf/vf_rss.cfg index 8e6025f..1ef8656 100644 --- a/conf/vf_rss.cfg +++ b/conf/vf_rss.cfg @@ -1,87 +1,5 @@ -# QEMU options -# name -# name: vm0 -# -# enable_kvm -# enable: [yes | no] -# -# cpu -# model: [host | core2duo | ...] -# usage: -# choose model value from the command -# qemu-system-x86_64 -cpu help -# number: '4' #number of vcpus -# cpupin: '3 4 5 6' # host cpu list -# -# mem -# size: 1024 -# -# disk -# file: /path/to/image/test.img -# -# net -# type: [nic | user | tap | bridge | ...] -# nic -# opt_vlan: 0 -# note: Default is 0. -# opt_macaddr: 00:00:00:00:01:01 -# note: if creating a nic, it`s better to specify a MAC, -# else it will get a random number. -# opt_model:["e1000" | "virtio" | "i82551" | ...] -# note: Default is e1000. -# opt_name: 'nic1' -# opt_addr: '' -# note: PCI cards only. -# opt_vectors: -# note: This option currently only affects virtio cards. -# user -# opt_vlan: 0 -# note: default is 0. -# opt_hostfwd: [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport -# note: If not specified, it will be setted automatically. -# tap -# opt_vlan: 0 -# note: default is 0. -# opt_br: br0 -# note: if choosing tap, need to specify bridge name, -# else it will be br0. -# opt_script: QEMU_IFUP_PATH -# note: if not specified, default is self.QEMU_IFUP_PATH. -# opt_downscript: QEMU_IFDOWN_PATH -# note: if not specified, default is self.QEMU_IFDOWN_PATH. -# -# device -# driver: [pci-assign | virtio-net-pci | ...] -# pci-assign -# prop_host: 08:00.0 -# prop_addr: 00:00:00:00:01:02 -# virtio-net-pci -# prop_netdev: mynet1 -# prop_id: net1 -# prop_mac: 00:00:00:00:01:03 -# prop_bus: pci.0 -# prop_addr: 0x3 -# -# monitor -# port: 6061 -# note: if adding monitor to vm, need to specicy -# this port, else it will get a free port -# on the host machine. -# -# serial_port -# enable: [yes | no] -# -# vnc -# displayNum: 1 -# note: you can choose a number not used on the host. -# -# daemon -# enable: 'yes' -# note: -# By default VM will start with the daemonize status. -# Not support starting it on the stdin now. +# Configuration sample: sriov_kvm.cfg -# vm configuration for pmd sriov case [vm0] cpu = model=host,number=8,cpupin=5 6 7 8 9 10 11 12 ; @@ -89,12 +7,16 @@ disk = file=/home/image/fedora23-ok.img; login = user=root,password=tester; +# net option is not necessary for libvirt, comment out below 2 lines if using libvirt net = type=nic,opt_vlan=0; type=user,opt_vlan=0; +# monitor option is not supported by libvirt yet, comment out below 2 lines if using libvirt monitor = port=; +# vnc option is not supported by libvirt yet, comment out below 2 lines if using libvirt vnc = displayNum=1; +# daemon option is not supported by libvirt yet, comment out below 2 lines if using libvirt daemon = enable=yes; diff --git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py index 33591b5..f2730e7 100644 --- a/tests/TestSuite_vf_rss.py +++ b/tests/TestSuite_vf_rss.py @@ -44,7 +44,7 @@ reta_lines = [] # and collect the hash result of five tuple and the queue id. from test_case import TestCase from pmd_output import PmdOutput -from qemu_kvm import QEMUKvm +from virt_common import VM class TestVfRss(TestCase): @@ -262,7 +262,7 @@ class TestVfRss(TestCase): self.host_testpmd.start_testpmd("1S/2C/2T", eal_param=eal_param) # set up VM0 ENV - self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_rss') + self.vm0 = VM(self.dut, 'vm0', 'vf_rss') self.vm0.set_vm_device(driver=self.vf_assign_method, **vf0_prot) self.vm_dut_0 = self.vm0.start() -- 1.8.3.1