e1000em.rst revision 97f17497
1..  BSD LICENSE
2    Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
3    All rights reserved.
4
5    Redistribution and use in source and binary forms, with or without
6    modification, are permitted provided that the following conditions
7    are met:
8
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
14    distribution.
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.
18
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.
30
31Driver for VM Emulated Devices
32==============================
33
34The DPDK EM poll mode driver supports the following emulated devices:
35
36*   qemu-kvm emulated Intel® 82540EM Gigabit Ethernet Controller (qemu e1000 device)
37
38*   VMware* emulated Intel® 82545EM Gigabit Ethernet Controller
39
40*   VMware emulated Intel® 8274L Gigabit Ethernet Controller.
41
42Validated Hypervisors
43---------------------
44
45The validated hypervisors are:
46
47*   KVM (Kernel Virtual Machine) with Qemu, version 0.14.0
48
49*   KVM (Kernel Virtual Machine) with Qemu, version 0.15.1
50
51*   VMware ESXi 5.0, Update 1
52
53Recommended Guest Operating System in Virtual Machine
54-----------------------------------------------------
55
56The recommended guest operating system in a virtualized environment is:
57
58*   Fedora* 18 (64-bit)
59
60For supported kernel versions, refer to the *DPDK Release Notes*.
61
62Setting Up a KVM Virtual Machine
63--------------------------------
64
65The following describes a target environment:
66
67*   Host Operating System: Fedora 14
68
69*   Hypervisor: KVM (Kernel Virtual Machine) with Qemu version, 0.14.0
70
71*   Guest Operating System: Fedora 14
72
73*   Linux Kernel Version: Refer to the DPDK Getting Started Guide
74
75*   Target Applications: testpmd
76
77The setup procedure is as follows:
78
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:
82
83    When using a recent kernel (2.6.25+) with kvm modules included:
84
85    .. code-block:: console
86
87        tar xzf qemu-kvm-release.tar.gz cd qemu-kvm-release
88        ./configure --prefix=/usr/local/kvm
89        make
90        sudo make install
91        sudo /sbin/modprobe kvm-intel
92
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:
95
96    .. code-block:: console
97
98        tar xjf kvm-kmod-release.tar.bz2
99        cd kvm-kmod-release
100        ./configure
101        make
102        sudo make install
103        sudo /sbin/modprobe kvm-intel
104
105    Note that qemu-kvm installs in the /usr/local/bin directory.
106
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>`_.
109
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).
112
113#.  Start the Virtual Machine with at least one emulated e1000 device.
114
115    .. note::
116
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,
120        please refer to:
121
122        — `http://www.linux-kvm.org/page/Networking <http://www.linux-kvm.org/page/Networking>`_
123
124        — `http://wiki.qemu.org/Documentation/Networking <http://wiki.qemu.org/Documentation/Networking>`_
125
126        — `http://qemu.weilnetz.de/qemu-doc.html <http://qemu.weilnetz.de/qemu-doc.html>`_
127
128        For example, to start a VM with two emulated e1000 devices, issue the following command:
129
130        .. code-block:: console
131
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
137
138        where:
139
140        — -m = memory to assign
141
142        — -smp = number of smp cores
143
144        — -hda = virtual disk image
145
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.
148
149        .. code-block:: console
150
151            # ip tuntap show
152            tapvm01: tap
153            tapvm02: tap
154
155#.  Configure your TAP networking interfaces using ip/ifconfig tools.
156
157#.  Log in to the guest OS and check that the expected emulated devices exist:
158
159    .. code-block:: console
160
161        # lspci -d 8086:100e
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)
164
165#.  Install the DPDK and run testpmd.
166
167Known Limitations of Emulated Devices
168-------------------------------------
169
170The following are known limitations:
171
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:
175
176    testpmd [options] -- --mbuf-size=<your-max-packet-size>
177
178#.  Qemu e1000 does not validate the checksum of incoming packets.
179
180#.  Qemu e1000 only supports one interrupt source, so link and Rx interrupt should be exclusive.
181
182#.  Qemu e1000 does not support interrupt auto-clear, application should disable interrupt immediately when woken up.
183