From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 44E752A61 for ; Thu, 17 Sep 2015 11:02:31 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 17 Sep 2015 02:02:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,545,1437462000"; d="scan'208";a="807112462" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 17 Sep 2015 02:02:17 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t8H92FkM007721; Thu, 17 Sep 2015 17:02:15 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t8H92Djv012705; Thu, 17 Sep 2015 17:02:15 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t8H92C9J012701; Thu, 17 Sep 2015 17:02:12 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 17 Sep 2015 17:02:09 +0800 Message-Id: <1442480531-12669-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH 1/3] Doc: Add DPDK Test Suite Virtualization Scenario introduction 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: Thu, 17 Sep 2015 09:02:32 -0000 From: Marvin Liu Scenario feature is used to create virtulization enviornment for one execution. This doc described that how to enable scenario and detail information of settings. Signed-off-by: Marvin Liu diff --git a/doc/dts_gsg/scenario.rst b/doc/dts_gsg/scenario.rst new file mode 100644 index 0000000..4ffe122 --- /dev/null +++ b/doc/dts_gsg/scenario.rst @@ -0,0 +1,152 @@ +Virtualization Scenario +======================= + +When enable virtualization scenario setting in execution cfg, DTS will load scenario configurations and prepare resource and devices for VMs. After VMs started, scenario module will prepare test suite running environment. After all suites finished, scenario module will stop VMs and then clean up the scene. + +Configuration File +------------------ + +With below configuration, DTS will create one scenario which created one VM with two VF devices attached. In scene section and according to configurations defined in suite. DUT object in suite will be VM DUT object, tester and DUT port network topology will be discovered automatically. Now DTS only support kvm typed hypervisor to create virtualization scenario. + + +.. code-block:: console + + # vm configuration for vf passthrough cases + # numa 0,1,yes yes mean cpu numa match the first port + # skipcores list mean those core will not be used by vm + # dut=vm_dut; mean vm_dut act as dut + # dut=dut; mean host dut act as dut + # portmap=cfg; mean vm_dut port map will be load from cfg + # portmap=auto; mean vm_dut will create portmap automatically + # devices = dev_gen/host/dev_gen+host not useful now + [scene] + suite = + dut=vm_dut,portmap=auto; + tester=tester; + type=kvm; + +Virtual machine "vm0" section configured cpu, memory, disk and device settings in VM. As below configurations, VM will not use the first four lcores on DUT. DTS will generate two VF devices from first two host PF devices. These two VF devices will be pass-through into guest and their pci address will be auto assigned by qemu. + +.. code-block:: console + + [vm0] + cpu = + model=host,number=4,numa=auto,skipcores=0 1 2 3; + mem = + size=2048,hugepage=no; + disk = + file=/storage/vm-image/vm0.img; + dev_gen = + pf_idx=0,vf_num=1,driver=default; + pf_idx=1,vf_num=1,driver=default; + device = + vf_idx=0,pf_dev=0,guestpci=auto; + vf_idx=0,pf_dev=1,guestpci=auto; + vnc = + displayNum=1; + +All suites will be run in scenario like below picture. + +.. figure:: image/scene_pf_passthrough.svg + +Scenario Parameters +------------------- + +Options for suite: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | dut | type of dut for dts suite | vm_dut,dut | dut | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | dut->portmap | method to generate dut port maps | auto, cfg | auto | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | tester | type of tester for dts suite[Not | N/A | N/A | No | + | | used by now] | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | type | type of hypervisor | kvm,libvirtd | kvm | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ + +Options for cpu: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | model | type of dut for dts suite | | host | Yes | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | number | number of cores in virtual | | 4 | Yes | + | | machine | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | numa_aware | numa id of cores allocated from | 0,1,auto | 0 | Yes | + | | resource module | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | skipcores | cores should not be used, most | | | No | + | | time for those cores will be used| | | | + | | by dpdk on host | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + +Options for mem: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | size | virtual machine memory size in | | 2048 | Yes | + | | MBs | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | hugepage | whether allocate memory from | | No | No | + | | hugepages | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + +Options for dev_gen: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | pf_idx | PF device index of host port | | 0 | Yes | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | pf_inx->vf_num | number of VFs created by this PF | | 0 | Yes | + | | device | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | pf_inx->driver | Allocate VF devices from which PF| igb_uio,default | default | Yes | + | | host driver | vfio-pci | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + +Options for device: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | pf_idx | PF device index of host port | | 0 | Yes | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | pf_idx->guestpci | pci address in virtual machine | | | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | vf_idx | VF devices index of all VFs | | | No | + | | belong to same PF devices | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | vf_idx->pf_dev | PF device index of this VF device| | | Yes | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | vf_idx->guestpci | pci address in virtual machine | | | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ + +Options for ports: + +.. table:: + + +------------------+----------------------------------+-----------------+---------------+-----------+ + | option | Description | Options | Default value | Must have | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | dev_idx | device index of virtual machine | | | No | + | | ports | | | | + +------------------+----------------------------------+-----------------+---------------+-----------+ + | dev_idx->peer | tester peer port's pci address | | | No | + +------------------+----------------------------------+-----------------+---------------+-----------+ -- 1.9.3