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 AB56A1B547 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 wAU5hXpC001679; Fri, 30 Nov 2018 14:43:33 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id wAU5hW2o028415; 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 QAA27180; 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 wAU5fJLS001807; 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 wAU5fJxN001795; Fri, 30 Nov 2018 14:41:19 +0900 Message-Id: <201811300541.wAU5fJxN001795@imss04.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id wAU5fJ5R014150 ; 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:14 +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 06/10] docs: add how to use 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 how to use guide for spp_mirror in `Getting Started`. Signed-off-by: Hideyuki Yamashita Signed-off-by: Yasufumi Ogawa --- docs/guides/spp_vf/gsg/howto_use.rst | 59 ++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/docs/guides/spp_vf/gsg/howto_use.rst b/docs/guides/spp_vf/gsg/howto_use.rst index 715fd8b..52a9c54 100644 --- a/docs/guides/spp_vf/gsg/howto_use.rst +++ b/docs/guides/spp_vf/gsg/howto_use.rst @@ -23,7 +23,7 @@ SPP primary allocates and manages resources for secondary processes. You need to run SPP primary before secondary processes. SPP primary has two kinds of options for DPDK and spp. -Before ``--`` are for DPDK is, and after ``--`` are for spp. +Before ``--`` are for DPDK is, and after it are for spp. See `Running a Sample Application `_ @@ -40,23 +40,23 @@ Then, spp primary can be launched like this. .. code-block:: console $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \ - -c 0x02 -n 4 --socket-mem 512,512 \ + -l 1 -n 4 --socket-mem 512,512 \ --huge-dir=/run/hugepages/kvm \ --proc-type=primary \ - -- -p 0x03 -n 9 -s 127.0.0.1:5555 + -- \ + -p 0x03 -n 9 -s 127.0.0.1:5555 -SPP Secondary -------------- +spp_vf +------ -spp secondary processes(``spp_vf``) can be launched with two kinds of -options, like primary process. +``spp_vf`` can be launched with two kinds of options, like primary process. Like primary process, ``spp_vf`` has two kinds of options. One is for DPDK, the other is ``spp_vf``. ``spp_vf`` specific options are: - * --client-id: client id + * --client-id: client id which can be seen as secondary ID from spp.py * -s: IPv4 address and port for spp secondary * --vhost-client: vhost-user client enable setting @@ -65,8 +65,9 @@ DPDK, the other is ``spp_vf``. .. code-block:: console $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \ - -c 0x3ffd -n 4 --proc-type=secondary \ - -- --client-id 1 -s 127.0.0.1:6666 --vhost-client + -l 0,2-13 -n 4 --proc-type=secondary \ + -- \ + --client-id 1 -s 127.0.0.1:6666 --vhost-client If ``--vhost-client`` option is specified, then ``vhost-user`` act as the client, otherwise the server. @@ -75,35 +76,47 @@ used. This reconnect features requires QEMU 2.7 (or later). See also `Vhost Sample Application `_. + +.. _spp_vf_gsg_howto_use_spp_mirror: + +spp_mirror +---------- + +``spp_mirror`` takes the same options as ``spp_vf``. Here is an example. + +.. code-block:: console + + $ sudo ./src/mirror/x86_64-native-linuxapp-gcc/spp_mirror \ + -l 2 -n 4 --proc-type=secondary \ + -- \ + --client-id 1 -s 127.0.0.1:6666 --vhost-client + VM -- -Launch VMs with ``virsh`` command. +VM is launched with ``virsh`` command. .. code-block:: console $ virsh start [VM] +It is required to add network configuration for processes running on the VMs. +If this configuration is skipped, processes cannot communicate with others +via SPP. -Additional Network Configurations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To enable processes running on the VM to communicate through spp, -it is required additional network configurations on host and guest VMs. - -(1) Guest VMs +On the VMs, add an interface and disable offload. .. code-block:: console - # Interface for vhost + # Add interface $ sudo ifconfig [IF_NAME] inet [IP_ADDR] netmask [NETMASK] up - # Disable offload for vhost interface + # Disable offload $ sudo ethtool -K [IF_NAME] tx off -(2) Host2 +On host machine, it is also required to disable offload. .. code-block:: console - # Disable offload for VM interface - $ ethtool -K [IF_NAME] tx off + # Disable offload for VM + $ sudo ethtool -K [IF_NAME] tx off -- 2.7.4