Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, x-fn-spp@sl.ntt-tx.co.jp
Cc: Hiroyuki Nakamura <nakamura.hioryuki@po.ntt-tx.co.jp>,
	Kentaro Watanabe <watanabe.kentaro.z01@as.ntt-tx.co.jp>,
	Naoki Takada <takada.naoki@lab.ntt.co.jp>
Subject: [spp] [PATCH 23/28] doc: add how to use vhost-user support
Date: Tue, 23 Jan 2018 09:30:16 +0900	[thread overview]
Message-ID: <20180123003021.28557-4-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20180123003021.28557-1-ogawa.yasufumi@lab.ntt.co.jp>

From: Hiroyuki Nakamura <nakamura.hioryuki@po.ntt-tx.co.jp>

add description on how to use vhost-user client mode.
* Add information on qemu-kvm version.
* Add and explan optional parameters of spp_vf.
* Update qemu parameter for vhost. (xml set by virsh)

Signed-off-by: Kentaro Watanabe <watanabe.kentaro.z01@as.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
 docs/spp_vf/how_to_use.md   | 24 ++++++++++++++++++++----
 docs/spp_vf/sample_usage.md | 10 ++++++----
 docs/spp_vf/setup_guide.md  | 10 +++++-----
 3 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/docs/spp_vf/how_to_use.md b/docs/spp_vf/how_to_use.md
index dee4465..32c1774 100644
--- a/docs/spp_vf/how_to_use.md
+++ b/docs/spp_vf/how_to_use.md
@@ -9,7 +9,7 @@ SPP_VF is a SR-IOV like network functionality for NFV.
 ## Environment
 
 * Ubuntu 16.04
-* qemu-kvm
+* qemu-kvm 2.7 or later
 * DPDK v17.05 or later
 
 ## Launch SPP
@@ -56,7 +56,10 @@ In `spp_vf`, spp secondary processes are launched by single command.
 Option of dpdk are refer to [dpdk documentation](http://dpdk.org/doc/guides/linux_gsg/build_sample_apps.html#running-a-sample-application).
 
 Options of `spp_vf` are
-  * TODO
+  * --client-id    : client id
+  * --config       : config file path
+  * -s             : Port for ip addr and spp secondary
+  * --vhost-client : vhost-user client enable setting
 
 Core assingment and network configuration are defined
 in JSON formatted config file.
@@ -65,7 +68,19 @@ config file (test/spp_config/spp_config/vf.json).
 
 ```sh
 $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \
--c 0x3ffd -n 4 --proc-type=secondary
+-c 0x3ffd -n 4 --proc-type=secondary \
+-- --client-id 1 -s 127.0.0.1:6666 --vhost-client
+```
+
+`--vhost-client` option is used when SPP is a client of vhost-user.
+By choosing not to use `--vhost-client` option,
+It may be possible to use SPP even in qemu (before 2.7 version)
+which can not be used as a vhost-user server.
+
+```sh
+$ 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
 ```
 
 You can also indicate which of config you use explicitly with
@@ -78,7 +93,8 @@ defined in each of config files.
 ```sh
 $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \
 -c 0x3ffd -n 4 --proc-type=secondary \
--- --config /path/to/config/spp_vf1.json
+-- --client-id 1 --config /path/to/config/spp_vf1.json \
+-s 127.0.0.1:6666 --vhost-client
 ```
 
 ### SPP VM
diff --git a/docs/spp_vf/sample_usage.md b/docs/spp_vf/sample_usage.md
index dcc051a..47abbec 100644
--- a/docs/spp_vf/sample_usage.md
+++ b/docs/spp_vf/sample_usage.md
@@ -41,17 +41,19 @@ launch secondary process after launch primary process.
   $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \
   -c 0x00fd -n 4 --proc-type=secondary \
   -- \
-  --process-id 1 \
+  --client-id 1 \
   --config /path/to/spp_vf1_without_cmtab.json \
-  -s 127.0.0.1:11111
+  -s 127.0.0.1:11111 \
+  --vhost-client
 
   # start secondary 2
   $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \
   -c 0x3f01 -n 4 --proc-type=secondary \
   -- \
-  --process-id 2 \
+  --client-id 2 \
   --config /path/to/spp_vf2_without_cmtab.json \
-  -s 127.0.0.1:11112
+  -s 127.0.0.1:11112 \
+  --vhost-client
   ```
 
 ### Setup network configuration for VMs
diff --git a/docs/spp_vf/setup_guide.md b/docs/spp_vf/setup_guide.md
index 4684cf3..f24e43e 100644
--- a/docs/spp_vf/setup_guide.md
+++ b/docs/spp_vf/setup_guide.md
@@ -3,7 +3,7 @@
 ## Environment
 
 * Ubuntu 16.04
-* qemu-kvm
+* qemu-kvm 2.7 or later
 * DPDK v17.05 or later
 
 ## Setting
@@ -205,15 +205,15 @@ $ virsh edit [VM_NAME]
 	    <qemu:arg value='node,memdev=mem'/>
 	    <qemu:arg value='-mem-prealloc'/>
 	    <qemu:arg value='-chardev'/>
-	    <qemu:arg value='socket,id=chr0,path=/tmp/sock0'/>
+	    <qemu:arg value='socket,id=chr0,path=/tmp/sock0,server'/>
 	    <qemu:arg value='-device'/>
-	    <qemu:arg value='virtio-net-pci,netdev=vhost-net0'/>
+	    <qemu:arg value='virtio-net-pci,netdev=vhost-net0,mac=52:54:00:12:34:56'/>
 	    <qemu:arg value='-netdev'/>
 	    <qemu:arg value='vhost-user,id=vhost-net0,chardev=chr0,vhostforce'/>
 	    <qemu:arg value='-chardev'/>
-	    <qemu:arg value='socket,id=chr1,path=/tmp/sock1'/>
+	    <qemu:arg value='socket,id=chr1,path=/tmp/sock1,server'/>
 	    <qemu:arg value='-device'/>
-	    <qemu:arg value='virtio-net-pci,netdev=vhost-net1'/>
+	    <qemu:arg value='virtio-net-pci,netdev=vhost-net1,mac=52:54:00:12:34:57'/>
 	    <qemu:arg value='-netdev'/>
 	    <qemu:arg value='vhost-user,id=vhost-net1,chardev=chr1,vhostforce'/>
 	  </qemu:commandline>
-- 
2.13.1

  parent reply	other threads:[~2018-01-23  0:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  0:30 [spp] [PATCH 20/28] doc: fix vm setup procedure for network config ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 21/28] doc: update jansson installation procedure ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 22/28] doc: fix required network configuration ogawa.yasufumi
2018-01-23  0:30 ` ogawa.yasufumi [this message]
2018-01-23  0:30 ` [spp] [PATCH 24/28] doc: add references to hugepages and isolcpus ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 25/28] doc: remove description on classifier_table ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 26/28] doc: fix typos and erros in texts ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 27/28] doc: update sample config section ogawa.yasufumi
2018-01-23  0:30 ` [spp] [PATCH 28/28] doc: align figure title position ogawa.yasufumi

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=20180123003021.28557-4-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=nakamura.hioryuki@po.ntt-tx.co.jp \
    --cc=spp@dpdk.org \
    --cc=takada.naoki@lab.ntt.co.jp \
    --cc=watanabe.kentaro.z01@as.ntt-tx.co.jp \
    --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).