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