767 lines · plain
1.. SPDX-License-Identifier: GPL-2.0+2 3=================================================================4Linux Base Driver for the Intel(R) Ethernet Controller 700 Series5=================================================================6 7Intel 40 Gigabit Linux driver.8Copyright(c) 1999-2018 Intel Corporation.9 10Contents11========12 13- Overview14- Identifying Your Adapter15- Intel(R) Ethernet Flow Director16- Additional Configurations17- Known Issues18- Support19 20 21Driver information can be obtained using ethtool, lspci, and ifconfig.22Instructions on updating ethtool can be found in the section Additional23Configurations later in this document.24 25For questions related to hardware requirements, refer to the documentation26supplied with your Intel adapter. All hardware requirements listed apply to use27with Linux.28 29 30Identifying Your Adapter31========================32The driver is compatible with devices based on the following:33 34 * Intel(R) Ethernet Controller X71035 * Intel(R) Ethernet Controller XL71036 * Intel(R) Ethernet Network Connection X72237 * Intel(R) Ethernet Controller XXV71038 39For the best performance, make sure the latest NVM/FW is installed on your40device.41 42For information on how to identify your adapter, and for the latest NVM/FW43images and Intel network drivers, refer to the Intel Support website:44https://www.intel.com/support45 46SFP+ and QSFP+ Devices47----------------------48For information about supported media, refer to this document:49https://www.intel.com/content/dam/www/public/us/en/documents/release-notes/xl710-ethernet-controller-feature-matrix.pdf50 51NOTE: Some adapters based on the Intel(R) Ethernet Controller 700 Series only52support Intel Ethernet Optics modules. On these adapters, other modules are not53supported and will not function. In all cases Intel recommends using Intel54Ethernet Optics; other modules may function but are not validated by Intel.55Contact Intel for supported media types.56 57NOTE: For connections based on Intel(R) Ethernet Controller 700 Series, support58is dependent on your system board. Please see your vendor for details.59 60NOTE: In systems that do not have adequate airflow to cool the adapter and61optical modules, you must use high temperature optical modules.62 63Virtual Functions (VFs)64-----------------------65Use sysfs to enable VFs. For example::66 67 #echo $num_vf_enabled > /sys/class/net/$dev/device/sriov_numvfs #enable VFs68 #echo 0 > /sys/class/net/$dev/device/sriov_numvfs #disable VFs69 70For example, the following instructions will configure PF eth0 and the first VF71on VLAN 10::72 73 $ ip link set dev eth0 vf 0 vlan 1074 75VLAN Tag Packet Steering76------------------------77Allows you to send all packets with a specific VLAN tag to a particular SR-IOV78virtual function (VF). Further, this feature allows you to designate a79particular VF as trusted, and allows that trusted VF to request selective80promiscuous mode on the Physical Function (PF).81 82To set a VF as trusted or untrusted, enter the following command in the83Hypervisor::84 85 # ip link set dev eth0 vf 1 trust [on|off]86 87Once the VF is designated as trusted, use the following commands in the VM to88set the VF to promiscuous mode.89 90::91 92 For promiscuous all:93 #ip link set eth2 promisc on94 Where eth2 is a VF interface in the VM95 96 For promiscuous Multicast:97 #ip link set eth2 allmulticast on98 Where eth2 is a VF interface in the VM99 100NOTE: By default, the ethtool priv-flag vf-true-promisc-support is set to101"off",meaning that promiscuous mode for the VF will be limited. To set the102promiscuous mode for the VF to true promiscuous and allow the VF to see all103ingress traffic, use the following command::104 105 #ethtool -set-priv-flags p261p1 vf-true-promisc-support on106 107The vf-true-promisc-support priv-flag does not enable promiscuous mode; rather,108it designates which type of promiscuous mode (limited or true) you will get109when you enable promiscuous mode using the ip link commands above. Note that110this is a global setting that affects the entire device. However,the111vf-true-promisc-support priv-flag is only exposed to the first PF of the112device. The PF remains in limited promiscuous mode (unless it is in MFP mode)113regardless of the vf-true-promisc-support setting.114 115Now add a VLAN interface on the VF interface::116 117 #ip link add link eth2 name eth2.100 type vlan id 100118 119Note that the order in which you set the VF to promiscuous mode and add the120VLAN interface does not matter (you can do either first). The end result in121this example is that the VF will get all traffic that is tagged with VLAN 100.122 123Intel(R) Ethernet Flow Director124-------------------------------125The Intel Ethernet Flow Director performs the following tasks:126 127- Directs receive packets according to their flows to different queues.128- Enables tight control on routing a flow in the platform.129- Matches flows and CPU cores for flow affinity.130- Supports multiple parameters for flexible flow classification and load131 balancing (in SFP mode only).132 133NOTE: The Linux i40e driver supports the following flow types: IPv4, TCPv4, and134UDPv4. For a given flow type, it supports valid combinations of IP addresses135(source or destination) and UDP/TCP ports (source and destination). For136example, you can supply only a source IP address, a source IP address and a137destination port, or any combination of one or more of these four parameters.138 139NOTE: The Linux i40e driver allows you to filter traffic based on a140user-defined flexible two-byte pattern and offset by using the ethtool user-def141and mask fields. Only L3 and L4 flow types are supported for user-defined142flexible filters. For a given flow type, you must clear all Intel Ethernet Flow143Director filters before changing the input set (for that flow type).144 145To enable or disable the Intel Ethernet Flow Director::146 147 # ethtool -K ethX ntuple <on|off>148 149When disabling ntuple filters, all the user programmed filters are flushed from150the driver cache and hardware. All needed filters must be re-added when ntuple151is re-enabled.152 153To add a filter that directs packet to queue 2, use -U or -N switch::154 155 # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \156 192.168.10.2 src-port 2000 dst-port 2001 action 2 [loc 1]157 158To set a filter using only the source and destination IP address::159 160 # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \161 192.168.10.2 action 2 [loc 1]162 163To see the list of filters currently present::164 165 # ethtool <-u|-n> ethX166 167Application Targeted Routing (ATR) Perfect Filters168--------------------------------------------------169ATR is enabled by default when the kernel is in multiple transmit queue mode.170An ATR Intel Ethernet Flow Director filter rule is added when a TCP-IP flow171starts and is deleted when the flow ends. When a TCP-IP Intel Ethernet Flow172Director rule is added from ethtool (Sideband filter), ATR is turned off by the173driver. To re-enable ATR, the sideband can be disabled with the ethtool -K174option. For example::175 176 ethtool -K [adapter] ntuple [off|on]177 178If sideband is re-enabled after ATR is re-enabled, ATR remains enabled until a179TCP-IP flow is added. When all TCP-IP sideband rules are deleted, ATR is180automatically re-enabled.181 182Packets that match the ATR rules are counted in fdir_atr_match stats in183ethtool, which also can be used to verify whether ATR rules still exist.184 185Sideband Perfect Filters186------------------------187Sideband Perfect Filters are used to direct traffic that matches specified188characteristics. They are enabled through ethtool's ntuple interface. To add a189new filter use the following command::190 191 ethtool -U <device> flow-type <type> src-ip <ip> dst-ip <ip> src-port <port> \192 dst-port <port> action <queue>193 194Where:195 <device> - the ethernet device to program196 <type> - can be ip4, tcp4, udp4, or sctp4197 <ip> - the ip address to match on198 <port> - the port number to match on199 <queue> - the queue to direct traffic towards (-1 discards matching traffic)200 201Use the following command to display all of the active filters::202 203 ethtool -u <device>204 205Use the following command to delete a filter::206 207 ethtool -U <device> delete <N>208 209Where <N> is the filter id displayed when printing all the active filters, and210may also have been specified using "loc <N>" when adding the filter.211 212The following example matches TCP traffic sent from 192.168.0.1, port 5300,213directed to 192.168.0.5, port 80, and sends it to queue 7::214 215 ethtool -U enp130s0 flow-type tcp4 src-ip 192.168.0.1 dst-ip 192.168.0.5 \216 src-port 5300 dst-port 80 action 7217 218For each flow-type, the programmed filters must all have the same matching219input set. For example, issuing the following two commands is acceptable::220 221 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7222 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.5 src-port 55 action 10223 224Issuing the next two commands, however, is not acceptable, since the first225specifies src-ip and the second specifies dst-ip::226 227 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7228 ethtool -U enp130s0 flow-type ip4 dst-ip 192.168.0.5 src-port 55 action 10229 230The second command will fail with an error. You may program multiple filters231with the same fields, using different values, but, on one device, you may not232program two tcp4 filters with different matching fields.233 234Matching on a sub-portion of a field is not supported by the i40e driver, thus235partial mask fields are not supported.236 237The driver also supports matching user-defined data within the packet payload.238This flexible data is specified using the "user-def" field of the ethtool239command in the following way:240 241+----------------------------+--------------------------+242| 31 28 24 20 16 | 15 12 8 4 0 |243+----------------------------+--------------------------+244| offset into packet payload | 2 bytes of flexible data |245+----------------------------+--------------------------+246 247For example,248 249::250 251 ... user-def 0x4FFFF ...252 253tells the filter to look 4 bytes into the payload and match that value against2540xFFFF. The offset is based on the beginning of the payload, and not the255beginning of the packet. Thus256 257::258 259 flow-type tcp4 ... user-def 0x8BEAF ...260 261would match TCP/IPv4 packets which have the value 0xBEAF 8 bytes into the262TCP/IPv4 payload.263 264Note that ICMP headers are parsed as 4 bytes of header and 4 bytes of payload.265Thus to match the first byte of the payload, you must actually add 4 bytes to266the offset. Also note that ip4 filters match both ICMP frames as well as raw267(unknown) ip4 frames, where the payload will be the L3 payload of the IP4 frame.268 269The maximum offset is 64. The hardware will only read up to 64 bytes of data270from the payload. The offset must be even because the flexible data is 2 bytes271long and must be aligned to byte 0 of the packet payload.272 273The user-defined flexible offset is also considered part of the input set and274cannot be programmed separately for multiple filters of the same type. However,275the flexible data is not part of the input set and multiple filters may use the276same offset but match against different data.277 278To create filters that direct traffic to a specific Virtual Function, use the279"action" parameter. Specify the action as a 64 bit value, where the lower 32280bits represents the queue number, while the next 8 bits represent which VF.281Note that 0 is the PF, so the VF identifier is offset by 1. For example::282 283 ... action 0x800000002 ...284 285specifies to direct traffic to Virtual Function 7 (8 minus 1) into queue 2 of286that VF.287 288Note that these filters will not break internal routing rules, and will not289route traffic that otherwise would not have been sent to the specified Virtual290Function.291 292Setting the link-down-on-close Private Flag293-------------------------------------------294When the link-down-on-close private flag is set to "on", the port's link will295go down when the interface is brought down using the ifconfig ethX down command.296 297Use ethtool to view and set link-down-on-close, as follows::298 299 ethtool --show-priv-flags ethX300 ethtool --set-priv-flags ethX link-down-on-close [on|off]301 302Viewing Link Messages303---------------------304Link messages will not be displayed to the console if the distribution is305restricting system messages. In order to see network driver link messages on306your console, set dmesg to eight by entering the following::307 308 dmesg -n 8309 310NOTE: This setting is not saved across reboots.311 312Jumbo Frames313------------314Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU)315to a value larger than the default value of 1500.316 317Use the ifconfig command to increase the MTU size. For example, enter the318following where <x> is the interface number::319 320 ifconfig eth<x> mtu 9000 up321 322Alternatively, you can use the ip command as follows::323 324 ip link set mtu 9000 dev eth<x>325 ip link set up dev eth<x>326 327This setting is not saved across reboots. The setting change can be made328permanent by adding 'MTU=9000' to the file::329 330 /etc/sysconfig/network-scripts/ifcfg-eth<x> // for RHEL331 /etc/sysconfig/network/<config_file> // for SLES332 333NOTE: The maximum MTU setting for Jumbo Frames is 9702. This value coincides334with the maximum Jumbo Frames size of 9728 bytes.335 336NOTE: This driver will attempt to use multiple page sized buffers to receive337each jumbo packet. This should help to avoid buffer starvation issues when338allocating receive packets.339 340ethtool341-------342The driver utilizes the ethtool interface for driver configuration and343diagnostics, as well as displaying statistical information. The latest ethtool344version is required for this functionality. Download it at:345https://www.kernel.org/pub/software/network/ethtool/346 347Supported ethtool Commands and Options for Filtering348----------------------------------------------------349-n --show-nfc350 Retrieves the receive network flow classification configurations.351 352rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6353 Retrieves the hash options for the specified network traffic type.354 355-N --config-nfc356 Configures the receive network flow classification.357 358rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r...359 Configures the hash options for the specified network traffic type.360 361udp4 UDP over IPv4362udp6 UDP over IPv6363 364f Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.365n Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.366 367Speed and Duplex Configuration368------------------------------369In addressing speed and duplex configuration issues, you need to distinguish370between copper-based adapters and fiber-based adapters.371 372In the default mode, an Intel(R) Ethernet Network Adapter using copper373connections will attempt to auto-negotiate with its link partner to determine374the best setting. If the adapter cannot establish link with the link partner375using auto-negotiation, you may need to manually configure the adapter and link376partner to identical settings to establish link and pass packets. This should377only be needed when attempting to link with an older switch that does not378support auto-negotiation or one that has been forced to a specific speed or379duplex mode. Your link partner must match the setting you choose. 1 Gbps speeds380and higher cannot be forced. Use the autonegotiation advertising setting to381manually set devices for 1 Gbps and higher.382 383NOTE: You cannot set the speed for devices based on the Intel(R) Ethernet384Network Adapter XXV710 based devices.385 386Speed, duplex, and autonegotiation advertising are configured through the387ethtool utility.388 389Caution: Only experienced network administrators should force speed and duplex390or change autonegotiation advertising manually. The settings at the switch must391always match the adapter settings. Adapter performance may suffer or your392adapter may not operate if you configure the adapter differently from your393switch.394 395An Intel(R) Ethernet Network Adapter using fiber-based connections, however,396will not attempt to auto-negotiate with its link partner since those adapters397operate only in full duplex and only at their native speed.398 399NAPI400----401NAPI (Rx polling mode) is supported in the i40e driver.402 403See :ref:`Documentation/networking/napi.rst <napi>` for more information.404 405Flow Control406------------407Ethernet Flow Control (IEEE 802.3x) can be configured with ethtool to enable408receiving and transmitting pause frames for i40e. When transmit is enabled,409pause frames are generated when the receive packet buffer crosses a predefined410threshold. When receive is enabled, the transmit unit will halt for the time411delay specified when a pause frame is received.412 413NOTE: You must have a flow control capable link partner.414 415Flow Control is on by default.416 417Use ethtool to change the flow control settings.418 419To enable or disable Rx or Tx Flow Control::420 421 ethtool -A eth? rx <on|off> tx <on|off>422 423Note: This command only enables or disables Flow Control if auto-negotiation is424disabled. If auto-negotiation is enabled, this command changes the parameters425used for auto-negotiation with the link partner.426 427To enable or disable auto-negotiation::428 429 ethtool -s eth? autoneg <on|off>430 431Note: Flow Control auto-negotiation is part of link auto-negotiation. Depending432on your device, you may not be able to change the auto-negotiation setting.433 434RSS Hash Flow435-------------436Allows you to set the hash bytes per flow type and any combination of one or437more options for Receive Side Scaling (RSS) hash byte configuration.438 439::440 441 # ethtool -N <dev> rx-flow-hash <type> <option>442 443Where <type> is:444 tcp4 signifying TCP over IPv4445 udp4 signifying UDP over IPv4446 tcp6 signifying TCP over IPv6447 udp6 signifying UDP over IPv6448And <option> is one or more of:449 s Hash on the IP source address of the Rx packet.450 d Hash on the IP destination address of the Rx packet.451 f Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.452 n Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.453 454MAC and VLAN anti-spoofing feature455----------------------------------456When a malicious driver attempts to send a spoofed packet, it is dropped by the457hardware and not transmitted.458NOTE: This feature can be disabled for a specific Virtual Function (VF)::459 460 ip link set <pf dev> vf <vf id> spoofchk {off|on}461 462IEEE 1588 Precision Time Protocol (PTP) Hardware Clock (PHC)463------------------------------------------------------------464Precision Time Protocol (PTP) is used to synchronize clocks in a computer465network. PTP support varies among Intel devices that support this driver. Use466"ethtool -T <netdev name>" to get a definitive list of PTP capabilities467supported by the device.468 469IEEE 802.1ad (QinQ) Support470---------------------------471The IEEE 802.1ad standard, informally known as QinQ, allows for multiple VLAN472IDs within a single Ethernet frame. VLAN IDs are sometimes referred to as473"tags," and multiple VLAN IDs are thus referred to as a "tag stack." Tag stacks474allow L2 tunneling and the ability to segregate traffic within a particular475VLAN ID, among other uses.476 477The following are examples of how to configure 802.1ad (QinQ)::478 479 ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24480 ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371481 482Where "24" and "371" are example VLAN IDs.483 484NOTES:485 Receive checksum offloads, cloud filters, and VLAN acceleration are not486 supported for 802.1ad (QinQ) packets.487 488VXLAN and GENEVE Overlay HW Offloading489--------------------------------------490Virtual Extensible LAN (VXLAN) allows you to extend an L2 network over an L3491network, which may be useful in a virtualized or cloud environment. Some492Intel(R) Ethernet Network devices perform VXLAN processing, offloading it from493the operating system. This reduces CPU utilization.494 495VXLAN offloading is controlled by the Tx and Rx checksum offload options496provided by ethtool. That is, if Tx checksum offload is enabled, and the497adapter has the capability, VXLAN offloading is also enabled.498 499Support for VXLAN and GENEVE HW offloading is dependent on kernel support of500the HW offloading features.501 502Multiple Functions per Port503---------------------------504Some adapters based on the Intel Ethernet Controller X710/XL710 support505multiple functions on a single physical port. Configure these functions through506the System Setup/BIOS.507 508Minimum TX Bandwidth is the guaranteed minimum data transmission bandwidth, as509a percentage of the full physical port link speed, that the partition will510receive. The bandwidth the partition is awarded will never fall below the level511you specify.512 513The range for the minimum bandwidth values is:5141 to ((100 minus # of partitions on the physical port) plus 1)515For example, if a physical port has 4 partitions, the range would be:5161 to ((100 - 4) + 1 = 97)517 518The Maximum Bandwidth percentage represents the maximum transmit bandwidth519allocated to the partition as a percentage of the full physical port link520speed. The accepted range of values is 1-100. The value is used as a limiter,521should you chose that any one particular function not be able to consume 100%522of a port's bandwidth (should it be available). The sum of all the values for523Maximum Bandwidth is not restricted, because no more than 100% of a port's524bandwidth can ever be used.525 526NOTE: X710/XXV710 devices fail to enable Max VFs (64) when Multiple Functions527per Port (MFP) and SR-IOV are enabled. An error from i40e is logged that says528"add vsi failed for VF N, aq_err 16". To workaround the issue, enable less than52964 virtual functions (VFs).530 531Data Center Bridging (DCB)532--------------------------533DCB is a configuration Quality of Service implementation in hardware. It uses534the VLAN priority tag (802.1p) to filter traffic. That means that there are 8535different priorities that traffic can be filtered into. It also enables536priority flow control (802.1Qbb) which can limit or eliminate the number of537dropped packets during network stress. Bandwidth can be allocated to each of538these priorities, which is enforced at the hardware level (802.1Qaz).539 540Adapter firmware implements LLDP and DCBX protocol agents as per 802.1AB and541802.1Qaz respectively. The firmware based DCBX agent runs in willing mode only542and can accept settings from a DCBX capable peer. Software configuration of543DCBX parameters via dcbtool/lldptool are not supported.544 545NOTE: Firmware LLDP can be disabled by setting the private flag disable-fw-lldp.546 547The i40e driver implements the DCB netlink interface layer to allow user-space548to communicate with the driver and query DCB configuration for the port.549 550NOTE:551The kernel assumes that TC0 is available, and will disable Priority Flow552Control (PFC) on the device if TC0 is not available. To fix this, ensure TC0 is553enabled when setting up DCB on your switch.554 555Interrupt Rate Limiting556-----------------------557:Valid Range: 0-235 (0=no limit)558 559The Intel(R) Ethernet Controller XL710 family supports an interrupt rate560limiting mechanism. The user can control, via ethtool, the number of561microseconds between interrupts.562 563Syntax::564 565 # ethtool -C ethX rx-usecs-high N566 567The range of 0-235 microseconds provides an effective range of 4,310 to 250,000568interrupts per second. The value of rx-usecs-high can be set independently of569rx-usecs and tx-usecs in the same ethtool command, and is also independent of570the adaptive interrupt moderation algorithm. The underlying hardware supports571granularity in 4-microsecond intervals, so adjacent values may result in the572same interrupt rate.573 574One possible use case is the following::575 576 # ethtool -C ethX adaptive-rx off adaptive-tx off rx-usecs-high 20 rx-usecs \577 5 tx-usecs 5578 579The above command would disable adaptive interrupt moderation, and allow a580maximum of 5 microseconds before indicating a receive or transmit was complete.581However, instead of resulting in as many as 200,000 interrupts per second, it582limits total interrupts per second to 50,000 via the rx-usecs-high parameter.583 584Performance Optimization585========================586Driver defaults are meant to fit a wide variety of workloads, but if further587optimization is required we recommend experimenting with the following settings.588 589NOTE: For better performance when processing small (64B) frame sizes, try590enabling Hyper threading in the BIOS in order to increase the number of logical591cores in the system and subsequently increase the number of queues available to592the adapter.593 594Virtualized Environments595------------------------5961. Disable XPS on both ends by using the included virt_perf_default script597or by running the following command as root::598 599 for file in `ls /sys/class/net/<ethX>/queues/tx-*/xps_cpus`;600 do echo 0 > $file; done601 6022. Using the appropriate mechanism (vcpupin) in the vm, pin the cpu's to603individual lcpu's, making sure to use a set of cpu's included in the604device's local_cpulist: /sys/class/net/<ethX>/device/local_cpulist.605 6063. Configure as many Rx/Tx queues in the VM as available. Do not rely on607the default setting of 1.608 609 610Non-virtualized Environments611----------------------------612Pin the adapter's IRQs to specific cores by disabling the irqbalance service613and using the included set_irq_affinity script. Please see the script's help614text for further options.615 616- The following settings will distribute the IRQs across all the cores evenly::617 618 # scripts/set_irq_affinity -x all <interface1> , [ <interface2>, ... ]619 620- The following settings will distribute the IRQs across all the cores that are621 local to the adapter (same NUMA node)::622 623 # scripts/set_irq_affinity -x local <interface1> ,[ <interface2>, ... ]624 625For very CPU intensive workloads, we recommend pinning the IRQs to all cores.626 627For IP Forwarding: Disable Adaptive ITR and lower Rx and Tx interrupts per628queue using ethtool.629 630- Setting rx-usecs and tx-usecs to 125 will limit interrupts to about 8000631 interrupts per second per queue.632 633::634 635 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 125 \636 tx-usecs 125637 638For lower CPU utilization: Disable Adaptive ITR and lower Rx and Tx interrupts639per queue using ethtool.640 641- Setting rx-usecs and tx-usecs to 250 will limit interrupts to about 4000642 interrupts per second per queue.643 644::645 646 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 250 \647 tx-usecs 250648 649For lower latency: Disable Adaptive ITR and ITR by setting Rx and Tx to 0 using650ethtool.651 652::653 654 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 0 \655 tx-usecs 0656 657Application Device Queues (ADq)658-------------------------------659Application Device Queues (ADq) allows you to dedicate one or more queues to a660specific application. This can reduce latency for the specified application,661and allow Tx traffic to be rate limited per application. Follow the steps below662to set ADq.663 6641. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.665The shaper bw_rlimit parameter is optional.666 667Example: Sets up two tcs, tc0 and tc1, with 16 queues each and max tx rate set668to 1Gbit for tc0 and 3Gbit for tc1.669 670::671 672 # tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1673 queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit674 max_rate 1Gbit 3Gbit675 676map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1677sets priorities 0-3 to use tc0 and 4-7 to use tc1)678 679queues: for each tc, <num queues>@<offset> (e.g. queues 16@0 16@16 assigns68016 queues to tc0 at offset 0 and 16 queues to tc1 at offset 16. Max total681number of queues for all tcs is 64 or number of cores, whichever is lower.)682 683hw 1 mode channel: ‘channel’ with ‘hw’ set to 1 is a new new hardware684offload mode in mqprio that makes full use of the mqprio options, the685TCs, the queue configurations, and the QoS parameters.686 687shaper bw_rlimit: for each tc, sets minimum and maximum bandwidth rates.688Totals must be equal or less than port speed.689 690For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network691monitoring tools such as `ifstat` or `sar -n DEV [interval] [number of samples]`692 6932. Enable HW TC offload on interface::694 695 # ethtool -K <interface> hw-tc-offload on696 6973. Apply TCs to ingress (RX) flow of interface::698 699 # tc qdisc add dev <interface> ingress700 701NOTES:702 - Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory.703 - ADq is not compatible with cloud filters.704 - Setting up channels via ethtool (ethtool -L) is not supported when the705 TCs are configured using mqprio.706 - You must have iproute2 latest version707 - NVM version 6.01 or later is required.708 - ADq cannot be enabled when any the following features are enabled: Data709 Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband710 Filters.711 - If another driver (for example, DPDK) has set cloud filters, you cannot712 enable ADq.713 - Tunnel filters are not supported in ADq. If encapsulated packets do714 arrive in non-tunnel mode, filtering will be done on the inner headers.715 For example, for VXLAN traffic in non-tunnel mode, PCTYPE is identified716 as a VXLAN encapsulated packet, outer headers are ignored. Therefore,717 inner headers are matched.718 - If a TC filter on a PF matches traffic over a VF (on the PF), that719 traffic will be routed to the appropriate queue of the PF, and will720 not be passed on the VF. Such traffic will end up getting dropped higher721 up in the TCP/IP stack as it does not match PF address data.722 - If traffic matches multiple TC filters that point to different TCs,723 that traffic will be duplicated and sent to all matching TC queues.724 The hardware switch mirrors the packet to a VSI list when multiple725 filters are matched.726 727 728Known Issues/Troubleshooting729============================730 731NOTE: 1 Gb devices based on the Intel(R) Ethernet Network Connection X722 do732not support the following features:733 734 * Data Center Bridging (DCB)735 * QOS736 * VMQ737 * SR-IOV738 * Task Encapsulation offload (VXLAN, NVGRE)739 * Energy Efficient Ethernet (EEE)740 * Auto-media detect741 742Unexpected Issues when the device driver and DPDK share a device743----------------------------------------------------------------744Unexpected issues may result when an i40e device is in multi driver mode and745the kernel driver and DPDK driver are sharing the device. This is because746access to the global NIC resources is not synchronized between multiple747drivers. Any change to the global NIC configuration (writing to a global748register, setting global configuration by AQ, or changing switch modes) will749affect all ports and drivers on the device. Loading DPDK with the750"multi-driver" module parameter may mitigate some of the issues.751 752TC0 must be enabled when setting up DCB on a switch753---------------------------------------------------754The kernel assumes that TC0 is available, and will disable Priority Flow755Control (PFC) on the device if TC0 is not available. To fix this, ensure TC0 is756enabled when setting up DCB on your switch.757 758 759Support760=======761For general information, go to the Intel support website at:762https://www.intel.com/support/763 764If an issue is identified with the released source code on a supported kernel765with a supported adapter, email the specific information related to the issue766to intel-wired-lan@lists.osuosl.org.767