]> git.proxmox.com Git - ovs.git/blame - INSTALL.DPDK
ofp-util: Generalize functions for parsing OF1.3+ properties.
[ovs.git] / INSTALL.DPDK
CommitLineData
8a9562d2
PS
1 Using Open vSwitch with DPDK
2 ============================
3
4Open vSwitch can use Intel(R) DPDK lib to operate entirely in
5userspace. This file explains how to install and use Open vSwitch in
6such a mode.
7
8The DPDK support of Open vSwitch is considered experimental.
9It has not been thoroughly tested.
10
11This version of Open vSwitch should be built manually with "configure"
12and "make".
13
14Building and Installing:
15------------------------
16
17Recommended to use DPDK 1.6.
18
19DPDK:
20cd DPDK
21update config/defconfig_x86_64-default-linuxapp-gcc so that dpdk generate single lib file.
22CONFIG_RTE_BUILD_COMBINE_LIBS=y
23
24make install T=x86_64-default-linuxapp-gcc
25For details refer to http://dpdk.org/
26
27Linux kernel:
28Refer to intel-dpdk-getting-started-guide.pdf for understanding
29DPDK kernel requirement.
30
31OVS:
32cd $(OVS_DIR)/openvswitch
33./boot.sh
34./configure --with-dpdk=$(DPDK_BUILD)
35make
36
37Refer to INSTALL.userspace for general requirements of building
38userspace OVS.
39
40Using the DPDK with ovs-vswitchd:
41---------------------------------
42
43First setup DPDK devices:
44 - insert uio.ko
45 - insert igb_uio.ko
46 e.g. insmod DPDK/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko
47 - mount hugetlbfs
48 e.g. mount -t hugetlbfs -o pagesize=1G none /mnt/huge/
49 - Bind network device to ibg_uio.
50 e.g. DPDK/tools/pci_unbind.py --bind=igb_uio eth1
51
52Ref to http://www.dpdk.org/doc/quick-start for verifying DPDK setup.
53
54Start vswitchd:
55DPDK configuration arguments can be passed to vswitchd via `--dpdk`
56argument. dpdk arg -c is ignored by ovs-dpdk, but it is required parameter
57for dpdk initialization.
58
59 e.g.
60 ./vswitchd/ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix:$DB_SOCK --pidfile --detach
61
62To use ovs-vswitchd with DPDK, create a bridge with datapath_type
63"netdev" in the configuration database. For example:
64
65 ovs-vsctl add-br br0
66 ovs-vsctl set bridge br0 datapath_type=netdev
67
68Now you can add dpdk devices. OVS expect DPDK device name start with dpdk
69and end with portid. vswitchd should print number of dpdk devices found.
70
71 ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
72
73Once first DPDK port is added vswitchd, it creates Polling thread and
74polls dpdk device in continuous loop. Therefore CPU utilization
75for that thread is always 100%.
76
77Restrictions:
78-------------
79
80 - This Support is for Physical NIC. I have tested with Intel NIC only.
81 - vswitchd userspace datapath does affine polling thread but it is
82 assumed that devices are on numa node 0. Therefore if device is
83 attached to non zero numa node switching performance would be
84 suboptimal.
85 - There are fixed number of polling thread and fixed number of per
86 device queues configured.
87 - Work with 1500 MTU, needs few changes in DPDK lib to fix this issue.
88 - Currently DPDK port does not make use any offload functionality.
89
90Bug Reporting:
91--------------
92
93Please report problems to bugs@openvswitch.org.