brintos

brintos / linux-shallow public Read only

0
0
Text · 13.2 KiB · eb926c3 Raw
327 lines · plain
1.. SPDX-License-Identifier: GPL-2.0+2 3=================================================================4Linux Base Driver for Intel(R) Ethernet Adaptive Virtual Function5=================================================================6 7Intel Ethernet Adaptive Virtual Function Linux driver.8Copyright(c) 2013-2018 Intel Corporation.9 10Contents11========12 13- Overview14- Identifying Your Adapter15- Additional Configurations16- Known Issues/Troubleshooting17- Support18 19Overview20========21 22This file describes the iavf Linux Base Driver. This driver was formerly23called i40evf.24 25The iavf driver supports the below mentioned virtual function devices and26can only be activated on kernels running the i40e or newer Physical Function27(PF) driver compiled with CONFIG_PCI_IOV.  The iavf driver requires28CONFIG_PCI_MSI to be enabled.29 30The guest OS loading the iavf driver must support MSI-X interrupts.31 32Identifying Your Adapter33========================34 35The driver in this kernel is compatible with devices based on the following:36 * Intel(R) XL710 X710 Virtual Function37 * Intel(R) X722 Virtual Function38 * Intel(R) XXV710 Virtual Function39 * Intel(R) Ethernet Adaptive Virtual Function40 41For the best performance, make sure the latest NVM/FW is installed on your42device.43 44For information on how to identify your adapter, and for the latest NVM/FW45images and Intel network drivers, refer to the Intel Support website:46https://www.intel.com/support47 48 49Additional Features and Configurations50======================================51 52Viewing Link Messages53---------------------54Link messages will not be displayed to the console if the distribution is55restricting system messages. In order to see network driver link messages on56your console, set dmesg to eight by entering the following::57 58    # dmesg -n 859 60NOTE:61  This setting is not saved across reboots.62 63ethtool64-------65The driver utilizes the ethtool interface for driver configuration and66diagnostics, as well as displaying statistical information. The latest ethtool67version is required for this functionality. Download it at:68https://www.kernel.org/pub/software/network/ethtool/69 70Setting VLAN Tag Stripping71--------------------------72If you have applications that require Virtual Functions (VFs) to receive73packets with VLAN tags, you can disable VLAN tag stripping for the VF. The74Physical Function (PF) processes requests issued from the VF to enable or75disable VLAN tag stripping. Note that if the PF has assigned a VLAN to a VF,76then requests from that VF to set VLAN tag stripping will be ignored.77 78To enable/disable VLAN tag stripping for a VF, issue the following command79from inside the VM in which you are running the VF::80 81    # ethtool -K <if_name> rxvlan on/off82 83or alternatively::84 85    # ethtool --offload <if_name> rxvlan on/off86 87Adaptive Virtual Function88-------------------------89Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to90adapt to changing feature sets of the physical function driver (PF) with which91it is associated. This allows system administrators to update a PF without92having to update all the VFs associated with it. All AVFs have a single common93device ID and branding string.94 95AVFs have a minimum set of features known as "base mode," but may provide96additional features depending on what features are available in the PF with97which the AVF is associated. The following are base mode features:98 99- 4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs)100  for Tx/Rx101- i40e descriptors and ring format102- Descriptor write-back completion103- 1 control queue, with i40e descriptors, CSRs and ring format104- 5 MSI-X interrupt vectors and corresponding i40e CSRs105- 1 Interrupt Throttle Rate (ITR) index106- 1 Virtual Station Interface (VSI) per VF107- 1 Traffic Class (TC), TC0108- Receive Side Scaling (RSS) with 64 entry indirection table and key,109  configured through the PF110- 1 unicast MAC address reserved per VF111- 16 MAC address filters for each VF112- Stateless offloads - non-tunneled checksums113- AVF device ID114- HW mailbox is used for VF to PF communications (including on Windows)115 116IEEE 802.1ad (QinQ) Support117---------------------------118The IEEE 802.1ad standard, informally known as QinQ, allows for multiple VLAN119IDs within a single Ethernet frame. VLAN IDs are sometimes referred to as120"tags," and multiple VLAN IDs are thus referred to as a "tag stack." Tag stacks121allow L2 tunneling and the ability to segregate traffic within a particular122VLAN ID, among other uses.123 124The following are examples of how to configure 802.1ad (QinQ)::125 126    # ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24127    # ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371128 129Where "24" and "371" are example VLAN IDs.130 131NOTES:132  Receive checksum offloads, cloud filters, and VLAN acceleration are not133  supported for 802.1ad (QinQ) packets.134 135Application Device Queues (ADq)136-------------------------------137Application Device Queues (ADq) allows you to dedicate one or more queues to a138specific application. This can reduce latency for the specified application,139and allow Tx traffic to be rate limited per application. Follow the steps below140to set ADq.141 142Requirements:143 144- The sch_mqprio, act_mirred and cls_flower modules must be loaded145- The latest version of iproute2146- If another driver (for example, DPDK) has set cloud filters, you cannot147  enable ADQ148- Depending on the underlying PF device, ADQ cannot be enabled when the149  following features are enabled:150 151  + Data Center Bridging (DCB)152  + Multiple Functions per Port (MFP)153  + Sideband Filters154 1551. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.156The shaper bw_rlimit parameter is optional.157 158Example: Sets up two tcs, tc0 and tc1, with 16 queues each and max tx rate set159to 1Gbit for tc0 and 3Gbit for tc1.160 161::162 163    tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1164    queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit165    max_rate 1Gbit 3Gbit166 167map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1168sets priorities 0-3 to use tc0 and 4-7 to use tc1)169 170queues: for each tc, <num queues>@<offset> (e.g. queues 16@0 16@16 assigns17116 queues to tc0 at offset 0 and 16 queues to tc1 at offset 16. Max total172number of queues for all tcs is 64 or number of cores, whichever is lower.)173 174hw 1 mode channel: ‘channel’ with ‘hw’ set to 1 is a new new hardware175offload mode in mqprio that makes full use of the mqprio options, the176TCs, the queue configurations, and the QoS parameters.177 178shaper bw_rlimit: for each tc, sets minimum and maximum bandwidth rates.179Totals must be equal or less than port speed.180 181For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network182monitoring tools such as ``ifstat`` or ``sar -n DEV [interval] [number of samples]``183 184NOTE:185  Setting up channels via ethtool (ethtool -L) is not supported when the186  TCs are configured using mqprio.187 1882. Enable HW TC offload on interface::189 190    # ethtool -K <interface> hw-tc-offload on191 1923. Apply TCs to ingress (RX) flow of interface::193 194    # tc qdisc add dev <interface> ingress195 196NOTES:197 - Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory198 - ADq is not compatible with cloud filters199 - Setting up channels via ethtool (ethtool -L) is not supported when the TCs200   are configured using mqprio201 - You must have iproute2 latest version202 - NVM version 6.01 or later is required203 - ADq cannot be enabled when any the following features are enabled: Data204   Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband Filters205 - If another driver (for example, DPDK) has set cloud filters, you cannot206   enable ADq207 - Tunnel filters are not supported in ADq. If encapsulated packets do arrive208   in non-tunnel mode, filtering will be done on the inner headers.  For example,209   for VXLAN traffic in non-tunnel mode, PCTYPE is identified as a VXLAN210   encapsulated packet, outer headers are ignored. Therefore, inner headers are211   matched.212 - If a TC filter on a PF matches traffic over a VF (on the PF), that traffic213   will be routed to the appropriate queue of the PF, and will not be passed on214   the VF. Such traffic will end up getting dropped higher up in the TCP/IP215   stack as it does not match PF address data.216 - If traffic matches multiple TC filters that point to different TCs, that217   traffic will be duplicated and sent to all matching TC queues.  The hardware218   switch mirrors the packet to a VSI list when multiple filters are matched.219 220 221Known Issues/Troubleshooting222============================223 224Bonding fails with VFs bound to an Intel(R) Ethernet Controller 700 series device225---------------------------------------------------------------------------------226If you bind Virtual Functions (VFs) to an Intel(R) Ethernet Controller 700227series based device, the VF slaves may fail when they become the active slave.228If the MAC address of the VF is set by the PF (Physical Function) of the229device, when you add a slave, or change the active-backup slave, Linux bonding230tries to sync the backup slave's MAC address to the same MAC address as the231active slave. Linux bonding will fail at this point. This issue will not occur232if the VF's MAC address is not set by the PF.233 234Traffic Is Not Being Passed Between VM and Client235-------------------------------------------------236You may not be able to pass traffic between a client system and a237Virtual Machine (VM) running on a separate host if the Virtual Function238(VF, or Virtual NIC) is not in trusted mode and spoof checking is enabled239on the VF. Note that this situation can occur in any combination of client,240host, and guest operating system. For information on how to set the VF to241trusted mode, refer to the section "VLAN Tag Packet Steering" in this242readme document. For information on setting spoof checking, refer to the243section "MAC and VLAN anti-spoofing feature" in this readme document.244 245Do not unload port driver if VF with active VM is bound to it246-------------------------------------------------------------247Do not unload a port's driver if a Virtual Function (VF) with an active Virtual248Machine (VM) is bound to it. Doing so will cause the port to appear to hang.249Once the VM shuts down, or otherwise releases the VF, the command will complete.250 251Using four traffic classes fails252--------------------------------253Do not try to reserve more than three traffic classes in the iavf driver. Doing254so will fail to set any traffic classes and will cause the driver to write255errors to stdout. Use a maximum of three queues to avoid this issue.256 257Multiple log error messages on iavf driver removal258--------------------------------------------------259If you have several VFs and you remove the iavf driver, several instances of260the following log errors are written to the log::261 262    Unable to send opcode 2 to PF, err I40E_ERR_QUEUE_EMPTY, aq_err ok263    Unable to send the message to VF 2 aq_err 12264    ARQ Overflow Error detected265 266Virtual machine does not get link267---------------------------------268If the virtual machine has more than one virtual port assigned to it, and those269virtual ports are bound to different physical ports, you may not get link on270all of the virtual ports. The following command may work around the issue::271 272    # ethtool -r <PF>273 274Where <PF> is the PF interface in the host, for example: p5p1. You may need to275run the command more than once to get link on all virtual ports.276 277MAC address of Virtual Function changes unexpectedly278----------------------------------------------------279If a Virtual Function's MAC address is not assigned in the host, then the VF280(virtual function) driver will use a random MAC address. This random MAC281address may change each time the VF driver is reloaded. You can assign a static282MAC address in the host machine. This static MAC address will survive283a VF driver reload.284 285Driver Buffer Overflow Fix286--------------------------287The fix to resolve CVE-2016-8105, referenced in Intel SA-00069288https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00069.html289is included in this and future versions of the driver.290 291Multiple Interfaces on Same Ethernet Broadcast Network292------------------------------------------------------293Due to the default ARP behavior on Linux, it is not possible to have one system294on two IP networks in the same Ethernet broadcast domain (non-partitioned295switch) behave as expected. All Ethernet interfaces will respond to IP traffic296for any IP address assigned to the system. This results in unbalanced receive297traffic.298 299If you have multiple interfaces in a server, either turn on ARP filtering by300entering::301 302    # echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter303 304NOTE:305  This setting is not saved across reboots. The configuration change can be306  made permanent by adding the following line to the file /etc/sysctl.conf::307 308    net.ipv4.conf.all.arp_filter = 1309 310Another alternative is to install the interfaces in separate broadcast domains311(either in different switches or in a switch partitioned to VLANs).312 313Rx Page Allocation Errors314-------------------------315'Page allocation failure. order:0' errors may occur under stress.316This is caused by the way the Linux kernel reports this stressed condition.317 318 319Support320=======321For general information, go to the Intel support website at:322https://support.intel.com323 324If an issue is identified with the released source code on the supported kernel325with a supported adapter, email the specific information related to the issue326to intel-wired-lan@lists.osuosl.org.327