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 9EFEB1B39C for ; Fri, 30 Nov 2018 06:43:34 +0100 (CET) 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 wAU5hXuA001681; Fri, 30 Nov 2018 14:43:33 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id wAU5hWag028427; Fri, 30 Nov 2018 14:43:32 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id QAA27174; Fri, 30 Nov 2018 14:41:19 +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 wAU5fJt1001798; Fri, 30 Nov 2018 14:41:19 +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 wAU5fJ5F001789; Fri, 30 Nov 2018 14:41:19 +0900 Message-Id: <201811300541.wAU5fJ5F001789@imss04.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id wAU5fJ5Q014150 ; Fri, 30 Nov 2018 14:41:19 +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: Fri, 30 Nov 2018 14:41:13 +0900 X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181130054118.24543-1-x-fn-spp@sl.ntt-tx.co.jp> References: <20181130054118.24543-1-x-fn-spp@sl.ntt-tx.co.jp> X-TM-AS-MML: No Subject: [spp] [PATCH 05/10] docs: add setup guide for spp_mirror 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: Fri, 30 Nov 2018 05:43:35 -0000 From: Hideyuki Yamashita Add setup guide for spp_mirror in `Getting Started` section. Signed-off-by: Yasufumi Ogawa Signed-off-by: Hideyuki Yamashita --- 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` + , 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. +Setup spp_mirror +---------------- + +Setup of ``spp_mirror`` is almost the same as :ref:`SPP VF`. +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