summaryrefslogtreecommitdiff
path: root/INSTALL.DPDK-ADVANCED.md
diff options
context:
space:
mode:
authorCiara Loftus <ciara.loftus@intel.com>2016-08-19 10:22:30 +0100
committerDaniele Di Proietto <diproiettod@vmware.com>2016-09-19 14:02:06 -0700
commit2d24d165d6a56bf5c0eb7015649cab688bcb2863 (patch)
treecb1827c99ba88ce7eb929cac50636274e7c8674c /INSTALL.DPDK-ADVANCED.md
parent70ec021ad9bb78eacb1dda86db606324eb37b86f (diff)
downloadopenvswitch-2d24d165d6a56bf5c0eb7015649cab688bcb2863.tar.gz
netdev-dpdk: Add new 'dpdkvhostuserclient' port type
The 'dpdkvhostuser' port type no longer supports both server and client mode. Instead, 'dpdkvhostuser' ports are always 'server' mode and 'dpdkvhostuserclient' ports are always 'client' mode. Suggested-by: Daniele Di Proietto <diproiettod@vmware.com> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Diffstat (limited to 'INSTALL.DPDK-ADVANCED.md')
-rw-r--r--INSTALL.DPDK-ADVANCED.md102
1 files changed, 58 insertions, 44 deletions
diff --git a/INSTALL.DPDK-ADVANCED.md b/INSTALL.DPDK-ADVANCED.md
index 857c805eb..d7b987356 100644
--- a/INSTALL.DPDK-ADVANCED.md
+++ b/INSTALL.DPDK-ADVANCED.md
@@ -461,6 +461,21 @@ For users wanting to do packet forwarding using kernel stack below are the steps
```
## <a name="vhost"></a> 6. Vhost Walkthrough
+
+Two types of vHost User ports are available in OVS:
+
+1. vhost-user (dpdkvhostuser ports)
+
+2. vhost-user-client (dpdkvhostuserclient ports)
+
+vHost User uses a client-server model. The server creates/manages/destroys the
+vHost User sockets, and the client connects to the server. Depending on which
+port type you use, dpdkvhostuser or dpdkvhostuserclient, a different
+configuration of the client-server model is used.
+
+For vhost-user ports, OVS DPDK acts as the server and QEMU the client.
+For vhost-user-client ports, OVS DPDK acts as the client and QEMU the server.
+
### 6.1 vhost-user
- Prerequisites:
@@ -570,49 +585,6 @@ For users wanting to do packet forwarding using kernel stack below are the steps
where `-L`: Changes the numbers of channels of the specified network device
and `combined`: Changes the number of multi-purpose channels.
- 4. OVS vHost client-mode & vHost reconnect (OPTIONAL)
-
- By default, OVS DPDK acts as the vHost socket server for dpdkvhostuser
- ports and QEMU acts as the vHost client. This means OVS creates and
- manages the vHost socket and QEMU is the client which connects to the
- vHost server (OVS). In QEMU v2.7 the option is available for QEMU to act
- as the vHost server meaning the roles can be reversed and OVS can become
- the vHost client. To enable client mode for a given dpdkvhostuserport,
- one must specify a valid 'vhost-server-path' like so:
-
- ```
- ovs-vsctl set Interface dpdkvhostuser0 options:vhost-server-path=/path/to/socket
- ```
-
- Setting this value automatically switches the port to client mode (from
- OVS' perspective). 'vhost-server-path' reflects the full path of the
- socket that has been or will be created by QEMU for the given vHost User
- port. Once a path is specified, the port will remain in 'client' mode
- for the remainder of it's lifetime ie. it cannot be reverted back to
- server mode.
-
- One must append ',server' to the 'chardev' arguments on the QEMU command
- line, to instruct QEMU to use vHost server mode for a given interface,
- like so:
-
- ````
- -chardev socket,id=char0,path=/path/to/socket,server
- ````
-
- If the corresponding dpdkvhostuser port has not yet been configured in
- OVS with vhost-server-path=/path/to/socket, QEMU will print a log
- similar to the following:
-
- `QEMU waiting for connection on: disconnected:unix:/path/to/socket,server`
-
- QEMU will wait until the port is created sucessfully in OVS to boot the
- VM.
-
- One benefit of using this mode is the ability for vHost ports to
- 'reconnect' in event of the switch crashing or being brought down. Once
- it is brought back up, the vHost ports will reconnect automatically and
- normal service will resume.
-
- VM Configuration with libvirt
* change the user/group, access control policty and restart libvirtd.
@@ -657,7 +629,49 @@ For users wanting to do packet forwarding using kernel stack below are the steps
Note: For information on libvirt and further tuning refer [libvirt].
-### 6.2 DPDK backend inside VM
+### 6.2 vhost-user-client
+
+ - Prerequisites:
+
+ QEMU version >= 2.7
+
+ - Adding vhost-user-client ports to Switch
+
+ ```
+ ovs-vsctl add-port br0 vhost-client-1 -- set Interface vhost-client-1
+ type=dpdkvhostuserclient options:vhost-server-path=/path/to/socket
+ ```
+
+ Unlike vhost-user ports, the name given to port does not govern the name of
+ the socket device. 'vhost-server-path' reflects the full path of the socket
+ that has been or will be created by QEMU for the given vHost User client
+ port.
+
+ - Adding vhost-user-client ports to VM
+
+ The same QEMU parameters as vhost-user ports described in section 6.1 can
+ be used, with one change necessary. One must append ',server' to the
+ 'chardev' arguments on the QEMU command line, to instruct QEMU to use vHost
+ server mode for a given interface, like so:
+
+ ````
+ -chardev socket,id=char0,path=/path/to/socket,server
+ ````
+
+ If the corresponding dpdkvhostuserclient port has not yet been configured
+ in OVS with vhost-server-path=/path/to/socket, QEMU will print a log
+ similar to the following:
+
+ `QEMU waiting for connection on: disconnected:unix:/path/to/socket,server`
+
+ QEMU will wait until the port is created sucessfully in OVS to boot the VM.
+
+ One benefit of using this mode is the ability for vHost ports to
+ 'reconnect' in event of the switch crashing or being brought down. Once it
+ is brought back up, the vHost ports will reconnect automatically and normal
+ service will resume.
+
+### 6.3 DPDK backend inside VM
Please note that additional configuration is required if you want to run
ovs-vswitchd with DPDK backend inside a QEMU virtual machine. Ovs-vswitchd