1 .. SPDX-License-Identifier: GPL-2.0+
3 Linux* Base Driver for Intel(R) Ethernet Adaptive Virtual Function
4 ==================================================================
6 Intel Ethernet Adaptive Virtual Function Linux driver.
7 Copyright(c) 2013-2018 Intel Corporation.
12 - Identifying Your Adapter
13 - Additional Configurations
14 - Known Issues/Troubleshooting
17 This file describes the iavf Linux* Base Driver. This driver was formerly
20 The iavf driver supports the below mentioned virtual function devices and
21 can only be activated on kernels running the i40e or newer Physical Function
22 (PF) driver compiled with CONFIG_PCI_IOV. The iavf driver requires
23 CONFIG_PCI_MSI to be enabled.
25 The guest OS loading the iavf driver must support MSI-X interrupts.
27 Identifying Your Adapter
28 ========================
29 The driver in this kernel is compatible with devices based on the following:
30 * Intel(R) XL710 X710 Virtual Function
31 * Intel(R) X722 Virtual Function
32 * Intel(R) XXV710 Virtual Function
33 * Intel(R) Ethernet Adaptive Virtual Function
35 For the best performance, make sure the latest NVM/FW is installed on your
38 For information on how to identify your adapter, and for the latest NVM/FW
39 images and Intel network drivers, refer to the Intel Support website:
40 http://www.intel.com/support
43 Additional Features and Configurations
44 ======================================
48 Link messages will not be displayed to the console if the distribution is
49 restricting system messages. In order to see network driver link messages on
50 your console, set dmesg to eight by entering the following::
54 NOTE: This setting is not saved across reboots.
58 The driver utilizes the ethtool interface for driver configuration and
59 diagnostics, as well as displaying statistical information. The latest ethtool
60 version is required for this functionality. Download it at:
61 https://www.kernel.org/pub/software/network/ethtool/
63 Setting VLAN Tag Stripping
64 --------------------------
65 If you have applications that require Virtual Functions (VFs) to receive
66 packets with VLAN tags, you can disable VLAN tag stripping for the VF. The
67 Physical Function (PF) processes requests issued from the VF to enable or
68 disable VLAN tag stripping. Note that if the PF has assigned a VLAN to a VF,
69 then requests from that VF to set VLAN tag stripping will be ignored.
71 To enable/disable VLAN tag stripping for a VF, issue the following command
72 from inside the VM in which you are running the VF::
74 ethtool -K <if_name> rxvlan on/off
78 ethtool --offload <if_name> rxvlan on/off
80 Adaptive Virtual Function
81 -------------------------
82 Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to
83 adapt to changing feature sets of the physical function driver (PF) with which
84 it is associated. This allows system administrators to update a PF without
85 having to update all the VFs associated with it. All AVFs have a single common
86 device ID and branding string.
88 AVFs have a minimum set of features known as "base mode," but may provide
89 additional features depending on what features are available in the PF with
90 which the AVF is associated. The following are base mode features:
92 - 4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs)
94 - i40e descriptors and ring format.
95 - Descriptor write-back completion.
96 - 1 control queue, with i40e descriptors, CSRs and ring format.
97 - 5 MSI-X interrupt vectors and corresponding i40e CSRs.
98 - 1 Interrupt Throttle Rate (ITR) index.
99 - 1 Virtual Station Interface (VSI) per VF.
100 - 1 Traffic Class (TC), TC0
101 - Receive Side Scaling (RSS) with 64 entry indirection table and key,
102 configured through the PF.
103 - 1 unicast MAC address reserved per VF.
104 - 16 MAC address filters for each VF.
105 - Stateless offloads - non-tunneled checksums.
107 - HW mailbox is used for VF to PF communications (including on Windows).
109 IEEE 802.1ad (QinQ) Support
110 ---------------------------
111 The IEEE 802.1ad standard, informally known as QinQ, allows for multiple VLAN
112 IDs within a single Ethernet frame. VLAN IDs are sometimes referred to as
113 "tags," and multiple VLAN IDs are thus referred to as a "tag stack." Tag stacks
114 allow L2 tunneling and the ability to segregate traffic within a particular
115 VLAN ID, among other uses.
117 The following are examples of how to configure 802.1ad (QinQ)::
119 ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24
120 ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371
122 Where "24" and "371" are example VLAN IDs.
125 Receive checksum offloads, cloud filters, and VLAN acceleration are not
126 supported for 802.1ad (QinQ) packets.
128 Application Device Queues (ADq)
129 -------------------------------
130 Application Device Queues (ADq) allows you to dedicate one or more queues to a
131 specific application. This can reduce latency for the specified application,
132 and allow Tx traffic to be rate limited per application. Follow the steps below
135 1. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.
136 The shaper bw_rlimit parameter is optional.
138 Example: Sets up two tcs, tc0 and tc1, with 16 queues each and max tx rate set
139 to 1Gbit for tc0 and 3Gbit for tc1.
143 # tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
144 queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit
147 map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1
148 sets priorities 0-3 to use tc0 and 4-7 to use tc1)
150 queues: for each tc, <num queues>@<offset> (e.g. queues 16@0 16@16 assigns
151 16 queues to tc0 at offset 0 and 16 queues to tc1 at offset 16. Max total
152 number of queues for all tcs is 64 or number of cores, whichever is lower.)
154 hw 1 mode channel: ‘channel’ with ‘hw’ set to 1 is a new new hardware
155 offload mode in mqprio that makes full use of the mqprio options, the
156 TCs, the queue configurations, and the QoS parameters.
158 shaper bw_rlimit: for each tc, sets minimum and maximum bandwidth rates.
159 Totals must be equal or less than port speed.
161 For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network
162 monitoring tools such as ifstat or sar –n DEV [interval] [number of samples]
164 2. Enable HW TC offload on interface::
166 # ethtool -K <interface> hw-tc-offload on
168 3. Apply TCs to ingress (RX) flow of interface::
170 # tc qdisc add dev <interface> ingress
173 - Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory.
174 - ADq is not compatible with cloud filters.
175 - Setting up channels via ethtool (ethtool -L) is not supported when the TCs
176 are configured using mqprio.
177 - You must have iproute2 latest version
178 - NVM version 6.01 or later is required.
179 - ADq cannot be enabled when any the following features are enabled: Data
180 Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband Filters.
181 - If another driver (for example, DPDK) has set cloud filters, you cannot
183 - Tunnel filters are not supported in ADq. If encapsulated packets do arrive
184 in non-tunnel mode, filtering will be done on the inner headers. For example,
185 for VXLAN traffic in non-tunnel mode, PCTYPE is identified as a VXLAN
186 encapsulated packet, outer headers are ignored. Therefore, inner headers are
188 - If a TC filter on a PF matches traffic over a VF (on the PF), that traffic
189 will be routed to the appropriate queue of the PF, and will not be passed on
190 the VF. Such traffic will end up getting dropped higher up in the TCP/IP
191 stack as it does not match PF address data.
192 - If traffic matches multiple TC filters that point to different TCs, that
193 traffic will be duplicated and sent to all matching TC queues. The hardware
194 switch mirrors the packet to a VSI list when multiple filters are matched.
197 Known Issues/Troubleshooting
198 ============================
200 Traffic Is Not Being Passed Between VM and Client
201 -------------------------------------------------
202 You may not be able to pass traffic between a client system and a
203 Virtual Machine (VM) running on a separate host if the Virtual Function
204 (VF, or Virtual NIC) is not in trusted mode and spoof checking is enabled
205 on the VF. Note that this situation can occur in any combination of client,
206 host, and guest operating system. For information on how to set the VF to
207 trusted mode, refer to the section "VLAN Tag Packet Steering" in this
208 readme document. For information on setting spoof checking, refer to the
209 section "MAC and VLAN anti-spoofing feature" in this readme document.
211 Do not unload port driver if VF with active VM is bound to it
212 -------------------------------------------------------------
213 Do not unload a port's driver if a Virtual Function (VF) with an active Virtual
214 Machine (VM) is bound to it. Doing so will cause the port to appear to hang.
215 Once the VM shuts down, or otherwise releases the VF, the command will complete.
217 Virtual machine does not get link
218 ---------------------------------
219 If the virtual machine has more than one virtual port assigned to it, and those
220 virtual ports are bound to different physical ports, you may not get link on
221 all of the virtual ports. The following command may work around the issue::
225 Where <PF> is the PF interface in the host, for example: p5p1. You may need to
226 run the command more than once to get link on all virtual ports.
228 MAC address of Virtual Function changes unexpectedly
229 ----------------------------------------------------
230 If a Virtual Function's MAC address is not assigned in the host, then the VF
231 (virtual function) driver will use a random MAC address. This random MAC
232 address may change each time the VF driver is reloaded. You can assign a static
233 MAC address in the host machine. This static MAC address will survive
236 Driver Buffer Overflow Fix
237 --------------------------
238 The fix to resolve CVE-2016-8105, referenced in Intel SA-00069
239 https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00069.html
240 is included in this and future versions of the driver.
242 Multiple Interfaces on Same Ethernet Broadcast Network
243 ------------------------------------------------------
244 Due to the default ARP behavior on Linux, it is not possible to have one system
245 on two IP networks in the same Ethernet broadcast domain (non-partitioned
246 switch) behave as expected. All Ethernet interfaces will respond to IP traffic
247 for any IP address assigned to the system. This results in unbalanced receive
250 If you have multiple interfaces in a server, either turn on ARP filtering by
253 echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
255 NOTE: This setting is not saved across reboots. The configuration change can be
256 made permanent by adding the following line to the file /etc/sysctl.conf::
258 net.ipv4.conf.all.arp_filter = 1
260 Another alternative is to install the interfaces in separate broadcast domains
261 (either in different switches or in a switch partitioned to VLANs).
263 Rx Page Allocation Errors
264 -------------------------
265 'Page allocation failure. order:0' errors may occur under stress.
266 This is caused by the way the Linux kernel reports this stressed condition.
271 For general information, go to the Intel support website at:
273 https://support.intel.com
275 or the Intel Wired Networking project hosted by Sourceforge at:
277 https://sourceforge.net/projects/e1000
279 If an issue is identified with the released source code on the supported kernel
280 with a supported adapter, email the specific information related to the issue
281 to e1000-devel@lists.sf.net