From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id 737274C8D for ; Thu, 17 May 2018 08:51:17 +0200 (CEST) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id w4H6pGVi005302; Thu, 17 May 2018 15:51:16 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id w4H6pGF1009077; Thu, 17 May 2018 15:51:16 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id RAA05539; Thu, 17 May 2018 15:41:32 +0900 Received: from imss04.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss04.silk.ntt-tx.co.jp (unknown) with ESMTP id w4H6fW5V008399; Thu, 17 May 2018 15:41:32 +0900 Received: from mgate01.silk.ntt-tx.co.jp (smtp02.silk.ntt-tx.co.jp [10.107.0.37]) by imss04.silk.ntt-tx.co.jp (unknown) with ESMTP id w4H6fWDI008396; Thu, 17 May 2018 15:41:32 +0900 Message-Id: <201805170641.w4H6fWDI008396@imss04.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id w4H6fWGK017350 ; Thu, 17 May 2018 15:41:32 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Cc: spp@dpdk.org Date: Thu, 17 May 2018 15:41:32 +0900 X-Mailer: git-send-email 1.9.1 In-Reply-To: <201805160849.w4G8nObr014474@imss04.silk.ntt-tx.co.jp> References: <201805160849.w4G8nObr014474@imss04.silk.ntt-tx.co.jp> X-TM-AS-MML: No Subject: [spp] [PATCH v4 2/2] docs: improve document under spp_vf directory X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 06:51:18 -0000 From: Hideyuki-Yamashita This patch improves document under spp_vf directory. Signed-off-by: Hideyuki Yamashita Signed-off-by: Naoki Takada --- docs/guides/spp_vf/gsg/build.rst | 47 +++++++++++++++++++++++++------ docs/guides/spp_vf/use_cases/usecase1.rst | 9 ++++++ 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/docs/guides/spp_vf/gsg/build.rst b/docs/guides/spp_vf/gsg/build.rst index 2ccbd15..573d6be 100644 --- a/docs/guides/spp_vf/gsg/build.rst +++ b/docs/guides/spp_vf/gsg/build.rst @@ -30,7 +30,7 @@ .. _spp_vf_gsg_build: -Build +Setup ===== Environment @@ -165,6 +165,30 @@ Then, bind it with PCI_Number. virsh setup ----------- +``virsh`` is a command line interface that can be used to create, destroy, stop start and edit VMs and configure. After create an image file, you can setup it with ``virt-install``. + +.. code-block:: console + + virt-install \ + --name [VM_NAME] \ + --ram 4096 \ + --disk path=/var/lib/libvirt/images/[VM_NAME].img,size=30 \ + --vcpus 4 \ + --os-type linux \ + --os-variant ubuntu16.04 \ + --network network=default \ + --graphics none \ + --console pty,target_type=serial \ + --location 'http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/' \ + --extra-args 'console=ttyS0,115200n8 serial' + +You may need type the following commands through ssh to activate console. + +.. code-block:: console + + $sudo systemctl enable serial-getty@ttyS0.service + $sudo systemctl start serial-getty@ttyS0.service + Edit VM configuration with virsh. @@ -172,6 +196,13 @@ Edit VM configuration with virsh. $ virsh edit [VM_NAME] +You need to add ``xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'`` into the domain tag because of adding ```` tag. +In addition, you need to add the tag enclosed by ```` and ````, ```` and ```` because SPP uses vhost-user as interface with VM. +Note that number used in those tags should be the same value (e.g. chr0,sock0,vhost-net0) and these values should correspond to "add vhost N" (in this example 0). +MAC address used in ```` can be specified when registering MAC address to classifier using Secondary command. + + The following is an example of modified xml file: + .. code-block:: xml @@ -266,13 +297,13 @@ In this case, you should try it. .. code-block:: console - $ sudo ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/usr.lib.libvirt.virt-aa-helper - $ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/usr.sbin.libvirtd - $ sudo apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper - $ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd - $ sudo service apparmor reload - $ sudo service apparmor restart - $ sudo service libvirt-bin restart + #Edit /etc/libvirt/qemu.conf and set security_driver to none: + $sudo vi /etc/libvirt/qemu.conf + ... + security_driver = "none" + ... + #Restart libvirtd: + $sudo systemctl restart libvirtd.service Or, you remove appamor. diff --git a/docs/guides/spp_vf/use_cases/usecase1.rst b/docs/guides/spp_vf/use_cases/usecase1.rst index b5256e5..6a4f62f 100644 --- a/docs/guides/spp_vf/use_cases/usecase1.rst +++ b/docs/guides/spp_vf/use_cases/usecase1.rst @@ -186,6 +186,10 @@ In this usecase, you need to register two MAC addresses for merger1. spp > sec 1;classifier_table add mac 52:54:00:12:34:56 ring:0 spp > sec 1;classifier_table add mac 52:54:00:12:34:58 ring:1 +.. note:: + + Please verify that MAC address of target VM is specified in + [MACADDRESS] parameter. Configuration for the second login path is almost similar to the first path. @@ -234,6 +238,11 @@ Register entries to classifier_table for classifier2. spp > sec 1;classifier_table add mac 52:54:00:12:34:57 ring:4 spp > sec 1;classifier_table add mac 52:54:00:12:34:59 ring:5 +.. note:: + + Please verify that MAC address of target VM is specified in + [MACADDRESS] parameter. + Finally, activate all of settings by doign `flush` subcommand. .. code-block:: console -- 1.9.1