blob: 35d4321714a0e05c1ff7bfd6c3c5824584b1fc01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
openvswitch-switch-dpdk
-----------------------
This package provides a DPDK enabled version of the OpenvSwitch vswitchd
binary; by default, the ovs-vswitchd binary from openvswitch-switch will
be used:
$ update-alternatives --query ovs-vswitchd
Name: ovs-vswitchd
Link: /usr/sbin/ovs-vswitchd
Status: auto
Best: /usr/lib/openvswitch-switch/ovs-vswitchd
Value: /usr/lib/openvswitch-switch/ovs-vswitchd
Alternative: /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
Priority: 50
Alternative: /usr/lib/openvswitch-switch/ovs-vswitchd
Priority: 100
DPDK provides fast packet processing in userspace, and has some specific
requirements in terms of system configuration.
DPDK has a minimum CPU feature set of SSE3, so is not appropriate for all
amd64 CPU types hence is not enabled by default.
To switch to the DPDK version:
sudo update-alternatives --set ovs-vswitchd \
/usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
sudo service openvswitch-switch restart
and to switch back:
sudo update-alternatives --set ovs-vswitchd \
/usr/lib/openvswitch-switch/ovs-vswitchd
sudo service openvswitch-switch restart
-- James Page <james.page@ubuntu.com> Tue, 21 Jul 2015 12:06:49 +0100
Since Open vSwitch >= 2.6 the configuration of DPDK features has changed.
Instead of providing DPDK_OPTS in /etc/default/openvswitch-switch one now has
to use ovs-vsctl to enter the config into the database.
An example basic configuration workflow might look like:
# Enable DPDK
$ ovs-vsctl set Open_vSwitch . "other_config:dpdk-init=true"
# run on cores 3,4 8,9
$ ovs-vsctl set Open_vSwitch . "other_config:dpdk-lcore-mask=0x318"
# Allocate 2G huge pages (not Numa node aware)
$ ovs-vsctl set Open_vSwitch . "other_config:dpdk-alloc-mem=2048"
# group/permissions for vhost-user sockets (required to work with libvirt/qemu)
$ ovs-vsctl set Open_vSwitch . \
"other_config:dpdk-extra=--vhost-owner libvirt-qemu:kvm --vhost-perm 0666"
There are also tunables like:
$ ovs-vsctl set Open_vSwitch . "other_config:pmd-cpu-mask=0x318"
$ ovs-vsctl set Open_vSwitch . "other_config:n-dpdk-rxqs=4"
Any of those changes require openvswitch to be restarted to take effect.
-- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 04 Oct 2016 11:17:12 +0200
|