0001 .. SPDX-License-Identifier: GPL-2.0+
0002
0003 =================================================================
0004 Linux Base Driver for Intel(R) Ethernet Adaptive Virtual Function
0005 =================================================================
0006
0007 Intel Ethernet Adaptive Virtual Function Linux driver.
0008 Copyright(c) 2013-2018 Intel Corporation.
0009
0010 Contents
0011 ========
0012
0013 - Overview
0014 - Identifying Your Adapter
0015 - Additional Configurations
0016 - Known Issues/Troubleshooting
0017 - Support
0018
0019 Overview
0020 ========
0021
0022 This file describes the iavf Linux Base Driver. This driver was formerly
0023 called i40evf.
0024
0025 The iavf driver supports the below mentioned virtual function devices and
0026 can only be activated on kernels running the i40e or newer Physical Function
0027 (PF) driver compiled with CONFIG_PCI_IOV. The iavf driver requires
0028 CONFIG_PCI_MSI to be enabled.
0029
0030 The guest OS loading the iavf driver must support MSI-X interrupts.
0031
0032 Identifying Your Adapter
0033 ========================
0034
0035 The driver in this kernel is compatible with devices based on the following:
0036 * Intel(R) XL710 X710 Virtual Function
0037 * Intel(R) X722 Virtual Function
0038 * Intel(R) XXV710 Virtual Function
0039 * Intel(R) Ethernet Adaptive Virtual Function
0040
0041 For the best performance, make sure the latest NVM/FW is installed on your
0042 device.
0043
0044 For information on how to identify your adapter, and for the latest NVM/FW
0045 images and Intel network drivers, refer to the Intel Support website:
0046 https://www.intel.com/support
0047
0048
0049 Additional Features and Configurations
0050 ======================================
0051
0052 Viewing Link Messages
0053 ---------------------
0054 Link messages will not be displayed to the console if the distribution is
0055 restricting system messages. In order to see network driver link messages on
0056 your console, set dmesg to eight by entering the following::
0057
0058 # dmesg -n 8
0059
0060 NOTE:
0061 This setting is not saved across reboots.
0062
0063 ethtool
0064 -------
0065 The driver utilizes the ethtool interface for driver configuration and
0066 diagnostics, as well as displaying statistical information. The latest ethtool
0067 version is required for this functionality. Download it at:
0068 https://www.kernel.org/pub/software/network/ethtool/
0069
0070 Setting VLAN Tag Stripping
0071 --------------------------
0072 If you have applications that require Virtual Functions (VFs) to receive
0073 packets with VLAN tags, you can disable VLAN tag stripping for the VF. The
0074 Physical Function (PF) processes requests issued from the VF to enable or
0075 disable VLAN tag stripping. Note that if the PF has assigned a VLAN to a VF,
0076 then requests from that VF to set VLAN tag stripping will be ignored.
0077
0078 To enable/disable VLAN tag stripping for a VF, issue the following command
0079 from inside the VM in which you are running the VF::
0080
0081 # ethtool -K <if_name> rxvlan on/off
0082
0083 or alternatively::
0084
0085 # ethtool --offload <if_name> rxvlan on/off
0086
0087 Adaptive Virtual Function
0088 -------------------------
0089 Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to
0090 adapt to changing feature sets of the physical function driver (PF) with which
0091 it is associated. This allows system administrators to update a PF without
0092 having to update all the VFs associated with it. All AVFs have a single common
0093 device ID and branding string.
0094
0095 AVFs have a minimum set of features known as "base mode," but may provide
0096 additional features depending on what features are available in the PF with
0097 which the AVF is associated. The following are base mode features:
0098
0099 - 4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs)
0100 for Tx/Rx
0101 - i40e descriptors and ring format
0102 - Descriptor write-back completion
0103 - 1 control queue, with i40e descriptors, CSRs and ring format
0104 - 5 MSI-X interrupt vectors and corresponding i40e CSRs
0105 - 1 Interrupt Throttle Rate (ITR) index
0106 - 1 Virtual Station Interface (VSI) per VF
0107 - 1 Traffic Class (TC), TC0
0108 - Receive Side Scaling (RSS) with 64 entry indirection table and key,
0109 configured through the PF
0110 - 1 unicast MAC address reserved per VF
0111 - 16 MAC address filters for each VF
0112 - Stateless offloads - non-tunneled checksums
0113 - AVF device ID
0114 - HW mailbox is used for VF to PF communications (including on Windows)
0115
0116 IEEE 802.1ad (QinQ) Support
0117 ---------------------------
0118 The IEEE 802.1ad standard, informally known as QinQ, allows for multiple VLAN
0119 IDs within a single Ethernet frame. VLAN IDs are sometimes referred to as
0120 "tags," and multiple VLAN IDs are thus referred to as a "tag stack." Tag stacks
0121 allow L2 tunneling and the ability to segregate traffic within a particular
0122 VLAN ID, among other uses.
0123
0124 The following are examples of how to configure 802.1ad (QinQ)::
0125
0126 # ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24
0127 # ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371
0128
0129 Where "24" and "371" are example VLAN IDs.
0130
0131 NOTES:
0132 Receive checksum offloads, cloud filters, and VLAN acceleration are not
0133 supported for 802.1ad (QinQ) packets.
0134
0135 Application Device Queues (ADq)
0136 -------------------------------
0137 Application Device Queues (ADq) allows you to dedicate one or more queues to a
0138 specific application. This can reduce latency for the specified application,
0139 and allow Tx traffic to be rate limited per application. Follow the steps below
0140 to set ADq.
0141
0142 Requirements:
0143
0144 - The sch_mqprio, act_mirred and cls_flower modules must be loaded
0145 - The latest version of iproute2
0146 - If another driver (for example, DPDK) has set cloud filters, you cannot
0147 enable ADQ
0148 - Depending on the underlying PF device, ADQ cannot be enabled when the
0149 following features are enabled:
0150
0151 + Data Center Bridging (DCB)
0152 + Multiple Functions per Port (MFP)
0153 + Sideband Filters
0154
0155 1. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.
0156 The shaper bw_rlimit parameter is optional.
0157
0158 Example: Sets up two tcs, tc0 and tc1, with 16 queues each and max tx rate set
0159 to 1Gbit for tc0 and 3Gbit for tc1.
0160
0161 ::
0162
0163 tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
0164 queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit
0165 max_rate 1Gbit 3Gbit
0166
0167 map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1
0168 sets priorities 0-3 to use tc0 and 4-7 to use tc1)
0169
0170 queues: for each tc, <num queues>@<offset> (e.g. queues 16@0 16@16 assigns
0171 16 queues to tc0 at offset 0 and 16 queues to tc1 at offset 16. Max total
0172 number of queues for all tcs is 64 or number of cores, whichever is lower.)
0173
0174 hw 1 mode channel: ‘channel’ with ‘hw’ set to 1 is a new new hardware
0175 offload mode in mqprio that makes full use of the mqprio options, the
0176 TCs, the queue configurations, and the QoS parameters.
0177
0178 shaper bw_rlimit: for each tc, sets minimum and maximum bandwidth rates.
0179 Totals must be equal or less than port speed.
0180
0181 For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network
0182 monitoring tools such as ``ifstat`` or ``sar -n DEV [interval] [number of samples]``
0183
0184 NOTE:
0185 Setting up channels via ethtool (ethtool -L) is not supported when the
0186 TCs are configured using mqprio.
0187
0188 2. Enable HW TC offload on interface::
0189
0190 # ethtool -K <interface> hw-tc-offload on
0191
0192 3. Apply TCs to ingress (RX) flow of interface::
0193
0194 # tc qdisc add dev <interface> ingress
0195
0196 NOTES:
0197 - Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory
0198 - ADq is not compatible with cloud filters
0199 - Setting up channels via ethtool (ethtool -L) is not supported when the TCs
0200 are configured using mqprio
0201 - You must have iproute2 latest version
0202 - NVM version 6.01 or later is required
0203 - ADq cannot be enabled when any the following features are enabled: Data
0204 Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband Filters
0205 - If another driver (for example, DPDK) has set cloud filters, you cannot
0206 enable ADq
0207 - Tunnel filters are not supported in ADq. If encapsulated packets do arrive
0208 in non-tunnel mode, filtering will be done on the inner headers. For example,
0209 for VXLAN traffic in non-tunnel mode, PCTYPE is identified as a VXLAN
0210 encapsulated packet, outer headers are ignored. Therefore, inner headers are
0211 matched.
0212 - If a TC filter on a PF matches traffic over a VF (on the PF), that traffic
0213 will be routed to the appropriate queue of the PF, and will not be passed on
0214 the VF. Such traffic will end up getting dropped higher up in the TCP/IP
0215 stack as it does not match PF address data.
0216 - If traffic matches multiple TC filters that point to different TCs, that
0217 traffic will be duplicated and sent to all matching TC queues. The hardware
0218 switch mirrors the packet to a VSI list when multiple filters are matched.
0219
0220
0221 Known Issues/Troubleshooting
0222 ============================
0223
0224 Bonding fails with VFs bound to an Intel(R) Ethernet Controller 700 series device
0225 ---------------------------------------------------------------------------------
0226 If you bind Virtual Functions (VFs) to an Intel(R) Ethernet Controller 700
0227 series based device, the VF slaves may fail when they become the active slave.
0228 If the MAC address of the VF is set by the PF (Physical Function) of the
0229 device, when you add a slave, or change the active-backup slave, Linux bonding
0230 tries to sync the backup slave's MAC address to the same MAC address as the
0231 active slave. Linux bonding will fail at this point. This issue will not occur
0232 if the VF's MAC address is not set by the PF.
0233
0234 Traffic Is Not Being Passed Between VM and Client
0235 -------------------------------------------------
0236 You may not be able to pass traffic between a client system and a
0237 Virtual Machine (VM) running on a separate host if the Virtual Function
0238 (VF, or Virtual NIC) is not in trusted mode and spoof checking is enabled
0239 on the VF. Note that this situation can occur in any combination of client,
0240 host, and guest operating system. For information on how to set the VF to
0241 trusted mode, refer to the section "VLAN Tag Packet Steering" in this
0242 readme document. For information on setting spoof checking, refer to the
0243 section "MAC and VLAN anti-spoofing feature" in this readme document.
0244
0245 Do not unload port driver if VF with active VM is bound to it
0246 -------------------------------------------------------------
0247 Do not unload a port's driver if a Virtual Function (VF) with an active Virtual
0248 Machine (VM) is bound to it. Doing so will cause the port to appear to hang.
0249 Once the VM shuts down, or otherwise releases the VF, the command will complete.
0250
0251 Using four traffic classes fails
0252 --------------------------------
0253 Do not try to reserve more than three traffic classes in the iavf driver. Doing
0254 so will fail to set any traffic classes and will cause the driver to write
0255 errors to stdout. Use a maximum of three queues to avoid this issue.
0256
0257 Multiple log error messages on iavf driver removal
0258 --------------------------------------------------
0259 If you have several VFs and you remove the iavf driver, several instances of
0260 the following log errors are written to the log::
0261
0262 Unable to send opcode 2 to PF, err I40E_ERR_QUEUE_EMPTY, aq_err ok
0263 Unable to send the message to VF 2 aq_err 12
0264 ARQ Overflow Error detected
0265
0266 Virtual machine does not get link
0267 ---------------------------------
0268 If the virtual machine has more than one virtual port assigned to it, and those
0269 virtual ports are bound to different physical ports, you may not get link on
0270 all of the virtual ports. The following command may work around the issue::
0271
0272 # ethtool -r <PF>
0273
0274 Where <PF> is the PF interface in the host, for example: p5p1. You may need to
0275 run the command more than once to get link on all virtual ports.
0276
0277 MAC address of Virtual Function changes unexpectedly
0278 ----------------------------------------------------
0279 If a Virtual Function's MAC address is not assigned in the host, then the VF
0280 (virtual function) driver will use a random MAC address. This random MAC
0281 address may change each time the VF driver is reloaded. You can assign a static
0282 MAC address in the host machine. This static MAC address will survive
0283 a VF driver reload.
0284
0285 Driver Buffer Overflow Fix
0286 --------------------------
0287 The fix to resolve CVE-2016-8105, referenced in Intel SA-00069
0288 https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00069.html
0289 is included in this and future versions of the driver.
0290
0291 Multiple Interfaces on Same Ethernet Broadcast Network
0292 ------------------------------------------------------
0293 Due to the default ARP behavior on Linux, it is not possible to have one system
0294 on two IP networks in the same Ethernet broadcast domain (non-partitioned
0295 switch) behave as expected. All Ethernet interfaces will respond to IP traffic
0296 for any IP address assigned to the system. This results in unbalanced receive
0297 traffic.
0298
0299 If you have multiple interfaces in a server, either turn on ARP filtering by
0300 entering::
0301
0302 # echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
0303
0304 NOTE:
0305 This setting is not saved across reboots. The configuration change can be
0306 made permanent by adding the following line to the file /etc/sysctl.conf::
0307
0308 net.ipv4.conf.all.arp_filter = 1
0309
0310 Another alternative is to install the interfaces in separate broadcast domains
0311 (either in different switches or in a switch partitioned to VLANs).
0312
0313 Rx Page Allocation Errors
0314 -------------------------
0315 'Page allocation failure. order:0' errors may occur under stress.
0316 This is caused by the way the Linux kernel reports this stressed condition.
0317
0318
0319 Support
0320 =======
0321 For general information, go to the Intel support website at:
0322
0323 https://support.intel.com
0324
0325 or the Intel Wired Networking project hosted by Sourceforge at:
0326
0327 https://sourceforge.net/projects/e1000
0328
0329 If an issue is identified with the released source code on the supported kernel
0330 with a supported adapter, email the specific information related to the issue
0331 to e1000-devel@lists.sf.net