1 Using Open vSwitch with DPDK
2 ============================
4 Open vSwitch can use Intel(R) DPDK lib to operate entirely in
5 userspace. This file explains how to install and use Open vSwitch in
8 The DPDK support of Open vSwitch is considered experimental.
9 It has not been thoroughly tested.
11 This version of Open vSwitch should be built manually with "configure"
14 Building and Installing:
15 ------------------------
17 Recommended to use DPDK 1.6.
21 update config/defconfig_x86_64-default-linuxapp-gcc so that dpdk generate single lib file.
22 CONFIG_RTE_BUILD_COMBINE_LIBS=y
24 make install T=x86_64-default-linuxapp-gcc
25 For details refer to http://dpdk.org/
28 Refer to intel-dpdk-getting-started-guide.pdf for understanding
29 DPDK kernel requirement.
32 cd $(OVS_DIR)/openvswitch
34 ./configure --with-dpdk=$(DPDK_BUILD)
37 Refer to INSTALL.userspace for general requirements of building
40 Using the DPDK with ovs-vswitchd:
41 ---------------------------------
43 First setup DPDK devices:
46 e.g. insmod DPDK/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko
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
52 Ref to http://www.dpdk.org/doc/quick-start for verifying DPDK setup.
55 DPDK configuration arguments can be passed to vswitchd via `--dpdk`
56 argument. dpdk arg -c is ignored by ovs-dpdk, but it is required parameter
57 for dpdk initialization.
60 ./vswitchd/ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix:$DB_SOCK --pidfile --detach
62 To use ovs-vswitchd with DPDK, create a bridge with datapath_type
63 "netdev" in the configuration database. For example:
66 ovs-vsctl set bridge br0 datapath_type=netdev
68 Now you can add dpdk devices. OVS expect DPDK device name start with dpdk
69 and end with portid. vswitchd should print number of dpdk devices found.
71 ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
73 Once first DPDK port is added vswitchd, it creates Polling thread and
74 polls dpdk device in continuous loop. Therefore CPU utilization
75 for that thread is always 100%.
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
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.
93 Please report problems to bugs@openvswitch.org.