Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH 1/6] Update command line examples
@ 2017-08-20 16:42 ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 2/6] Update diagrams ogawa.yasufumi
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

* Add code block directive for command line examples.

* Add '$' at the head of command line

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/setup_guide.md | 102 ++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 72 insertions(+), 30 deletions(-)

diff --git a/docs/setup_guide.md b/docs/setup_guide.md
index 399c85d..88e8999 100644
--- a/docs/setup_guide.md
+++ b/docs/setup_guide.md
@@ -3,6 +3,7 @@ Sample usage of the application
 
 Compilation
 -----------
+
 Change to DPDK directory
 Set RTE_SDK variable to current folder
 Set RTE_TARGET variable to any valid target.
@@ -13,11 +14,16 @@ Compile SPP: "make"
 
 Start Controller
 ----------------
-python spp.py -p 5555 -s 6666
+
+```sh
+$ python spp.py -p 5555 -s 6666
+```
 
 Start spp_primary
 -----------------
-sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
+
+```sh
+$ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
 	-c 0x02 -n 4 \
 	--socket-mem 512,512 \
 	--huge-dir=/dev/hugepages \
@@ -26,27 +32,34 @@ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
 	-p 0x03 \
 	-n 4 \
 	-s 192.168.122.1:5555
+```
 
 Start spp_nfv
 -------------
-sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
+
+```sh
+$ sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
 	-c 0x06 -n 4 \
 	--proc-type=secondary \
 	-- \
 	-n 1 \
 	-s 192.168.122.1:6666
 
-sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
+$ sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
 	-c 0x0A -n 4 \
 	--proc-type=secondary \
 	-- \
-	-n 1 \
+	-n 2 \
 	-s 192.168.122.1:6666
+```
 
 Start VM (QEMU)
 ---------------
+
 Common qemu command line:
-sudo ./x86_64-softmmu/qemu-system-x86_64 \
+
+```sh
+$ sudo ./x86_64-softmmu/qemu-system-x86_64 \
 	-cpu host \
 	-enable-kvm \
 	-object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \
@@ -58,33 +71,39 @@ sudo ./x86_64-softmmu/qemu-system-x86_64 \
 	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
 	-netdev tap,id=net0 \
 	-nographic -vnc :2
+```
 
 To start spp_vm "qemu-ifup" script required, please copy docs/qemu-ifup to host /etc/qemu-ifup
 
 Vhost interface is supported to communicate between guest and host:
 
-vhost interface
-~~~~~~~~~~~~~~~~~
-  - spp should do a "sec x:add vhost y" before starting the VM. x: vnf number, y: vhost port id.
-  - Needs vhost argument for qemu:
-    sudo ./x86_64-softmmu/qemu-system-x86_64 \
-	-cpu host \
-	-enable-kvm \
-	-object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \
-	-numa node,memdev=mem \
-	-mem-prealloc \
-	-hda /home/dpdk/debian_wheezy_amd64_standard.qcow2 \
-	-m 2048 \
-	-smp cores=4,threads=1,sockets=1 \
-	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
-	-netdev tap,id=net0 \
-	-chardev socket,id=chr0,path=/tmp/sock0 \
-	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \
-	-device virtio-net-pci,netdev=net1 \
-	-nographic -vnc :2
+### vhost interface
+
+- spp should do a "sec x:add vhost y" before starting the VM. x: vnf number, y: vhost port id.
+- Needs vhost argument for qemu:
+
+```sh
+      sudo ./x86_64-softmmu/qemu-system-x86_64 \
+      	-cpu host \
+      	-enable-kvm \
+      	-object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \
+      	-numa node,memdev=mem \
+      	-mem-prealloc \
+      	-hda /home/dpdk/debian_wheezy_amd64_standard.qcow2 \
+      	-m 2048 \
+      	-smp cores=4,threads=1,sockets=1 \
+      	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
+      	-netdev tap,id=net0 \
+      	-chardev socket,id=chr0,path=/tmp/sock0 \
+      	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \
+      	-device virtio-net-pci,netdev=net1 \
+      	-nographic -vnc :2
+```
 
 Start spp_vm (Inside the VM)
 ----------------------------
+
+```sh
 sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
 	-c 0x03 -n 4 \
 	--proc-type=primary \
@@ -92,6 +111,7 @@ sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
 	-p 0x01 \
 	-n 1 \
 	-s 192.168.122.1:6666
+```
 
 Test Setups
 ===========
@@ -122,16 +142,21 @@ Test Setup 1: Single NFV
 
 Configuration for L2fwd
 ~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;patch 0 1
 spp > sec 0;patch 1 0
 spp > sec 0;forward
+```
 
 Configuration for loopback
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;patch 0 0
 spp > sec 0;patch 1 1
 spp > sec 0;forward
-
+```
 
 Test Setup 2: Dual NFV
 ----------------------
@@ -159,10 +184,13 @@ Test Setup 2: Dual NFV
 
 Configuration for L2fwd
 ~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;patch 0 1
 spp > sec 1;patch 1 0
 spp > sec 0;forward
 spp > sec 1;forward
+```
 
 
                                                                         __
@@ -188,11 +216,13 @@ spp > sec 1;forward
 
 Configuration for loopback
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;patch 0 0
 spp > sec 1;patch 1 1
 spp > sec 0;forward
 spp > sec 1;forward
-
+```
 
 Test Setup 3: Dual NFV with ring pmd
 ------------------------------------
@@ -220,13 +250,15 @@ Test Setup 3: Dual NFV with ring pmd
 
 Configuration for Uni directional L2fwd
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;add ring 0
 spp > sec 1;add ring 0
 spp > sec 0;patch 0 2
 spp > sec 1;patch 2 1
 spp > sec 0;forward
 spp > sec 1;forward
-
+```
 
                                                                         __
                                          ring                             |
@@ -254,6 +286,8 @@ spp > sec 1;forward
 
 Configuration for L2fwd
 ~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 spp > sec 0;add ring 0
 spp > sec 0;add ring 1
 spp > sec 1;add ring 0
@@ -264,7 +298,7 @@ spp > sec 1;patch 1 3
 spp > sec 1;patch 2 1
 spp > sec 0;forward
 spp > sec 1;forward
-
+```
 
 Test Setup 4: Single NFV with VM through vhost pmd
 --------------------------------------------------
@@ -309,6 +343,8 @@ sec 1 = spp_vm
 
 Configuration for Uni directional L2fwd
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+```sh
 [rm –rf /tmp/sock0]
 spp > sec 0;add vhost 0
 [start VM]
@@ -317,7 +353,7 @@ spp > sec 0;patch 2 1
 spp > sec 1;patch 0 0
 spp > sec 1;forward
 spp > sec 0;forward
-
+```
 
 
 Optimizing qemu performance
@@ -328,14 +364,19 @@ ps ea
 192606 pts/11   Sl+    4:42 ./x86_64-softmmu/qemu-system-x86_64 -cpu host -enable-kvm -object memory-backend-file,id=mem,siz
 
 Using pstree to list out qemu-system-x86_64 threads:-
+
+```sh
 pstree -p 192606
 qemu-system-x86(192606)--+--{qemu-system-x8}(192607)
                          |--{qemu-system-x8}(192623)
                          |--{qemu-system-x8}(192624)
                          |--{qemu-system-x8}(192625)
                          |--{qemu-system-x8}(192626)
+```
 
 To Optimize, use taskset to pin each thread:-
+
+```sh
 $ sudo taskset -pc 4 192623
 pid 192623's current affinity list: 0-31
 pid 192623's new affinity list: 4
@@ -348,3 +389,4 @@ pid 192625's new affinity list: 6
 $ sudo taskset -pc 7 192626
 pid 192626's current affinity list: 0-31
 pid 192626's new affinity list: 7
+```
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [spp] [PATCH 2/6] Update diagrams
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
@ 2017-08-20 16:42 ` ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 3/6] Add table of contents ogawa.yasufumi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Network diagrams of ascii art are displayed inappropriately because
directives are not given properly.

Add code directive to indicate the part of diagrams.

This change includes some updates for command line examples
remained to be modified.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/setup_guide.md | 61 +++++++++++++++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 23 deletions(-)

diff --git a/docs/setup_guide.md b/docs/setup_guide.md
index 88e8999..d2937c3 100644
--- a/docs/setup_guide.md
+++ b/docs/setup_guide.md
@@ -104,7 +104,7 @@ Start spp_vm (Inside the VM)
 ----------------------------
 
 ```sh
-sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
+$ sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
 	-c 0x03 -n 4 \
 	--proc-type=primary \
 	-- \
@@ -119,6 +119,7 @@ Test Setups
 Test Setup 1: Single NFV
 ------------------------
 
+```
                                                                         __
                                     +--------------+                      |
                                     |    spp_nfv   |                      |
@@ -140,19 +141,19 @@ Test Setup 1: Single NFV
                               |                           |
                               :                           v
 
-Configuration for L2fwd
-~~~~~~~~~~~~~~~~~~~~~~~
+```
 
-```sh
+### Configuration for L2fwd
+
+```
 spp > sec 0;patch 0 1
 spp > sec 0;patch 1 0
 spp > sec 0;forward
 ```
 
-Configuration for loopback
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+### Configuration for loopback
 
-```sh
+```
 spp > sec 0;patch 0 0
 spp > sec 0;patch 1 1
 spp > sec 0;forward
@@ -161,6 +162,7 @@ spp > sec 0;forward
 Test Setup 2: Dual NFV
 ----------------------
 
+```
                                                                         __
                          +--------------+          +--------------+       |
                          |    spp_nfv   |          |    spp_nfv   |       |
@@ -182,16 +184,18 @@ Test Setup 2: Dual NFV
                               |                           |
                               :                           v
 
-Configuration for L2fwd
-~~~~~~~~~~~~~~~~~~~~~~~
+```
 
-```sh
+### Configuration for L2fwd
+
+```
 spp > sec 0;patch 0 1
 spp > sec 1;patch 1 0
 spp > sec 0;forward
 spp > sec 1;forward
 ```
 
+```
 
                                                                         __
                          +--------------+          +--------------+       |
@@ -214,10 +218,11 @@ spp > sec 1;forward
                               |                           |
                               v                           v
 
-Configuration for loopback
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+```
 
-```sh
+### Configuration for loopback
+
+```
 spp > sec 0;patch 0 0
 spp > sec 1;patch 1 1
 spp > sec 0;forward
@@ -227,6 +232,7 @@ spp > sec 1;forward
 Test Setup 3: Dual NFV with ring pmd
 ------------------------------------
 
+```
                                                                         __
                        +----------+      ring        +----------+         |
                        |  spp_nfv |    +--------+    |  spp_nfv |         |
@@ -248,10 +254,11 @@ Test Setup 3: Dual NFV with ring pmd
                               |                           |
                               :                           v
 
-Configuration for Uni directional L2fwd
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+```
 
-```sh
+### Configuration for Uni directional L2fwd
+
+```
 spp > sec 0;add ring 0
 spp > sec 1;add ring 0
 spp > sec 0;patch 0 2
@@ -260,6 +267,7 @@ spp > sec 0;forward
 spp > sec 1;forward
 ```
 
+```
                                                                         __
                                          ring                             |
                                        +--------+                         |
@@ -284,10 +292,11 @@ spp > sec 1;forward
                               |                           |
                               v                           v
 
-Configuration for L2fwd
-~~~~~~~~~~~~~~~~~~~~~~~
+```
+
+### Configuration for L2fwd
 
-```sh
+```
 spp > sec 0;add ring 0
 spp > sec 0;add ring 1
 spp > sec 1;add ring 0
@@ -303,6 +312,7 @@ spp > sec 1;forward
 Test Setup 4: Single NFV with VM through vhost pmd
 --------------------------------------------------
 
+```
                                                    __
                           +----------------------+   |
                           | guest                |   |
@@ -336,13 +346,14 @@ Test Setup 4: Single NFV with VM through vhost pmd
                               |                           |
                               :                           v
 
+```
+
 Legend:-
 sec 0 = spp_nfv
 sec 1 = spp_vm
 
 
-Configuration for Uni directional L2fwd
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+### Configuration for Uni directional L2fwd
 
 ```sh
 [rm –rf /tmp/sock0]
@@ -358,15 +369,19 @@ spp > sec 0;forward
 
 Optimizing qemu performance
 ---------------------------
+
 First find out the PID for qemu-system-x86 process
-ps ea
+
+```sh
+$ ps ea
    PID TTY      STAT   TIME COMMAND
 192606 pts/11   Sl+    4:42 ./x86_64-softmmu/qemu-system-x86_64 -cpu host -enable-kvm -object memory-backend-file,id=mem,siz
+```
 
 Using pstree to list out qemu-system-x86_64 threads:-
 
 ```sh
-pstree -p 192606
+$ pstree -p 192606
 qemu-system-x86(192606)--+--{qemu-system-x8}(192607)
                          |--{qemu-system-x8}(192623)
                          |--{qemu-system-x8}(192624)
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [spp] [PATCH 3/6] Add table of contents
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 2/6] Update diagrams ogawa.yasufumi
@ 2017-08-20 16:42 ` ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 4/6] Update markdown directives ogawa.yasufumi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Add table of contents at the top of setup guide to easily find target
section and be readalbe.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/setup_guide.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/docs/setup_guide.md b/docs/setup_guide.md
index d2937c3..9d529a3 100644
--- a/docs/setup_guide.md
+++ b/docs/setup_guide.md
@@ -1,3 +1,20 @@
+# Table of Contents
+
+- [Sample usage of the application](#sample-usage-of-the-application)
+  - [Compilation](#compilation)
+  - [Start Controller](#start-controller)
+  - [Start spp_primary](#start-spp_primary)
+  - [Start spp_nfv](#start-spp_nfv)
+  - [Start VM (QEMU)](#start-vm-qemu)
+  - [Start spp_vm (Inside the VM)](#start-spp_vm-inside-the-vm))
+
+- [Test Setups](#test-setups)
+  - [Test Setup 1: Single NFV](#test-setup-1-single-nfv)
+  - [Test Setup 2: Dual NFV](#test-setup-2-dual-nfv)
+  - [Test Setup 3: Dual NFV with ring pmd](#test-setup-3-dual-nfv-with-ring-pmd)
+  - [Test Setup 4: Single NFV with VM through vhost pmd](#test-setup-4-single-nfv-with-vm-through-vhost-pmd)
+  - [Optimizing qemu performance](#optimizing-qemu-performance)
+
 Sample usage of the application
 ===============================
 
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [spp] [PATCH 4/6] Update markdown directives
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 2/6] Update diagrams ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 3/6] Add table of contents ogawa.yasufumi
@ 2017-08-20 16:42 ` ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 5/6] Correct assignment of secondary ID ogawa.yasufumi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

* Add header for sections

* Modify list

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/workflow.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/docs/workflow.md b/docs/workflow.md
index b2bba39..53a5dd8 100644
--- a/docs/workflow.md
+++ b/docs/workflow.md
@@ -1,18 +1,18 @@
-SPP Workflow
+## SPP Workflow
 
 SPP is a standalone application uses DPDK as library.
 
 There is main development branch:
-* mater branch: spp development branch.
+- master branch: spp development branch.
 
 For each DPDK release, SPP master branch is tagged with same release version.
 Master branch head always has latest development SPP source codes.
 
 
-To submit a patch:
+### To submit a patch:
 
 Please send the patch to one of the developers:
-Ferruh Yigit <ferruh.yigit@intel.com>
-Gerald Rogers <gerald.rogers@intel.com>
-Sy Jong Choi <sy.jong.choi@intel.com>
-dpdk-spp@intel.com
+- Ferruh Yigit <ferruh.yigit@intel.com>
+- Gerald Rogers <gerald.rogers@intel.com>
+- Sy Jong Choi <sy.jong.choi@intel.com>
+- dpdk-spp@intel.com
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [spp] [PATCH 5/6] Correct assignment of secondary ID
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
                   ` (2 preceding siblings ...)
  2017-08-20 16:42 ` [spp] [PATCH 4/6] Update markdown directives ogawa.yasufumi
@ 2017-08-20 16:42 ` ogawa.yasufumi
  2017-08-20 16:42 ` [spp] [PATCH 6/6] Refactor for misc update as followings ogawa.yasufumi
  2017-08-23 11:34 ` [spp] [PATCH 1/6] Update command line examples Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Although assignment of secondary ID is started from 0 in setup guide,
it is started from 1 actually and only assigns 0 if given ID is used
already.

This change is for correcting assingnment of secondary ID from 1 in
command line examples and diagrams.

It also includes update for misc bug fixes of marddown.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/setup_guide.md | 214 ++++++++++++++++++++++++++++------------------------
 1 file changed, 116 insertions(+), 98 deletions(-)

diff --git a/docs/setup_guide.md b/docs/setup_guide.md
index 9d529a3..54f2cd3 100644
--- a/docs/setup_guide.md
+++ b/docs/setup_guide.md
@@ -21,13 +21,15 @@ Sample usage of the application
 Compilation
 -----------
 
-Change to DPDK directory
-Set RTE_SDK variable to current folder
-Set RTE_TARGET variable to any valid target.
-Compile DPDK: "make T=x86_64-native-linuxapp-gcc install"
+Compile DPDK 
+* Change to DPDK directory
+* Set `RTE_SDK` variable to current folder
+* Set `RTE_TARGET` variable to any valid target.
+* Compile DPDK: "make T=x86_64-native-linuxapp-gcc install"
 
-Change to SPP directory
-Compile SPP: "make"
+Compile SPP
+* Change to SPP directory
+* Compile SPP: "make"
 
 Start Controller
 ----------------
@@ -39,6 +41,11 @@ $ python spp.py -p 5555 -s 6666
 Start spp_primary
 -----------------
 
+Options
+* p: port mask
+* n: number of sec
+* s: ipaddr of controller and port for primary
+
 ```sh
 $ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
 	-c 0x02 -n 4 \
@@ -54,6 +61,10 @@ $ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
 Start spp_nfv
 -------------
 
+Options
+* n: seconary id (n > 0)
+* s: ipaddr of controller and port for secondary
+
 ```sh
 $ sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
 	-c 0x06 -n 4 \
@@ -90,36 +101,43 @@ $ sudo ./x86_64-softmmu/qemu-system-x86_64 \
 	-nographic -vnc :2
 ```
 
-To start spp_vm "qemu-ifup" script required, please copy docs/qemu-ifup to host /etc/qemu-ifup
+To start spp_vm "qemu-ifup" script required, please copy docs/qemu-ifup
+to host /etc/qemu-ifup
 
 Vhost interface is supported to communicate between guest and host:
 
 ### vhost interface
 
-- spp should do a "sec x:add vhost y" before starting the VM. x: vnf number, y: vhost port id.
+- spp should do a "sec x:add vhost y" before starting the VM.
+  x: vnf number, y: vhost port id.
 - Needs vhost argument for qemu:
 
 ```sh
-      sudo ./x86_64-softmmu/qemu-system-x86_64 \
-      	-cpu host \
-      	-enable-kvm \
-      	-object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \
-      	-numa node,memdev=mem \
-      	-mem-prealloc \
-      	-hda /home/dpdk/debian_wheezy_amd64_standard.qcow2 \
-      	-m 2048 \
-      	-smp cores=4,threads=1,sockets=1 \
-      	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
-      	-netdev tap,id=net0 \
-      	-chardev socket,id=chr0,path=/tmp/sock0 \
-      	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \
-      	-device virtio-net-pci,netdev=net1 \
-      	-nographic -vnc :2
+  sudo ./x86_64-softmmu/qemu-system-x86_64 \
+  	-cpu host \
+  	-enable-kvm \
+  	-object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on \
+  	-numa node,memdev=mem \
+  	-mem-prealloc \
+  	-hda /home/dpdk/debian_wheezy_amd64_standard.qcow2 \
+  	-m 2048 \
+  	-smp cores=4,threads=1,sockets=1 \
+  	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
+  	-netdev tap,id=net0 \
+  	-chardev socket,id=chr0,path=/tmp/sock0 \
+  	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \
+  	-device virtio-net-pci,netdev=net1 \
+  	-nographic -vnc :2
 ```
 
 Start spp_vm (Inside the VM)
 ----------------------------
 
+Options
+* p: port mask
+* n: secondary id
+* s: ipaddr of controller and port for secondary
+
 ```sh
 $ sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
 	-c 0x03 -n 4 \
@@ -140,7 +158,7 @@ Test Setup 1: Single NFV
                                                                         __
                                     +--------------+                      |
                                     |    spp_nfv   |                      |
-                                    |              |                      |
+                                    |    (sec 1)   |                      |
                                     +--------------+                      |
                                          ^      :                         |
                                          |      |                         |
@@ -163,17 +181,17 @@ Test Setup 1: Single NFV
 ### Configuration for L2fwd
 
 ```
-spp > sec 0;patch 0 1
-spp > sec 0;patch 1 0
-spp > sec 0;forward
+spp > sec 1;patch 0 1
+spp > sec 1;patch 1 0
+spp > sec 1;forward
 ```
 
 ### Configuration for loopback
 
 ```
-spp > sec 0;patch 0 0
-spp > sec 0;patch 1 1
-spp > sec 0;forward
+spp > sec 1;patch 0 0
+spp > sec 1;patch 1 1
+spp > sec 1;forward
 ```
 
 Test Setup 2: Dual NFV
@@ -183,7 +201,7 @@ Test Setup 2: Dual NFV
                                                                         __
                          +--------------+          +--------------+       |
                          |    spp_nfv   |          |    spp_nfv   |       |
-                         |              |          |              |       |
+                         |    (sec 1)   |          |    (sec 2)   |       |
                          +--------------+          +--------------+       |
                             ^        :               :         :          |
                             |        |      +--------+         |          |
@@ -206,10 +224,10 @@ Test Setup 2: Dual NFV
 ### Configuration for L2fwd
 
 ```
-spp > sec 0;patch 0 1
-spp > sec 1;patch 1 0
-spp > sec 0;forward
+spp > sec 1;patch 0 1
+spp > sec 2;patch 1 0
 spp > sec 1;forward
+spp > sec 2;forward
 ```
 
 ```
@@ -217,7 +235,7 @@ spp > sec 1;forward
                                                                         __
                          +--------------+          +--------------+       |
                          |    spp_nfv   |          |    spp_nfv   |       |
-                         |              |          |              |       |
+                         |    (sec 1)   |          |    (sec 2)   |       |
                          +--------------+          +--------------+       |
                             ^        :               ^         :          |
                             |        |               |         |          |
@@ -240,10 +258,10 @@ spp > sec 1;forward
 ### Configuration for loopback
 
 ```
-spp > sec 0;patch 0 0
-spp > sec 1;patch 1 1
-spp > sec 0;forward
+spp > sec 1;patch 0 0
+spp > sec 2;patch 1 1
 spp > sec 1;forward
+spp > sec 2;forward
 ```
 
 Test Setup 3: Dual NFV with ring pmd
@@ -251,9 +269,9 @@ Test Setup 3: Dual NFV with ring pmd
 
 ```
                                                                         __
-                       +----------+      ring        +----------+         |
+                       +----------+      ring 0      +----------+         |
                        |  spp_nfv |    +--------+    |  spp_nfv |         |
-                       |        2 | -> |  |  |  |- > |  2       |         |
+                       |  (sec 1) | -> |  |  |  |- > |  (sec 2) |         |
                        +----------+    +--------+    +----------+         |
                           ^                                   :           |
                           |                                   |           |
@@ -276,34 +294,34 @@ Test Setup 3: Dual NFV with ring pmd
 ### Configuration for Uni directional L2fwd
 
 ```
-spp > sec 0;add ring 0
 spp > sec 1;add ring 0
-spp > sec 0;patch 0 2
-spp > sec 1;patch 2 1
-spp > sec 0;forward
+spp > sec 2;add ring 0
+spp > sec 1;patch 0 2
+spp > sec 2;patch 2 1
 spp > sec 1;forward
+spp > sec 2;forward
 ```
 
 ```
                                                                         __
-                                         ring                             |
+                                         ring 0                           |
                                        +--------+                         |
-                       +----------+ <--|  |  |  |<-- +----------+         |
-                       |        3 |    +--------+    |  3       |         |
-                       |  spp_nfv |                  |  spp_nfv |         |
-                       |        2 |--> +--------+ -->|  2       |         |
-                       +----------+    |  |  |  |    +----------+         |
+                      +-----------+ <--|  |  |  |<-- +-----------+        |
+                      |          3|    +--------+    |3          |        |
+                      |  spp_nfv  |                  |  spp_nfv  |        |
+                      |  (sec 1) 2|--> +--------+ -->|2 (sec 2)  |        |
+                      +-----------+    |  |  |  |    +-----------+        |
                           ^            +--------+             ^           |
-                          |              ring                 |           |
+                          |              ring 1               |           |
                           v                                   v           |
-    +----+----------+-------------------------------------------------+   |
-    |    | primary  |       ^                               ^         |   |
-    |    +----------+       |                               :         |   |
+    +---+----------+--------------------------------------------------+   |
+    |   | primary  |        ^                               ^         |   |
+    |   +----------+        |                               :         |   |
     |                       :                               :         |   |
     |                       :                               |         |   |  host
     |                       v                               v         |   |
     |                  +--------------+            +--------------+   |   |
-    |                  |   phy port 0 |            |   phy port  1|   |   |
+    |                  |  phy port 0  |            |  phy port 1  |   |   |
     +------------------+--------------+------------+--------------+---+ __|
                               ^                           ^
                               |                           |
@@ -314,73 +332,73 @@ spp > sec 1;forward
 ### Configuration for L2fwd
 
 ```
-spp > sec 0;add ring 0
-spp > sec 0;add ring 1
 spp > sec 1;add ring 0
 spp > sec 1;add ring 1
-spp > sec 0;patch 0 2
-spp > sec 0;patch 3 0
-spp > sec 1;patch 1 3
-spp > sec 1;patch 2 1
-spp > sec 0;forward
+spp > sec 2;add ring 0
+spp > sec 2;add ring 1
+spp > sec 1;patch 0 2
+spp > sec 1;patch 3 0
+spp > sec 2;patch 1 3
+spp > sec 2;patch 2 1
 spp > sec 1;forward
+spp > sec 2;forward
 ```
 
 Test Setup 4: Single NFV with VM through vhost pmd
 --------------------------------------------------
 
 ```
-                                                   __
-                          +----------------------+   |
-                          | guest                |   |
-                          |                      |   |
-                          |   +-------------+    |   |  guest 192.168.122.51
-                          |   |    spp_vm   |    |   |
-                          |   |      0      |    |   |
-                          +---+--------------+---+ __|
+                                                    __
+                          +-----------------------+   |
+                          | guest                 |   |
+                          |                       |   |
+                          |   +--------------+    |   |  guest 
+                          |   |    spp_vm    |    |   |  192.168.122.51
+                          |   |    (sec 2)   |    |   |
+                          |   |       0      |    |   |
+                          +---+--------------+----+ __|
                                ^           :
-                               |           |
                                |  virtio   |
-                               |           |
-                               |           V                            __
-                           +--------------------+                         |
-                           |  spp_nfv           |                         |
-                           |  2                 |                         |
-                           +--------------------+                         |
-                               ^           :                              |
-                               |           +---------- +                  |
-                               :                       v                  |
-    +----+----------+--------------------------------------------+        |
-    |    | primary  |       ^                          :         |        |
-    |    +----------+       |                          :         |        |
-    |                       :                          :         |        |
-    |                       :                          |         |        |  host 192.168.122.1
-    |                       :                          v         |        |
-    |                  +--------------+       +--------------+   |        |
-    |                  |   phy port 0 |       |   phy port  1|   |        |
-    +------------------+--------------+-------+--------------+---+      __|
+                               |           V                          __
+                           +--------------------+                       |
+                           |      spp_nfv       |                       |
+                           |  2   (sec 1)       |                       |
+                           +--------------------+                       |
+                               ^           :                            |
+                               |           +---------- +                |
+                               :                       v                |
+    +----+----------+--------------------------------------------+      |
+    |    | primary  |       ^                          :         |      |
+    |    +----------+       |                          :         |      |
+    |                       :                          |         |      | host 
+    |                       :                          v         |      | 192.168.122.1
+    |                  +--------------+       +--------------+   |      |
+    |                  |   phy port 0 |       |  phy port  1 |   |      |
+    +------------------+--------------+-------+--------------+---+    __|
                               ^                           :
                               |                           |
                               :                           v
 
 ```
 
-Legend:-
-sec 0 = spp_nfv
-sec 1 = spp_vm
-
-
 ### Configuration for Uni directional L2fwd
 
 ```sh
 [rm –rf /tmp/sock0]
+```
+
+```
 spp > sec 0;add vhost 0
+```
+
 [start VM]
-spp > sec 0;patch 0 2
-spp > sec 0;patch 2 1
-spp > sec 1;patch 0 0
+
+```
+spp > sec 1;patch 0 2
+spp > sec 1;patch 2 1
+spp > sec 2;patch 0 0
 spp > sec 1;forward
-spp > sec 0;forward
+spp > sec 2;forward
 ```
 
 
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [spp] [PATCH 6/6] Refactor for misc update as followings.
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
                   ` (3 preceding siblings ...)
  2017-08-20 16:42 ` [spp] [PATCH 5/6] Correct assignment of secondary ID ogawa.yasufumi
@ 2017-08-20 16:42 ` ogawa.yasufumi
  2017-08-23 11:34 ` [spp] [PATCH 1/6] Update command line examples Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: ogawa.yasufumi @ 2017-08-20 16:42 UTC (permalink / raw)
  To: gerald.rogers, sy.jong.choi, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

* Emphasize command name by surrounding it by '`'.

* Add comments for qemu options for more understandable.

* Add supplemental status info for command line examples for more
  understandable.

* Add prefixes of port ID in diagrams, such as from '0' to 'p0', to be
  clear the meanings.

* Remove 'ovs-dpdk' from the diagram of 'Test Setup 1'.

* Update markdown directives.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 .gitignore          |   1 +
 docs/setup_guide.md | 253 ++++++++++++++++++++++++++++++++++------------------
 2 files changed, 168 insertions(+), 86 deletions(-)

diff --git a/.gitignore b/.gitignore
index e69de29..a01ee28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+.*.swp
diff --git a/docs/setup_guide.md b/docs/setup_guide.md
index 54f2cd3..f806127 100644
--- a/docs/setup_guide.md
+++ b/docs/setup_guide.md
@@ -1,25 +1,23 @@
-# Table of Contents
+## Table of Contents
 
 - [Sample usage of the application](#sample-usage-of-the-application)
   - [Compilation](#compilation)
   - [Start Controller](#start-controller)
   - [Start spp_primary](#start-spp_primary)
   - [Start spp_nfv](#start-spp_nfv)
-  - [Start VM (QEMU)](#start-vm-qemu)
-  - [Start spp_vm (Inside the VM)](#start-spp_vm-inside-the-vm))
+  - [Start spp_vm](#start-spp_vm)
 
 - [Test Setups](#test-setups)
   - [Test Setup 1: Single NFV](#test-setup-1-single-nfv)
   - [Test Setup 2: Dual NFV](#test-setup-2-dual-nfv)
   - [Test Setup 3: Dual NFV with ring pmd](#test-setup-3-dual-nfv-with-ring-pmd)
   - [Test Setup 4: Single NFV with VM through vhost pmd](#test-setup-4-single-nfv-with-vm-through-vhost-pmd)
-  - [Optimizing qemu performance](#optimizing-qemu-performance)
+- [Optimizing qemu performance](#optimizing-qemu-performance)
 
-Sample usage of the application
-===============================
 
-Compilation
------------
+## Sample usage of the application
+
+### Compilation
 
 Compile DPDK 
 * Change to DPDK directory
@@ -31,20 +29,25 @@ Compile SPP
 * Change to SPP directory
 * Compile SPP: "make"
 
-Start Controller
-----------------
+### Start Controller
+
+First, start spp.py with port numbers for spp_primary and secondary processes.
 
 ```sh
 $ python spp.py -p 5555 -s 6666
+primary port : 5555
+secondary port : 6666
+Welcome to the spp.   Type help or ? to list commands.
+
+spp >
 ```
 
-Start spp_primary
------------------
+### Start spp_primary
 
-Options
-* p: port mask
-* n: number of sec
-* s: ipaddr of controller and port for primary
+Start spp_primary with SPP options.
+* -p: port mask
+* -n: number of ring
+* -s: IP address of controller and port for primary
 
 ```sh
 $ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
@@ -58,12 +61,13 @@ $ sudo ./src/primary/src/primary/x86_64-native-linuxapp-gcc/spp_primary \
 	-s 192.168.122.1:5555
 ```
 
-Start spp_nfv
--------------
+### Start spp_nfv
 
-Options
-* n: seconary id (n > 0)
-* s: ipaddr of controller and port for secondary
+There are two types fo secondary, spp_nfv and spp_vm.
+
+Start two spp_nfv with SPP Options
+* -n: seconary id (n > 0)
+* -s: ipaddr of controller and port for secondary
 
 ```sh
 $ sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
@@ -81,10 +85,26 @@ $ sudo ./src/nfv/src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \
 	-s 192.168.122.1:6666
 ```
 
-Start VM (QEMU)
----------------
+### Start spp_vm
+
+Start a VM for running spp_vm.
+You need to add vhost interface while starting VM.
+Vhost interface is supported to communicate between guest and host.
+
+To start spp_vm, "qemu-ifup" script required.
+Please copy "docs/qemu-ifup" to /etc/qemu-ifup of host.
+
+SPP controller should do a "sec x;add vhost y" before starting the VM.
+x is an id of spp_nfv and y is vhost port id (num of socket).
+Vhost port is created as "/tmp/sock'y'".
+
+To add vhost port 0 to sec 1,
+```
+spp > sec 1;add vhost 0
+```
+and confirm that "/tmp/sock0" is created.
 
-Common qemu command line:
+Common qemu command line without vhost is here.
 
 ```sh
 $ sudo ./x86_64-softmmu/qemu-system-x86_64 \
@@ -101,16 +121,7 @@ $ sudo ./x86_64-softmmu/qemu-system-x86_64 \
 	-nographic -vnc :2
 ```
 
-To start spp_vm "qemu-ifup" script required, please copy docs/qemu-ifup
-to host /etc/qemu-ifup
-
-Vhost interface is supported to communicate between guest and host:
-
-### vhost interface
-
-- spp should do a "sec x:add vhost y" before starting the VM.
-  x: vnf number, y: vhost port id.
-- Needs vhost argument for qemu:
+Add chardev and another netdev,device options for vhost interface.
 
 ```sh
   sudo ./x86_64-softmmu/qemu-system-x86_64 \
@@ -124,19 +135,18 @@ Vhost interface is supported to communicate between guest and host:
   	-smp cores=4,threads=1,sockets=1 \
   	-device e1000,netdev=net0,mac=DE:AD:BE:EF:00:01 \
   	-netdev tap,id=net0 \
-  	-chardev socket,id=chr0,path=/tmp/sock0 \
-  	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \
-  	-device virtio-net-pci,netdev=net1 \
+  	-chardev socket,id=chr0,path=/tmp/sock0 \              # vhost port
+  	-netdev vhost-user,id=net1,chardev=chr0,vhostforce \   # netdev for vhost-user
+  	-device virtio-net-pci,netdev=net1 \                   # device as virtio-net-pci
   	-nographic -vnc :2
 ```
 
-Start spp_vm (Inside the VM)
-----------------------------
+Compile DPDK and SPP inside the VM and start spp_vm.
 
-Options
-* p: port mask
-* n: secondary id
-* s: ipaddr of controller and port for secondary
+SPP options
+* -p: port mask
+* -n: secondary id
+* -s: IP address of controller and port for secondary
 
 ```sh
 $ sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
@@ -148,11 +158,10 @@ $ sudo ./src/vm/src/vm/x86_64-native-linuxapp-gcc/spp_vm \
 	-s 192.168.122.1:6666
 ```
 
-Test Setups
-===========
 
-Test Setup 1: Single NFV
-------------------------
+## Test Setups
+
+### Test Setup 1: Single NFV
 
 ```
                                                                         __
@@ -170,7 +179,7 @@ Test Setup 1: Single NFV
     |                         +----------+      +---------+           |   |  host
     |                         :                           v           |   |
     |                  +--------------+            +--------------+   |   |
-    |                  |   phy port 0 |  ovs-dpdk  |   phy port 1 |   |   |
+    |                  |   phy port 0 |            |   phy port 1 |   |   |
     +------------------+--------------+------------+--------------+---+ __|
                               ^                           :
                               |                           |
@@ -178,24 +187,57 @@ Test Setup 1: Single NFV
 
 ```
 
-### Configuration for L2fwd
+Check status of spp_nfv in spp controller.
+
+```
+spp > sec 1;status
+recv:6:{Client ID 1 Idling
+1
+port id: 0,on,PHY,outport: -99
+port id: 1,on,PHY,outport: -99
+}
+```
+
+This message means that sec 1 has two physical ports refered as port 0, 1.
+"outpport: -99" means the destionation is no assigned.
+
+#### Configure spp_nfv as L2fwd
 
+Assing the destination of ports by "patch" subcommand and start forwarding.
+It is bi-directional.
 ```
 spp > sec 1;patch 0 1
 spp > sec 1;patch 1 0
 spp > sec 1;forward
 ```
 
-### Configuration for loopback
+Check the status of sec 1 is updated.
+```
+spp > sec 1;status
+recv:6:{Client ID 1 Running
+1
+port id: 0,on,PHY,outport: 1
+port id: 1,on,PHY,outport: 0
+}
+```
+
+Clear patch configuration.
+```
+spp > sec 1;stop
+spp > sec 1;patch reset
+```
 
+#### Configure spp_nfv for loopback
+
+Another example of patch configuration.
 ```
 spp > sec 1;patch 0 0
 spp > sec 1;patch 1 1
 spp > sec 1;forward
 ```
 
-Test Setup 2: Dual NFV
-----------------------
+
+### Test Setup 2: Dual NFV
 
 ```
                                                                         __
@@ -221,8 +263,10 @@ Test Setup 2: Dual NFV
 
 ```
 
-### Configuration for L2fwd
+#### Configuration for two L2fwds
 
+Assign patch configuration for sec 1 and 2.
+It is uni-directional.
 ```
 spp > sec 1;patch 0 1
 spp > sec 2;patch 1 0
@@ -255,7 +299,7 @@ spp > sec 2;forward
 
 ```
 
-### Configuration for loopback
+#### Configuration for loopback
 
 ```
 spp > sec 1;patch 0 0
@@ -264,8 +308,8 @@ spp > sec 1;forward
 spp > sec 2;forward
 ```
 
-Test Setup 3: Dual NFV with ring pmd
-------------------------------------
+
+### Test Setup 3: Dual NFV with ring pmd
 
 ```
                                                                         __
@@ -291,8 +335,27 @@ Test Setup 3: Dual NFV with ring pmd
 
 ```
 
-### Configuration for Uni directional L2fwd
+#### Configuration for Uni directional L2fwd
+
+Ring is an interface between spp_nfvs.
+The maximum number of rings is defined as an option of spp_primary.
+spp_nfv is able to find a ring by adding it.
+
+Please notice that sec 1 has a new port id 2 after adding ring 0.
+```
+spp > sec 1;add ring 0
+recv:6:{addring0}
+spp > sec 1;status
+recv:6:{Client ID 1 Idling
+1
+port id: 0,on,PHY,outport: -99
+port id: 1,on,PHY,outport: -99
+port id: 2,on,RING(0),outport: -99
+}
+```
 
+To configure sec 1 and 2 forwarding thorugh ring 0,
+add the ring both of them and patch.
 ```
 spp > sec 1;add ring 0
 spp > sec 2;add ring 0
@@ -302,24 +365,26 @@ spp > sec 1;forward
 spp > sec 2;forward
 ```
 
+#### Configuration for Bi directional L2fwd
+
 ```
                                                                         __
-                                         ring 0                           |
-                                       +--------+                         |
-                      +-----------+ <--|  |  |  |<-- +-----------+        |
-                      |          3|    +--------+    |3          |        |
-                      |  spp_nfv  |                  |  spp_nfv  |        |
-                      |  (sec 1) 2|--> +--------+ -->|2 (sec 2)  |        |
-                      +-----------+    |  |  |  |    +-----------+        |
-                          ^            +--------+             ^           |
-                          |              ring 1               |           |
-                          v                                   v           |
+                                        ring 0                            |
+                                      +--------+                          |
+                    +------------+ <--|  |  |  |<-- +-----------+         |
+                    |          p3|    +--------+    |p3         |         |
+                    |  spp_nfv   |                  |  spp_nfv  |         |
+                    |  (sec 1) p2|--> +--------+ -->|p2 (sec 2) |         |
+                    +------------+    |  |  |  |    +-----------+         |
+                            ^         +--------+          ^               |
+                            |           ring 1            |               |
+                            v                             v               |
     +---+----------+--------------------------------------------------+   |
-    |   | primary  |        ^                               ^         |   |
-    |   +----------+        |                               :         |   |
-    |                       :                               :         |   |
-    |                       :                               |         |   |  host
-    |                       v                               v         |   |
+    |   | primary  |        ^                             ^           |   |
+    |   +----------+        |                             :           |   |
+    |                       :                             :           |   |
+    |                       :                             |           |   |  host
+    |                       v                             v           |   |
     |                  +--------------+            +--------------+   |   |
     |                  |  phy port 0  |            |  phy port 1  |   |   |
     +------------------+--------------+------------+--------------+---+ __|
@@ -329,11 +394,24 @@ spp > sec 2;forward
 
 ```
 
-### Configuration for L2fwd
+Add ring 0 and 1 for sec 1.
 
 ```
 spp > sec 1;add ring 0
 spp > sec 1;add ring 1
+spp > sec 1;status
+recv:6:{Client ID 1 Idling
+1
+port id: 0,on,PHY,outport: -99
+port id: 1,on,PHY,outport: -99
+port id: 2,on,RING(0),outport: -99
+port id: 3,on,RING(1),outport: -99
+}
+```
+
+Then, add also for sec 2 and patch.
+"p2" and "p3" inside of spp_nfv in the figure are port ids.
+```
 spp > sec 2;add ring 0
 spp > sec 2;add ring 1
 spp > sec 1;patch 0 2
@@ -344,8 +422,7 @@ spp > sec 1;forward
 spp > sec 2;forward
 ```
 
-Test Setup 4: Single NFV with VM through vhost pmd
---------------------------------------------------
+### Test Setup 4: Single NFV with VM through vhost pmd
 
 ```
                                                     __
@@ -355,14 +432,14 @@ Test Setup 4: Single NFV with VM through vhost pmd
                           |   +--------------+    |   |  guest 
                           |   |    spp_vm    |    |   |  192.168.122.51
                           |   |    (sec 2)   |    |   |
-                          |   |       0      |    |   |
+                          |   |      p0      |    |   |
                           +---+--------------+----+ __|
                                ^           :
                                |  virtio   |
                                |           V                          __
                            +--------------------+                       |
                            |      spp_nfv       |                       |
-                           |  2   (sec 1)       |                       |
+                           | p2   (sec 1)       |                       |
                            +--------------------+                       |
                                ^           :                            |
                                |           +---------- +                |
@@ -381,18 +458,23 @@ Test Setup 4: Single NFV with VM through vhost pmd
 
 ```
 
-### Configuration for Uni directional L2fwd
+#### Configuration for Uni directional L2fwd
+
+Remove vhost port "/tmp/sock0" before starting VM if exists.
 
 ```sh
-[rm –rf /tmp/sock0]
+$ rm /tmp/sock0
 ```
 
+Then, add sock0 from spp controller.
 ```
-spp > sec 0;add vhost 0
+spp > sec 1;add vhost 0
 ```
 
-[start VM]
+Start VM and run spp_vm with sec id 2 inside VM.
+You can find sec 2 from spp controller after spp_vm is launched.
 
+Configure patch.
 ```
 spp > sec 1;patch 0 2
 spp > sec 1;patch 2 1
@@ -402,10 +484,9 @@ spp > sec 2;forward
 ```
 
 
-Optimizing qemu performance
----------------------------
+### Optimizing qemu performance
 
-First find out the PID for qemu-system-x86 process
+First, find out the PID for qemu-system-x86 process.
 
 ```sh
 $ ps ea
@@ -413,7 +494,7 @@ $ ps ea
 192606 pts/11   Sl+    4:42 ./x86_64-softmmu/qemu-system-x86_64 -cpu host -enable-kvm -object memory-backend-file,id=mem,siz
 ```
 
-Using pstree to list out qemu-system-x86_64 threads:-
+Using `pstree` to list out qemu-system-x86_64 threads.
 
 ```sh
 $ pstree -p 192606
@@ -424,7 +505,7 @@ qemu-system-x86(192606)--+--{qemu-system-x8}(192607)
                          |--{qemu-system-x8}(192626)
 ```
 
-To Optimize, use taskset to pin each thread:-
+To Optimize, use `taskset` to pin each thread
 
 ```sh
 $ sudo taskset -pc 4 192623
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [spp] [PATCH 1/6] Update command line examples
  2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
                   ` (4 preceding siblings ...)
  2017-08-20 16:42 ` [spp] [PATCH 6/6] Refactor for misc update as followings ogawa.yasufumi
@ 2017-08-23 11:34 ` Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2017-08-23 11:34 UTC (permalink / raw)
  To: ogawa.yasufumi, gerald.rogers, sy.jong.choi, spp

On 8/20/2017 5:42 PM, ogawa.yasufumi@lab.ntt.co.jp wrote:
> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
> 
> * Add code block directive for command line examples.
> 
> * Add '$' at the head of command line
> 
> Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Hi Yasufumi,

Thank you for the documentation clean-up!

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-23 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-20 16:42 [spp] [PATCH 1/6] Update command line examples ogawa.yasufumi
2017-08-20 16:42 ` [spp] [PATCH 2/6] Update diagrams ogawa.yasufumi
2017-08-20 16:42 ` [spp] [PATCH 3/6] Add table of contents ogawa.yasufumi
2017-08-20 16:42 ` [spp] [PATCH 4/6] Update markdown directives ogawa.yasufumi
2017-08-20 16:42 ` [spp] [PATCH 5/6] Correct assignment of secondary ID ogawa.yasufumi
2017-08-20 16:42 ` [spp] [PATCH 6/6] Refactor for misc update as followings ogawa.yasufumi
2017-08-23 11:34 ` [spp] [PATCH 1/6] Update command line examples Ferruh Yigit

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).