Soft Patch Panel
 help / color / mirror / Atom feed
From: x-fn-spp@sl.ntt-tx.co.jp
To: ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Cc: spp@dpdk.org
Subject: [spp] [PATCH 05/10] docs: add setup guide for spp_mirror
Date: Fri, 30 Nov 2018 14:41:13 +0900	[thread overview]
Message-ID: <201811300541.wAU5fJ5F001789@imss04.silk.ntt-tx.co.jp> (raw)
In-Reply-To: <20181130054118.24543-1-x-fn-spp@sl.ntt-tx.co.jp>

From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>

Add setup guide for spp_mirror in `Getting Started` section.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
---
 docs/guides/spp_vf/gsg/build.rst | 68 ++++++++++++++++++++++++++++++++++------
 1 file changed, 59 insertions(+), 9 deletions(-)

diff --git a/docs/guides/spp_vf/gsg/build.rst b/docs/guides/spp_vf/gsg/build.rst
index 7247699..656a388 100644
--- a/docs/guides/spp_vf/gsg/build.rst
+++ b/docs/guides/spp_vf/gsg/build.rst
@@ -6,12 +6,22 @@
 Setup
 =====
 
+This section describes how to setup ``spp_vf`` and ``spp_mirror``.
+
+
 Environment
 -----------
 
+Here is a recommended versions of each of software.
+
 * Ubuntu 16.04
-* qemu-kvm 2.7 or later(if you use vhost reconnect feature described in 3.2.3)
-* DPDK v17.11 or later
+* qemu-kvm 2.7 or later
+
+.. note::
+
+    If you do not use ``--vhost-client`` described in
+    :ref:`How to Use<spp_vf_gsg_howto_use_spp_mirror>`
+    , you can use previous versions of qemu-kvm.
 
 
 Edit Config
@@ -26,7 +36,8 @@ Uncomment user and group in ``/etc/libvirt/qemu.conf``.
     user = "root"
     group = "root"
 
-Change ``KVM_HUGEPAGES`` from 0 to 1 in ``/etc/default/qemu-kvm``.
+To use hugepages with libvirt, change ``KVM_HUGEPAGES`` from 0 to 1
+in ``/etc/default/qemu-kvm``.
 
 .. code-block:: console
 
@@ -34,13 +45,24 @@ Change ``KVM_HUGEPAGES`` from 0 to 1 in ``/etc/default/qemu-kvm``.
 
     KVM_HUGEPAGES=1
 
-Change grub config for hugepages and isolcpus.
+Change grub configuration for hugepages and isolcpus features. It is defined
+as ``GRUB_CMDLINE_LINUX_DEFAULT`` and takes parameters.
+
+* isolcpus: Core IDs separated with commna, such as ``2,3,4,8``
+* hugepagesz: The size of hugepage, such as ``2M`` or ``1G``
+* hugepages: The number of hugepages, such as ``8``
+* default_hugepagesz: Default hugepage size, required only for ``1G``
+
+In this setup guide, configure ``hugepagez`` and its default is ``1G`` and
+the number of hugepages is ``36``.
+Core IDs of for ``isolcpus`` depends on your environment and usecase,
+but should be configured to have enough number of cores.
 
 .. code-block:: c
 
     # /etc/default/grub
 
-    GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=2,...,46 hugepagesz=1G hugepages=36 default_hugepagesz=1G"
+    GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=2,...,46 hugepagesz=1G hugepages=..."
 
 For hugepages, isolcpus, refer to the dpdk documentation below.
 
@@ -129,17 +151,20 @@ Load igb_uio module.
     igb_uio                16384  0  # igb_uio is loaded
     uio                    20480  1 igb_uio
 
-Then, bind it with PCI_Number.
+Then, bind your devices with PCI number by using ``dpdk-devbind.py``.
+PCI number is inspected
 
 .. code-block:: console
 
-    $ $RTE_SDK/usertools/dpdk-devbind.py --status
     # check your device for PCI_Number
+    $ $RTE_SDK/usertools/dpdk-devbind.py --status
+
+    $ sudo $RTE_SDK/usertools/dpdk-devbind.py --bind=igb_uio PCI_NUM
 
-    $ sudo $RTE_SDK/usertools/dpdk-devbind.py --bind=igb_uio [PCI_Number]
 
 virsh setup
 -----------
+
 First of all, please check version of qemu-kvm.
 
 .. code-block:: console
@@ -151,7 +176,8 @@ then please install qemu following
 the instruction of https://wiki.qemu.org/index.php/Hosts/Linux
 to install qemu 2.7.
 You may need to install libvirt-bin,
-virtinst, bridge-utils packages via ``apt-get`` install to run ``virt-install``.
+virtinst, bridge-utils packages via ``apt-get`` install to run
+``virt-install``.
 
 
 ``virsh`` is a command line interface that can be used to create, destroy,
@@ -297,6 +323,30 @@ using Secondary command.
     </domain>
 
 
+Setup spp_mirror
+----------------
+
+Setup of ``spp_mirror`` is almost the same as :ref:`SPP VF<spp_vf_gsg_build>`.
+Configuration of use of ``shallowcopy`` or ``deepcopy`` is different from
+``spp_vf``.
+It is defined in ``src/mirror/Makefile`` and which of copying is used is
+configured by editing ``CFLAG`` option. It is defined to use ``shallowcopy``
+by default.
+
+If you use ``deepcopy``, comment out the line of ``-Dspp_mirror_SHALLOWCOPY``
+to be disabled.
+
+.. code-block:: c
+
+   #CFLAGS += -Dspp_mirror_SHALLOWCOPY
+
+Then, run make command to compile ``spp_mirror``.
+
+.. code-block:: console
+
+   $ make
+
+
 Trouble Shooting Guide
 ----------------------
 
-- 
2.7.4

  parent reply	other threads:[~2018-11-30  5:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181130054118.24543-1-x-fn-spp@sl.ntt-tx.co.jp>
2018-11-30  5:41 ` [spp] [PATCH 01/10] docs: add spp_mirror in overview section x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 02/10] docs: add overview image of spp_mirror x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 03/10] docs: add design for spp_mirror x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 04/10] docs: add explanation of spp_mirror x-fn-spp
2018-11-30  5:41 ` x-fn-spp [this message]
2018-11-30  5:41 ` [spp] [PATCH 06/10] docs: add how to use guide for spp_mirror x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 07/10] docs: add usecase of spp_mirror x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 08/10] docs: add usecase images " x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 09/10] docs: add label for usecase to be referred x-fn-spp
2018-11-30  5:41 ` [spp] [PATCH 10/10] docs: refactor primary commands section x-fn-spp

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=201811300541.wAU5fJ5F001789@imss04.silk.ntt-tx.co.jp \
    --to=x-fn-spp@sl.ntt-tx.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=spp@dpdk.org \
    /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).