Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
To: x-fn-spp@sl.ntt-tx.co.jp
Cc: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: Re: [spp] [PATCH v2 2/2] docs: improve document under spp_vf directory
Date: Fri, 11 May 2018 13:23:35 +0900	[thread overview]
Message-ID: <285a674f-bd36-4856-5d61-9cf705511be3@lab.ntt.co.jp> (raw)
In-Reply-To: <201805090658.w496wJwt011531@imss04.silk.ntt-tx.co.jp>

On 2018/05/09 15:58, x-fn-spp@sl.ntt-tx.co.jp wrote:
> From: Hideyuki-Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
> 
>      - Add detail about where to edit using virsh edit command in build.rst
>      - Change command in Trouble Shooting Guide in build.rst
>      - Additional note when registering MAC address to classfier in usecase1.rst
I think it is ambiguous for "assumes that VM is already installed". Do you mean "installed" that the image file is already setup 
(in which SPP is installed) and ready to boot the VM, right?

I am not sure about "${VMNAME}" and "[VM_NAME]". Are there the same name or different? Although I am not so well understanding 
for virsh, I wander the name of '--name ${VMNAME}' and 'virsh edit [VM_NAME]' should be the same, and can be different for 
'${VMNAME}.img'. If so, could you revise it for using correct variable names?

Thanks
> 
>      Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
>      Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
> ---
>   docs/guides/spp_vf/gsg/build.rst          | 49 ++++++++++++++++++++++++++-----
>   docs/guides/spp_vf/use_cases/usecase1.rst |  9 ++++++
>   2 files changed, 50 insertions(+), 8 deletions(-)
> 
> diff --git a/docs/guides/spp_vf/gsg/build.rst b/docs/guides/spp_vf/gsg/build.rst
> index 52611dc..1a8e114 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,32 @@ Then, bind it with PCI_Number.
>   
>   virsh setup
>   -----------
> +.. note::
> +
> +    This document assumes that VM is already installed. If not please follow the instruction below and install the VM.
> +
> +.. code-block:: console
> +
> +   virt-install \
> +   --name ${VMNAME} \
> +   --ram 4096 \
> +   --disk path=/var/lib/libvirt/images/${VMNAME}.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 +198,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 ``<qemu:commandline>`` tag.
> +In addition, you need to add the tag enclosed by ``<memoryBacking>`` and ``</memoryBacking>``, ``<qemu:commandline>`` and ``</qemu:commandline>`` 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 ``<qemu:arg value='virtio-net-pci,netdev=vhost-net0,mac=52:54:00:12:34:56'/>`` can be specified when registering MAC address to classifier using Secondary command.
> +
> +        The following is an example of modified xml file:
> +
>   .. code-block:: xml
>   
>       <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> @@ -266,13 +299,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
> 


-- 
Yasufumi Ogawa
NTT Network Service Systems Labs

      reply	other threads:[~2018-05-11  4:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  5:43 [spp] [PATCH 0/2] doc:Fix error and improve document under spp_vf x-fn-spp
2018-05-09  6:33 ` Yasufumi Ogawa
2018-05-09  6:57   ` [spp] [PATCH v2 0/2] doc:fix " x-fn-spp
2018-05-16  8:49     ` [spp] [PATCH v3 0/2] docs:fix " x-fn-spp
2018-05-17  4:00       ` Yasufumi Ogawa
2018-05-17  6:41       ` [spp] [PATCH v4 " x-fn-spp
2018-05-17  8:18         ` [spp] [PATCH v5 " x-fn-spp
2018-05-17  9:46           ` Yasufumi Ogawa
2018-05-24 12:54             ` Ferruh Yigit
2018-05-17  8:18         ` [spp] [PATCH v5 1/2] docs: fix document error under spp_vf directory x-fn-spp
2018-05-17  8:18         ` [spp] [PATCH v5 2/2] docs: improve document " x-fn-spp
2018-05-17  6:41       ` [spp] [PATCH v4 1/2] docs: fix document error " x-fn-spp
2018-05-17  6:41       ` [spp] [PATCH v4 2/2] docs: improve document " x-fn-spp
2018-05-16  8:49     ` [spp] [PATCH v3 1/2] docs: fix document error " x-fn-spp
2018-05-16  8:49     ` [spp] [PATCH v3 2/2] docs: improve document " x-fn-spp
2018-05-09  6:58   ` [spp] [PATCH v2 1/2] docs: fix document error " x-fn-spp
2018-05-11  3:44     ` Yasufumi Ogawa
2018-05-09  6:58   ` [spp] [PATCH v2 2/2] docs: improve document " x-fn-spp
2018-05-11  4:23     ` Yasufumi Ogawa [this message]

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=285a674f-bd36-4856-5d61-9cf705511be3@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    --cc=x-fn-spp@sl.ntt-tx.co.jp \
    /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).