0001 .. SPDX-License-Identifier: GPL-2.0+
0002
0003 =================================================================
0004 Linux Base Driver for the Intel(R) Ethernet Controller 700 Series
0005 =================================================================
0006
0007 Intel 40 Gigabit Linux driver.
0008 Copyright(c) 1999-2018 Intel Corporation.
0009
0010 Contents
0011 ========
0012
0013 - Overview
0014 - Identifying Your Adapter
0015 - Intel(R) Ethernet Flow Director
0016 - Additional Configurations
0017 - Known Issues
0018 - Support
0019
0020
0021 Driver information can be obtained using ethtool, lspci, and ifconfig.
0022 Instructions on updating ethtool can be found in the section Additional
0023 Configurations later in this document.
0024
0025 For questions related to hardware requirements, refer to the documentation
0026 supplied with your Intel adapter. All hardware requirements listed apply to use
0027 with Linux.
0028
0029
0030 Identifying Your Adapter
0031 ========================
0032 The driver is compatible with devices based on the following:
0033
0034 * Intel(R) Ethernet Controller X710
0035 * Intel(R) Ethernet Controller XL710
0036 * Intel(R) Ethernet Network Connection X722
0037 * Intel(R) Ethernet Controller XXV710
0038
0039 For the best performance, make sure the latest NVM/FW is installed on your
0040 device.
0041
0042 For information on how to identify your adapter, and for the latest NVM/FW
0043 images and Intel network drivers, refer to the Intel Support website:
0044 https://www.intel.com/support
0045
0046 SFP+ and QSFP+ Devices
0047 ----------------------
0048 For information about supported media, refer to this document:
0049 https://www.intel.com/content/dam/www/public/us/en/documents/release-notes/xl710-ethernet-controller-feature-matrix.pdf
0050
0051 NOTE: Some adapters based on the Intel(R) Ethernet Controller 700 Series only
0052 support Intel Ethernet Optics modules. On these adapters, other modules are not
0053 supported and will not function. In all cases Intel recommends using Intel
0054 Ethernet Optics; other modules may function but are not validated by Intel.
0055 Contact Intel for supported media types.
0056
0057 NOTE: For connections based on Intel(R) Ethernet Controller 700 Series, support
0058 is dependent on your system board. Please see your vendor for details.
0059
0060 NOTE: In systems that do not have adequate airflow to cool the adapter and
0061 optical modules, you must use high temperature optical modules.
0062
0063 Virtual Functions (VFs)
0064 -----------------------
0065 Use sysfs to enable VFs. For example::
0066
0067 #echo $num_vf_enabled > /sys/class/net/$dev/device/sriov_numvfs #enable VFs
0068 #echo 0 > /sys/class/net/$dev/device/sriov_numvfs #disable VFs
0069
0070 For example, the following instructions will configure PF eth0 and the first VF
0071 on VLAN 10::
0072
0073 $ ip link set dev eth0 vf 0 vlan 10
0074
0075 VLAN Tag Packet Steering
0076 ------------------------
0077 Allows you to send all packets with a specific VLAN tag to a particular SR-IOV
0078 virtual function (VF). Further, this feature allows you to designate a
0079 particular VF as trusted, and allows that trusted VF to request selective
0080 promiscuous mode on the Physical Function (PF).
0081
0082 To set a VF as trusted or untrusted, enter the following command in the
0083 Hypervisor::
0084
0085 # ip link set dev eth0 vf 1 trust [on|off]
0086
0087 Once the VF is designated as trusted, use the following commands in the VM to
0088 set the VF to promiscuous mode.
0089
0090 ::
0091
0092 For promiscuous all:
0093 #ip link set eth2 promisc on
0094 Where eth2 is a VF interface in the VM
0095
0096 For promiscuous Multicast:
0097 #ip link set eth2 allmulticast on
0098 Where eth2 is a VF interface in the VM
0099
0100 NOTE: By default, the ethtool priv-flag vf-true-promisc-support is set to
0101 "off",meaning that promiscuous mode for the VF will be limited. To set the
0102 promiscuous mode for the VF to true promiscuous and allow the VF to see all
0103 ingress traffic, use the following command::
0104
0105 #ethtool -set-priv-flags p261p1 vf-true-promisc-support on
0106
0107 The vf-true-promisc-support priv-flag does not enable promiscuous mode; rather,
0108 it designates which type of promiscuous mode (limited or true) you will get
0109 when you enable promiscuous mode using the ip link commands above. Note that
0110 this is a global setting that affects the entire device. However,the
0111 vf-true-promisc-support priv-flag is only exposed to the first PF of the
0112 device. The PF remains in limited promiscuous mode (unless it is in MFP mode)
0113 regardless of the vf-true-promisc-support setting.
0114
0115 Now add a VLAN interface on the VF interface::
0116
0117 #ip link add link eth2 name eth2.100 type vlan id 100
0118
0119 Note that the order in which you set the VF to promiscuous mode and add the
0120 VLAN interface does not matter (you can do either first). The end result in
0121 this example is that the VF will get all traffic that is tagged with VLAN 100.
0122
0123 Intel(R) Ethernet Flow Director
0124 -------------------------------
0125 The Intel Ethernet Flow Director performs the following tasks:
0126
0127 - Directs receive packets according to their flows to different queues.
0128 - Enables tight control on routing a flow in the platform.
0129 - Matches flows and CPU cores for flow affinity.
0130 - Supports multiple parameters for flexible flow classification and load
0131 balancing (in SFP mode only).
0132
0133 NOTE: The Linux i40e driver supports the following flow types: IPv4, TCPv4, and
0134 UDPv4. For a given flow type, it supports valid combinations of IP addresses
0135 (source or destination) and UDP/TCP ports (source and destination). For
0136 example, you can supply only a source IP address, a source IP address and a
0137 destination port, or any combination of one or more of these four parameters.
0138
0139 NOTE: The Linux i40e driver allows you to filter traffic based on a
0140 user-defined flexible two-byte pattern and offset by using the ethtool user-def
0141 and mask fields. Only L3 and L4 flow types are supported for user-defined
0142 flexible filters. For a given flow type, you must clear all Intel Ethernet Flow
0143 Director filters before changing the input set (for that flow type).
0144
0145 To enable or disable the Intel Ethernet Flow Director::
0146
0147 # ethtool -K ethX ntuple <on|off>
0148
0149 When disabling ntuple filters, all the user programmed filters are flushed from
0150 the driver cache and hardware. All needed filters must be re-added when ntuple
0151 is re-enabled.
0152
0153 To add a filter that directs packet to queue 2, use -U or -N switch::
0154
0155 # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \
0156 192.168.10.2 src-port 2000 dst-port 2001 action 2 [loc 1]
0157
0158 To set a filter using only the source and destination IP address::
0159
0160 # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \
0161 192.168.10.2 action 2 [loc 1]
0162
0163 To see the list of filters currently present::
0164
0165 # ethtool <-u|-n> ethX
0166
0167 Application Targeted Routing (ATR) Perfect Filters
0168 --------------------------------------------------
0169 ATR is enabled by default when the kernel is in multiple transmit queue mode.
0170 An ATR Intel Ethernet Flow Director filter rule is added when a TCP-IP flow
0171 starts and is deleted when the flow ends. When a TCP-IP Intel Ethernet Flow
0172 Director rule is added from ethtool (Sideband filter), ATR is turned off by the
0173 driver. To re-enable ATR, the sideband can be disabled with the ethtool -K
0174 option. For example::
0175
0176 ethtool -K [adapter] ntuple [off|on]
0177
0178 If sideband is re-enabled after ATR is re-enabled, ATR remains enabled until a
0179 TCP-IP flow is added. When all TCP-IP sideband rules are deleted, ATR is
0180 automatically re-enabled.
0181
0182 Packets that match the ATR rules are counted in fdir_atr_match stats in
0183 ethtool, which also can be used to verify whether ATR rules still exist.
0184
0185 Sideband Perfect Filters
0186 ------------------------
0187 Sideband Perfect Filters are used to direct traffic that matches specified
0188 characteristics. They are enabled through ethtool's ntuple interface. To add a
0189 new filter use the following command::
0190
0191 ethtool -U <device> flow-type <type> src-ip <ip> dst-ip <ip> src-port <port> \
0192 dst-port <port> action <queue>
0193
0194 Where:
0195 <device> - the ethernet device to program
0196 <type> - can be ip4, tcp4, udp4, or sctp4
0197 <ip> - the ip address to match on
0198 <port> - the port number to match on
0199 <queue> - the queue to direct traffic towards (-1 discards matching traffic)
0200
0201 Use the following command to display all of the active filters::
0202
0203 ethtool -u <device>
0204
0205 Use the following command to delete a filter::
0206
0207 ethtool -U <device> delete <N>
0208
0209 Where <N> is the filter id displayed when printing all the active filters, and
0210 may also have been specified using "loc <N>" when adding the filter.
0211
0212 The following example matches TCP traffic sent from 192.168.0.1, port 5300,
0213 directed to 192.168.0.5, port 80, and sends it to queue 7::
0214
0215 ethtool -U enp130s0 flow-type tcp4 src-ip 192.168.0.1 dst-ip 192.168.0.5 \
0216 src-port 5300 dst-port 80 action 7
0217
0218 For each flow-type, the programmed filters must all have the same matching
0219 input set. For example, issuing the following two commands is acceptable::
0220
0221 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7
0222 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.5 src-port 55 action 10
0223
0224 Issuing the next two commands, however, is not acceptable, since the first
0225 specifies src-ip and the second specifies dst-ip::
0226
0227 ethtool -U enp130s0 flow-type ip4 src-ip 192.168.0.1 src-port 5300 action 7
0228 ethtool -U enp130s0 flow-type ip4 dst-ip 192.168.0.5 src-port 55 action 10
0229
0230 The second command will fail with an error. You may program multiple filters
0231 with the same fields, using different values, but, on one device, you may not
0232 program two tcp4 filters with different matching fields.
0233
0234 Matching on a sub-portion of a field is not supported by the i40e driver, thus
0235 partial mask fields are not supported.
0236
0237 The driver also supports matching user-defined data within the packet payload.
0238 This flexible data is specified using the "user-def" field of the ethtool
0239 command in the following way:
0240
0241 +----------------------------+--------------------------+
0242 | 31 28 24 20 16 | 15 12 8 4 0 |
0243 +----------------------------+--------------------------+
0244 | offset into packet payload | 2 bytes of flexible data |
0245 +----------------------------+--------------------------+
0246
0247 For example,
0248
0249 ::
0250
0251 ... user-def 0x4FFFF ...
0252
0253 tells the filter to look 4 bytes into the payload and match that value against
0254 0xFFFF. The offset is based on the beginning of the payload, and not the
0255 beginning of the packet. Thus
0256
0257 ::
0258
0259 flow-type tcp4 ... user-def 0x8BEAF ...
0260
0261 would match TCP/IPv4 packets which have the value 0xBEAF 8 bytes into the
0262 TCP/IPv4 payload.
0263
0264 Note that ICMP headers are parsed as 4 bytes of header and 4 bytes of payload.
0265 Thus to match the first byte of the payload, you must actually add 4 bytes to
0266 the offset. Also note that ip4 filters match both ICMP frames as well as raw
0267 (unknown) ip4 frames, where the payload will be the L3 payload of the IP4 frame.
0268
0269 The maximum offset is 64. The hardware will only read up to 64 bytes of data
0270 from the payload. The offset must be even because the flexible data is 2 bytes
0271 long and must be aligned to byte 0 of the packet payload.
0272
0273 The user-defined flexible offset is also considered part of the input set and
0274 cannot be programmed separately for multiple filters of the same type. However,
0275 the flexible data is not part of the input set and multiple filters may use the
0276 same offset but match against different data.
0277
0278 To create filters that direct traffic to a specific Virtual Function, use the
0279 "action" parameter. Specify the action as a 64 bit value, where the lower 32
0280 bits represents the queue number, while the next 8 bits represent which VF.
0281 Note that 0 is the PF, so the VF identifier is offset by 1. For example::
0282
0283 ... action 0x800000002 ...
0284
0285 specifies to direct traffic to Virtual Function 7 (8 minus 1) into queue 2 of
0286 that VF.
0287
0288 Note that these filters will not break internal routing rules, and will not
0289 route traffic that otherwise would not have been sent to the specified Virtual
0290 Function.
0291
0292 Setting the link-down-on-close Private Flag
0293 -------------------------------------------
0294 When the link-down-on-close private flag is set to "on", the port's link will
0295 go down when the interface is brought down using the ifconfig ethX down command.
0296
0297 Use ethtool to view and set link-down-on-close, as follows::
0298
0299 ethtool --show-priv-flags ethX
0300 ethtool --set-priv-flags ethX link-down-on-close [on|off]
0301
0302 Viewing Link Messages
0303 ---------------------
0304 Link messages will not be displayed to the console if the distribution is
0305 restricting system messages. In order to see network driver link messages on
0306 your console, set dmesg to eight by entering the following::
0307
0308 dmesg -n 8
0309
0310 NOTE: This setting is not saved across reboots.
0311
0312 Jumbo Frames
0313 ------------
0314 Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU)
0315 to a value larger than the default value of 1500.
0316
0317 Use the ifconfig command to increase the MTU size. For example, enter the
0318 following where <x> is the interface number::
0319
0320 ifconfig eth<x> mtu 9000 up
0321
0322 Alternatively, you can use the ip command as follows::
0323
0324 ip link set mtu 9000 dev eth<x>
0325 ip link set up dev eth<x>
0326
0327 This setting is not saved across reboots. The setting change can be made
0328 permanent by adding 'MTU=9000' to the file::
0329
0330 /etc/sysconfig/network-scripts/ifcfg-eth<x> // for RHEL
0331 /etc/sysconfig/network/<config_file> // for SLES
0332
0333 NOTE: The maximum MTU setting for Jumbo Frames is 9702. This value coincides
0334 with the maximum Jumbo Frames size of 9728 bytes.
0335
0336 NOTE: This driver will attempt to use multiple page sized buffers to receive
0337 each jumbo packet. This should help to avoid buffer starvation issues when
0338 allocating receive packets.
0339
0340 ethtool
0341 -------
0342 The driver utilizes the ethtool interface for driver configuration and
0343 diagnostics, as well as displaying statistical information. The latest ethtool
0344 version is required for this functionality. Download it at:
0345 https://www.kernel.org/pub/software/network/ethtool/
0346
0347 Supported ethtool Commands and Options for Filtering
0348 ----------------------------------------------------
0349 -n --show-nfc
0350 Retrieves the receive network flow classification configurations.
0351
0352 rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6
0353 Retrieves the hash options for the specified network traffic type.
0354
0355 -N --config-nfc
0356 Configures the receive network flow classification.
0357
0358 rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r...
0359 Configures the hash options for the specified network traffic type.
0360
0361 udp4 UDP over IPv4
0362 udp6 UDP over IPv6
0363
0364 f Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.
0365 n Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.
0366
0367 Speed and Duplex Configuration
0368 ------------------------------
0369 In addressing speed and duplex configuration issues, you need to distinguish
0370 between copper-based adapters and fiber-based adapters.
0371
0372 In the default mode, an Intel(R) Ethernet Network Adapter using copper
0373 connections will attempt to auto-negotiate with its link partner to determine
0374 the best setting. If the adapter cannot establish link with the link partner
0375 using auto-negotiation, you may need to manually configure the adapter and link
0376 partner to identical settings to establish link and pass packets. This should
0377 only be needed when attempting to link with an older switch that does not
0378 support auto-negotiation or one that has been forced to a specific speed or
0379 duplex mode. Your link partner must match the setting you choose. 1 Gbps speeds
0380 and higher cannot be forced. Use the autonegotiation advertising setting to
0381 manually set devices for 1 Gbps and higher.
0382
0383 NOTE: You cannot set the speed for devices based on the Intel(R) Ethernet
0384 Network Adapter XXV710 based devices.
0385
0386 Speed, duplex, and autonegotiation advertising are configured through the
0387 ethtool utility.
0388
0389 Caution: Only experienced network administrators should force speed and duplex
0390 or change autonegotiation advertising manually. The settings at the switch must
0391 always match the adapter settings. Adapter performance may suffer or your
0392 adapter may not operate if you configure the adapter differently from your
0393 switch.
0394
0395 An Intel(R) Ethernet Network Adapter using fiber-based connections, however,
0396 will not attempt to auto-negotiate with its link partner since those adapters
0397 operate only in full duplex and only at their native speed.
0398
0399 NAPI
0400 ----
0401 NAPI (Rx polling mode) is supported in the i40e driver.
0402 For more information on NAPI, see
0403 https://wiki.linuxfoundation.org/networking/napi
0404
0405 Flow Control
0406 ------------
0407 Ethernet Flow Control (IEEE 802.3x) can be configured with ethtool to enable
0408 receiving and transmitting pause frames for i40e. When transmit is enabled,
0409 pause frames are generated when the receive packet buffer crosses a predefined
0410 threshold. When receive is enabled, the transmit unit will halt for the time
0411 delay specified when a pause frame is received.
0412
0413 NOTE: You must have a flow control capable link partner.
0414
0415 Flow Control is on by default.
0416
0417 Use ethtool to change the flow control settings.
0418
0419 To enable or disable Rx or Tx Flow Control::
0420
0421 ethtool -A eth? rx <on|off> tx <on|off>
0422
0423 Note: This command only enables or disables Flow Control if auto-negotiation is
0424 disabled. If auto-negotiation is enabled, this command changes the parameters
0425 used for auto-negotiation with the link partner.
0426
0427 To enable or disable auto-negotiation::
0428
0429 ethtool -s eth? autoneg <on|off>
0430
0431 Note: Flow Control auto-negotiation is part of link auto-negotiation. Depending
0432 on your device, you may not be able to change the auto-negotiation setting.
0433
0434 RSS Hash Flow
0435 -------------
0436 Allows you to set the hash bytes per flow type and any combination of one or
0437 more options for Receive Side Scaling (RSS) hash byte configuration.
0438
0439 ::
0440
0441 # ethtool -N <dev> rx-flow-hash <type> <option>
0442
0443 Where <type> is:
0444 tcp4 signifying TCP over IPv4
0445 udp4 signifying UDP over IPv4
0446 tcp6 signifying TCP over IPv6
0447 udp6 signifying UDP over IPv6
0448 And <option> is one or more of:
0449 s Hash on the IP source address of the Rx packet.
0450 d Hash on the IP destination address of the Rx packet.
0451 f Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.
0452 n Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.
0453
0454 MAC and VLAN anti-spoofing feature
0455 ----------------------------------
0456 When a malicious driver attempts to send a spoofed packet, it is dropped by the
0457 hardware and not transmitted.
0458 NOTE: This feature can be disabled for a specific Virtual Function (VF)::
0459
0460 ip link set <pf dev> vf <vf id> spoofchk {off|on}
0461
0462 IEEE 1588 Precision Time Protocol (PTP) Hardware Clock (PHC)
0463 ------------------------------------------------------------
0464 Precision Time Protocol (PTP) is used to synchronize clocks in a computer
0465 network. PTP support varies among Intel devices that support this driver. Use
0466 "ethtool -T <netdev name>" to get a definitive list of PTP capabilities
0467 supported by the device.
0468
0469 IEEE 802.1ad (QinQ) Support
0470 ---------------------------
0471 The IEEE 802.1ad standard, informally known as QinQ, allows for multiple VLAN
0472 IDs within a single Ethernet frame. VLAN IDs are sometimes referred to as
0473 "tags," and multiple VLAN IDs are thus referred to as a "tag stack." Tag stacks
0474 allow L2 tunneling and the ability to segregate traffic within a particular
0475 VLAN ID, among other uses.
0476
0477 The following are examples of how to configure 802.1ad (QinQ)::
0478
0479 ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24
0480 ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371
0481
0482 Where "24" and "371" are example VLAN IDs.
0483
0484 NOTES:
0485 Receive checksum offloads, cloud filters, and VLAN acceleration are not
0486 supported for 802.1ad (QinQ) packets.
0487
0488 VXLAN and GENEVE Overlay HW Offloading
0489 --------------------------------------
0490 Virtual Extensible LAN (VXLAN) allows you to extend an L2 network over an L3
0491 network, which may be useful in a virtualized or cloud environment. Some
0492 Intel(R) Ethernet Network devices perform VXLAN processing, offloading it from
0493 the operating system. This reduces CPU utilization.
0494
0495 VXLAN offloading is controlled by the Tx and Rx checksum offload options
0496 provided by ethtool. That is, if Tx checksum offload is enabled, and the
0497 adapter has the capability, VXLAN offloading is also enabled.
0498
0499 Support for VXLAN and GENEVE HW offloading is dependent on kernel support of
0500 the HW offloading features.
0501
0502 Multiple Functions per Port
0503 ---------------------------
0504 Some adapters based on the Intel Ethernet Controller X710/XL710 support
0505 multiple functions on a single physical port. Configure these functions through
0506 the System Setup/BIOS.
0507
0508 Minimum TX Bandwidth is the guaranteed minimum data transmission bandwidth, as
0509 a percentage of the full physical port link speed, that the partition will
0510 receive. The bandwidth the partition is awarded will never fall below the level
0511 you specify.
0512
0513 The range for the minimum bandwidth values is:
0514 1 to ((100 minus # of partitions on the physical port) plus 1)
0515 For example, if a physical port has 4 partitions, the range would be:
0516 1 to ((100 - 4) + 1 = 97)
0517
0518 The Maximum Bandwidth percentage represents the maximum transmit bandwidth
0519 allocated to the partition as a percentage of the full physical port link
0520 speed. The accepted range of values is 1-100. The value is used as a limiter,
0521 should you chose that any one particular function not be able to consume 100%
0522 of a port's bandwidth (should it be available). The sum of all the values for
0523 Maximum Bandwidth is not restricted, because no more than 100% of a port's
0524 bandwidth can ever be used.
0525
0526 NOTE: X710/XXV710 devices fail to enable Max VFs (64) when Multiple Functions
0527 per Port (MFP) and SR-IOV are enabled. An error from i40e is logged that says
0528 "add vsi failed for VF N, aq_err 16". To workaround the issue, enable less than
0529 64 virtual functions (VFs).
0530
0531 Data Center Bridging (DCB)
0532 --------------------------
0533 DCB is a configuration Quality of Service implementation in hardware. It uses
0534 the VLAN priority tag (802.1p) to filter traffic. That means that there are 8
0535 different priorities that traffic can be filtered into. It also enables
0536 priority flow control (802.1Qbb) which can limit or eliminate the number of
0537 dropped packets during network stress. Bandwidth can be allocated to each of
0538 these priorities, which is enforced at the hardware level (802.1Qaz).
0539
0540 Adapter firmware implements LLDP and DCBX protocol agents as per 802.1AB and
0541 802.1Qaz respectively. The firmware based DCBX agent runs in willing mode only
0542 and can accept settings from a DCBX capable peer. Software configuration of
0543 DCBX parameters via dcbtool/lldptool are not supported.
0544
0545 NOTE: Firmware LLDP can be disabled by setting the private flag disable-fw-lldp.
0546
0547 The i40e driver implements the DCB netlink interface layer to allow user-space
0548 to communicate with the driver and query DCB configuration for the port.
0549
0550 NOTE:
0551 The kernel assumes that TC0 is available, and will disable Priority Flow
0552 Control (PFC) on the device if TC0 is not available. To fix this, ensure TC0 is
0553 enabled when setting up DCB on your switch.
0554
0555 Interrupt Rate Limiting
0556 -----------------------
0557 :Valid Range: 0-235 (0=no limit)
0558
0559 The Intel(R) Ethernet Controller XL710 family supports an interrupt rate
0560 limiting mechanism. The user can control, via ethtool, the number of
0561 microseconds between interrupts.
0562
0563 Syntax::
0564
0565 # ethtool -C ethX rx-usecs-high N
0566
0567 The range of 0-235 microseconds provides an effective range of 4,310 to 250,000
0568 interrupts per second. The value of rx-usecs-high can be set independently of
0569 rx-usecs and tx-usecs in the same ethtool command, and is also independent of
0570 the adaptive interrupt moderation algorithm. The underlying hardware supports
0571 granularity in 4-microsecond intervals, so adjacent values may result in the
0572 same interrupt rate.
0573
0574 One possible use case is the following::
0575
0576 # ethtool -C ethX adaptive-rx off adaptive-tx off rx-usecs-high 20 rx-usecs \
0577 5 tx-usecs 5
0578
0579 The above command would disable adaptive interrupt moderation, and allow a
0580 maximum of 5 microseconds before indicating a receive or transmit was complete.
0581 However, instead of resulting in as many as 200,000 interrupts per second, it
0582 limits total interrupts per second to 50,000 via the rx-usecs-high parameter.
0583
0584 Performance Optimization
0585 ========================
0586 Driver defaults are meant to fit a wide variety of workloads, but if further
0587 optimization is required we recommend experimenting with the following settings.
0588
0589 NOTE: For better performance when processing small (64B) frame sizes, try
0590 enabling Hyper threading in the BIOS in order to increase the number of logical
0591 cores in the system and subsequently increase the number of queues available to
0592 the adapter.
0593
0594 Virtualized Environments
0595 ------------------------
0596 1. Disable XPS on both ends by using the included virt_perf_default script
0597 or by running the following command as root::
0598
0599 for file in `ls /sys/class/net/<ethX>/queues/tx-*/xps_cpus`;
0600 do echo 0 > $file; done
0601
0602 2. Using the appropriate mechanism (vcpupin) in the vm, pin the cpu's to
0603 individual lcpu's, making sure to use a set of cpu's included in the
0604 device's local_cpulist: /sys/class/net/<ethX>/device/local_cpulist.
0605
0606 3. Configure as many Rx/Tx queues in the VM as available. Do not rely on
0607 the default setting of 1.
0608
0609
0610 Non-virtualized Environments
0611 ----------------------------
0612 Pin the adapter's IRQs to specific cores by disabling the irqbalance service
0613 and using the included set_irq_affinity script. Please see the script's help
0614 text for further options.
0615
0616 - The following settings will distribute the IRQs across all the cores evenly::
0617
0618 # scripts/set_irq_affinity -x all <interface1> , [ <interface2>, ... ]
0619
0620 - The following settings will distribute the IRQs across all the cores that are
0621 local to the adapter (same NUMA node)::
0622
0623 # scripts/set_irq_affinity -x local <interface1> ,[ <interface2>, ... ]
0624
0625 For very CPU intensive workloads, we recommend pinning the IRQs to all cores.
0626
0627 For IP Forwarding: Disable Adaptive ITR and lower Rx and Tx interrupts per
0628 queue using ethtool.
0629
0630 - Setting rx-usecs and tx-usecs to 125 will limit interrupts to about 8000
0631 interrupts per second per queue.
0632
0633 ::
0634
0635 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 125 \
0636 tx-usecs 125
0637
0638 For lower CPU utilization: Disable Adaptive ITR and lower Rx and Tx interrupts
0639 per queue using ethtool.
0640
0641 - Setting rx-usecs and tx-usecs to 250 will limit interrupts to about 4000
0642 interrupts per second per queue.
0643
0644 ::
0645
0646 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 250 \
0647 tx-usecs 250
0648
0649 For lower latency: Disable Adaptive ITR and ITR by setting Rx and Tx to 0 using
0650 ethtool.
0651
0652 ::
0653
0654 # ethtool -C <interface> adaptive-rx off adaptive-tx off rx-usecs 0 \
0655 tx-usecs 0
0656
0657 Application Device Queues (ADq)
0658 -------------------------------
0659 Application Device Queues (ADq) allows you to dedicate one or more queues to a
0660 specific application. This can reduce latency for the specified application,
0661 and allow Tx traffic to be rate limited per application. Follow the steps below
0662 to set ADq.
0663
0664 1. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.
0665 The shaper bw_rlimit parameter is optional.
0666
0667 Example: Sets up two tcs, tc0 and tc1, with 16 queues each and max tx rate set
0668 to 1Gbit for tc0 and 3Gbit for tc1.
0669
0670 ::
0671
0672 # tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
0673 queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit
0674 max_rate 1Gbit 3Gbit
0675
0676 map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1
0677 sets priorities 0-3 to use tc0 and 4-7 to use tc1)
0678
0679 queues: for each tc, <num queues>@<offset> (e.g. queues 16@0 16@16 assigns
0680 16 queues to tc0 at offset 0 and 16 queues to tc1 at offset 16. Max total
0681 number of queues for all tcs is 64 or number of cores, whichever is lower.)
0682
0683 hw 1 mode channel: ‘channel’ with ‘hw’ set to 1 is a new new hardware
0684 offload mode in mqprio that makes full use of the mqprio options, the
0685 TCs, the queue configurations, and the QoS parameters.
0686
0687 shaper bw_rlimit: for each tc, sets minimum and maximum bandwidth rates.
0688 Totals must be equal or less than port speed.
0689
0690 For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network
0691 monitoring tools such as `ifstat` or `sar -n DEV [interval] [number of samples]`
0692
0693 2. Enable HW TC offload on interface::
0694
0695 # ethtool -K <interface> hw-tc-offload on
0696
0697 3. Apply TCs to ingress (RX) flow of interface::
0698
0699 # tc qdisc add dev <interface> ingress
0700
0701 NOTES:
0702 - Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory.
0703 - ADq is not compatible with cloud filters.
0704 - Setting up channels via ethtool (ethtool -L) is not supported when the
0705 TCs are configured using mqprio.
0706 - You must have iproute2 latest version
0707 - NVM version 6.01 or later is required.
0708 - ADq cannot be enabled when any the following features are enabled: Data
0709 Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband
0710 Filters.
0711 - If another driver (for example, DPDK) has set cloud filters, you cannot
0712 enable ADq.
0713 - Tunnel filters are not supported in ADq. If encapsulated packets do
0714 arrive in non-tunnel mode, filtering will be done on the inner headers.
0715 For example, for VXLAN traffic in non-tunnel mode, PCTYPE is identified
0716 as a VXLAN encapsulated packet, outer headers are ignored. Therefore,
0717 inner headers are matched.
0718 - If a TC filter on a PF matches traffic over a VF (on the PF), that
0719 traffic will be routed to the appropriate queue of the PF, and will
0720 not be passed on the VF. Such traffic will end up getting dropped higher
0721 up in the TCP/IP stack as it does not match PF address data.
0722 - If traffic matches multiple TC filters that point to different TCs,
0723 that traffic will be duplicated and sent to all matching TC queues.
0724 The hardware switch mirrors the packet to a VSI list when multiple
0725 filters are matched.
0726
0727
0728 Known Issues/Troubleshooting
0729 ============================
0730
0731 NOTE: 1 Gb devices based on the Intel(R) Ethernet Network Connection X722 do
0732 not support the following features:
0733
0734 * Data Center Bridging (DCB)
0735 * QOS
0736 * VMQ
0737 * SR-IOV
0738 * Task Encapsulation offload (VXLAN, NVGRE)
0739 * Energy Efficient Ethernet (EEE)
0740 * Auto-media detect
0741
0742 Unexpected Issues when the device driver and DPDK share a device
0743 ----------------------------------------------------------------
0744 Unexpected issues may result when an i40e device is in multi driver mode and
0745 the kernel driver and DPDK driver are sharing the device. This is because
0746 access to the global NIC resources is not synchronized between multiple
0747 drivers. Any change to the global NIC configuration (writing to a global
0748 register, setting global configuration by AQ, or changing switch modes) will
0749 affect all ports and drivers on the device. Loading DPDK with the
0750 "multi-driver" module parameter may mitigate some of the issues.
0751
0752 TC0 must be enabled when setting up DCB on a switch
0753 ---------------------------------------------------
0754 The kernel assumes that TC0 is available, and will disable Priority Flow
0755 Control (PFC) on the device if TC0 is not available. To fix this, ensure TC0 is
0756 enabled when setting up DCB on your switch.
0757
0758
0759 Support
0760 =======
0761 For general information, go to the Intel support website at:
0762
0763 https://www.intel.com/support/
0764
0765 or the Intel Wired Networking project hosted by Sourceforge at:
0766
0767 https://sourceforge.net/projects/e1000
0768
0769 If an issue is identified with the released source code on a supported kernel
0770 with a supported adapter, email the specific information related to the issue
0771 to e1000-devel@lists.sf.net.