2 Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
15 * Neither the name of Intel Corporation nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 Driver for VM Emulated Devices
32 ==============================
34 The DPDK EM poll mode driver supports the following emulated devices:
36 * qemu-kvm emulated Intel® 82540EM Gigabit Ethernet Controller (qemu e1000 device)
38 * VMware* emulated Intel® 82545EM Gigabit Ethernet Controller
40 * VMware emulated Intel® 8274L Gigabit Ethernet Controller.
45 The validated hypervisors are:
47 * KVM (Kernel Virtual Machine) with Qemu, version 0.14.0
49 * KVM (Kernel Virtual Machine) with Qemu, version 0.15.1
51 * VMware ESXi 5.0, Update 1
53 Recommended Guest Operating System in Virtual Machine
54 -----------------------------------------------------
56 The recommended guest operating system in a virtualized environment is:
60 For supported kernel versions, refer to the *DPDK Release Notes*.
62 Setting Up a KVM Virtual Machine
63 --------------------------------
65 The following describes a target environment:
67 * Host Operating System: Fedora 14
69 * Hypervisor: KVM (Kernel Virtual Machine) with Qemu version, 0.14.0
71 * Guest Operating System: Fedora 14
73 * Linux Kernel Version: Refer to the DPDK Getting Started Guide
75 * Target Applications: testpmd
77 The setup procedure is as follows:
79 #. Download qemu-kvm-0.14.0 from
80 `http://sourceforge.net/projects/kvm/files/qemu-kvm/ <http://sourceforge.net/projects/kvm/files/qemu-kvm/>`_
81 and install it in the Host OS using the following steps:
83 When using a recent kernel (2.6.25+) with kvm modules included:
85 .. code-block:: console
87 tar xzf qemu-kvm-release.tar.gz cd qemu-kvm-release
88 ./configure --prefix=/usr/local/kvm
91 sudo /sbin/modprobe kvm-intel
93 When using an older kernel or a kernel from a distribution without the kvm modules,
94 you must download (from the same link), compile and install the modules yourself:
96 .. code-block:: console
98 tar xjf kvm-kmod-release.tar.bz2
103 sudo /sbin/modprobe kvm-intel
105 Note that qemu-kvm installs in the /usr/local/bin directory.
107 For more details about KVM configuration and usage, please refer to:
108 `http://www.linux-kvm.org/page/HOWTO1 <http://www.linux-kvm.org/page/HOWTO1>`_.
110 #. Create a Virtual Machine and install Fedora 14 on the Virtual Machine.
111 This is referred to as the Guest Operating System (Guest OS).
113 #. Start the Virtual Machine with at least one emulated e1000 device.
117 The Qemu provides several choices for the emulated network device backend.
118 Most commonly used is a TAP networking backend that uses a TAP networking device in the host.
119 For more information about Qemu supported networking backends and different options for configuring networking at Qemu,
122 — `http://www.linux-kvm.org/page/Networking <http://www.linux-kvm.org/page/Networking>`_
124 — `http://wiki.qemu.org/Documentation/Networking <http://wiki.qemu.org/Documentation/Networking>`_
126 — `http://qemu.weilnetz.de/qemu-doc.html <http://qemu.weilnetz.de/qemu-doc.html>`_
128 For example, to start a VM with two emulated e1000 devices, issue the following command:
130 .. code-block:: console
132 /usr/local/kvm/bin/qemu-system-x86_64 -cpu host -smp 4 -hda qemu1.raw -m 1024
133 -net nic,model=e1000,vlan=1,macaddr=DE:AD:1E:00:00:01
134 -net tap,vlan=1,ifname=tapvm01,script=no,downscript=no
135 -net nic,model=e1000,vlan=2,macaddr=DE:AD:1E:00:00:02
136 -net tap,vlan=2,ifname=tapvm02,script=no,downscript=no
140 — -m = memory to assign
142 — -smp = number of smp cores
144 — -hda = virtual disk image
146 This command starts a new virtual machine with two emulated 82540EM devices,
147 backed up with two TAP networking host interfaces, tapvm01 and tapvm02.
149 .. code-block:: console
155 #. Configure your TAP networking interfaces using ip/ifconfig tools.
157 #. Log in to the guest OS and check that the expected emulated devices exist:
159 .. code-block:: console
162 00:04.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
163 00:05.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
165 #. Install the DPDK and run testpmd.
167 Known Limitations of Emulated Devices
168 -------------------------------------
170 The following are known limitations:
172 #. The Qemu e1000 RX path does not support multiple descriptors/buffers per packet.
173 Therefore, rte_mbuf should be big enough to hold the whole packet.
174 For example, to allow testpmd to receive jumbo frames, use the following:
176 testpmd [options] -- --mbuf-size=<your-max-packet-size>
178 #. Qemu e1000 does not validate the checksum of incoming packets.