1*ba222f6fSEric Joyner.\"- 2*ba222f6fSEric Joyner.\" SPDX-License-Identifier: BSD-3-Clause 3*ba222f6fSEric Joyner.\" 49343a1cdSEric Joyner.\" Copyright (c) 2013-2018, Intel Corporation 59343a1cdSEric Joyner.\" All rights reserved. 69343a1cdSEric Joyner.\" 79343a1cdSEric Joyner.\" Redistribution and use in source and binary forms, with or without 89343a1cdSEric Joyner.\" modification, are permitted provided that the following conditions are met: 99343a1cdSEric Joyner.\" 109343a1cdSEric Joyner.\" 1. Redistributions of source code must retain the above copyright notice, 119343a1cdSEric Joyner.\" this list of conditions and the following disclaimer. 129343a1cdSEric Joyner.\" 139343a1cdSEric Joyner.\" 2. Redistributions in binary form must reproduce the above copyright 149343a1cdSEric Joyner.\" notice, this list of conditions and the following disclaimer in the 159343a1cdSEric Joyner.\" documentation and/or other materials provided with the distribution. 169343a1cdSEric Joyner.\" 179343a1cdSEric Joyner.\" 3. Neither the name of the Intel Corporation nor the names of its 189343a1cdSEric Joyner.\" contributors may be used to endorse or promote products derived from 199343a1cdSEric Joyner.\" this software without specific prior written permission. 209343a1cdSEric Joyner.\" 219343a1cdSEric Joyner.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 229343a1cdSEric Joyner.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 239343a1cdSEric Joyner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 249343a1cdSEric Joyner.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 259343a1cdSEric Joyner.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 269343a1cdSEric Joyner.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 279343a1cdSEric Joyner.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 289343a1cdSEric Joyner.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 299343a1cdSEric Joyner.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 309343a1cdSEric Joyner.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 319343a1cdSEric Joyner.\" POSSIBILITY OF SUCH DAMAGE. 329343a1cdSEric Joyner.\" 339343a1cdSEric Joyner.\" * Other names and brands may be claimed as the property of others. 349343a1cdSEric Joyner.\" 35*ba222f6fSEric Joyner.Dd May 21, 2024 369343a1cdSEric Joyner.Dt IAVF 4 379343a1cdSEric Joyner.Os 389343a1cdSEric Joyner.Sh NAME 399343a1cdSEric Joyner.Nm iavf 40*ba222f6fSEric Joyner.Nd "Intel Ethernet Adaptive Virtual Function Driver" 419343a1cdSEric Joyner.Sh SYNOPSIS 429343a1cdSEric JoynerTo compile this driver into the kernel, place the following lines in your 439343a1cdSEric Joynerkernel configuration file: 449343a1cdSEric Joyner.Bd -ragged -offset indent 45c75f49f7SKonstantin Belousov.Cd "device iflib" 469343a1cdSEric Joyner.Cd "device iavf" 479343a1cdSEric Joyner.Ed 489343a1cdSEric Joyner.Pp 499343a1cdSEric JoynerTo load the driver as a module at boot time, place the following lines in 509343a1cdSEric Joyner.Xr loader.conf 5 : 519343a1cdSEric Joyner.Bd -literal -offset indent 529343a1cdSEric Joynerif_iavf_load="YES" 539343a1cdSEric Joyner.Ed 549343a1cdSEric Joyner.Sh DESCRIPTION 559343a1cdSEric JoynerThe 569343a1cdSEric Joyner.Nm 57*ba222f6fSEric Joynerdriver provides support for any PCI Virtual Function created from certain 58*ba222f6fSEric JoynerIntel Ethernet devices. 59*ba222f6fSEric JoynerThis driver is compatible with virtual functions bound to devices based on the 60*ba222f6fSEric Joynerfollowing: 619343a1cdSEric Joyner.Pp 62*ba222f6fSEric Joyner.Bl -bullet -compact 63*ba222f6fSEric Joyner.It 64*ba222f6fSEric JoynerIntel\(rg Ethernet Controller E810\-C 65*ba222f6fSEric Joyner.It 66*ba222f6fSEric JoynerIntel\(rg Ethernet Controller E810\-XXV 67*ba222f6fSEric Joyner.It 68*ba222f6fSEric JoynerIntel\(rg Ethernet Connection E822\-C 69*ba222f6fSEric Joyner.It 70*ba222f6fSEric JoynerIntel\(rg Ethernet Connection E822\-L 71*ba222f6fSEric Joyner.It 72*ba222f6fSEric JoynerIntel\(rg Ethernet Connection E823\-C 73*ba222f6fSEric Joyner.It 74*ba222f6fSEric JoynerIntel\(rg Ethernet Connection E823\-L 75*ba222f6fSEric Joyner.It 76*ba222f6fSEric JoynerIntel\(rg Ethernet Controller I710 77*ba222f6fSEric Joyner.It 78*ba222f6fSEric JoynerIntel\(rg Ethernet Controller X710 79*ba222f6fSEric Joyner.It 80*ba222f6fSEric JoynerIntel\(rg Ethernet Controller XL710 81*ba222f6fSEric Joyner.It 82*ba222f6fSEric JoynerIntel\(rg Ethernet Network Connection X722 83*ba222f6fSEric Joyner.It 84*ba222f6fSEric JoynerIntel\(rg Ethernet Controller XXV710 85*ba222f6fSEric Joyner.It 86*ba222f6fSEric JoynerIntel\(rg Ethernet Controller V710 87*ba222f6fSEric Joyner.El 88*ba222f6fSEric Joyner.Pp 89*ba222f6fSEric JoynerThe associated Physical Function (PF) drivers for this VF driver are: 90*ba222f6fSEric Joyner.Pp 91*ba222f6fSEric Joyner.Bl -bullet -compact 92*ba222f6fSEric Joyner.It 93*ba222f6fSEric Joyner.Xr ice 4 94*ba222f6fSEric Joyner.It 95*ba222f6fSEric Joyner.Xr ixl 4 96*ba222f6fSEric Joyner.El 97*ba222f6fSEric Joyner.Pp 98*ba222f6fSEric JoynerFor questions related to hardware requirements, refer to the documentation 99*ba222f6fSEric Joynersupplied with your Intel Ethernet Adapter. 100*ba222f6fSEric JoynerAll hardware requirements listed apply to use with 101*ba222f6fSEric Joyner.Fx . 102*ba222f6fSEric Joyner.Ss The VF Driver 103*ba222f6fSEric JoynerThe VF driver is normally used in a virtualized environment where a host driver 104*ba222f6fSEric Joynermanages SR\-IOV, and provides a VF device to the guest. 105*ba222f6fSEric Joyner.Pp 106*ba222f6fSEric JoynerIn the 107*ba222f6fSEric Joyner.Fx 108*ba222f6fSEric Joynerguest, the iavf driver would be loaded and will function using 109*ba222f6fSEric Joynerthe VF device assigned to it. 110*ba222f6fSEric Joyner.Pp 111*ba222f6fSEric JoynerThe VF driver provides most of the same functionality as the core driver, but 112*ba222f6fSEric Joyneris actually a subordinate to the host. 113*ba222f6fSEric JoynerAccess to many controls is accomplished by a request to the host via what is 114*ba222f6fSEric Joynercalled the "Admin queue." 115*ba222f6fSEric JoynerThese are startup and initialization events, however; once in operation, the 116*ba222f6fSEric Joynerdevice is self\-contained and should achieve near native performance. 117*ba222f6fSEric Joyner.Pp 118*ba222f6fSEric JoynerSome notable limitations of the VF environment: 119*ba222f6fSEric Joyner.Bl -bullet 120*ba222f6fSEric Joyner.It 121*ba222f6fSEric JoynerThe PF can configure the VF to allow promiscuous mode, using a configuration 122*ba222f6fSEric Joynerparameter in 123*ba222f6fSEric Joyner.Xr iovctl.conf 5 ; 124*ba222f6fSEric Joynerotherwise, promiscuous mode will not work 125*ba222f6fSEric Joyner.It 126*ba222f6fSEric JoynerMedia info is not available from the PF, so the active media will always be 127*ba222f6fSEric Joynerdisplayed as auto in 1289343a1cdSEric Joyner.Xr ifconfig 8 129*ba222f6fSEric Joyner.El 130*ba222f6fSEric Joyner.Ss Adaptive Virtual Function 131*ba222f6fSEric JoynerAdaptive Virtual Function (AVF) allows the virtual function driver, or VF, to 132*ba222f6fSEric Joyneradapt to changing feature sets of the physical function driver (PF) with which 133*ba222f6fSEric Joynerit is associated. 134*ba222f6fSEric JoynerThis allows system administrators to update a PF without having to update all 135*ba222f6fSEric Joynerthe VFs associated with it. 136*ba222f6fSEric JoynerAll AVFs have a single common device ID and branding string. 1379343a1cdSEric Joyner.Pp 138*ba222f6fSEric JoynerAVFs have a minimum set of features known as "base mode," but may provide 139*ba222f6fSEric Joyneradditional features depending on what features are available in the PF with 140*ba222f6fSEric Joynerwhich the AVF is associated. 141*ba222f6fSEric JoynerThe following are base mode features: 142*ba222f6fSEric Joyner.Bl -bullet -compact 143*ba222f6fSEric Joyner.It 144*ba222f6fSEric Joyner4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) 145*ba222f6fSEric Joynerfor Tx/Rx 146*ba222f6fSEric Joyner.It 147*ba222f6fSEric Joyneriavf descriptors and ring format 148*ba222f6fSEric Joyner.It 149*ba222f6fSEric JoynerDescriptor write\-back completion 150*ba222f6fSEric Joyner.It 151*ba222f6fSEric Joyner1 control queue, with iavf descriptors, CSRs and ring format 152*ba222f6fSEric Joyner.It 153*ba222f6fSEric Joyner5 MSI\-X interrupt vectors and corresponding iavf CSRs 154*ba222f6fSEric Joyner.It 155*ba222f6fSEric Joyner1 Interrupt Throttle Rate (ITR) index 156*ba222f6fSEric Joyner.It 157*ba222f6fSEric Joyner1 Virtual Station Interface (VSI) per VF 158*ba222f6fSEric Joyner.It 159*ba222f6fSEric Joyner1 Traffic Class (TC), TC0 160*ba222f6fSEric Joyner.It 161*ba222f6fSEric JoynerReceive Side Scaling (RSS) with 64 entry indirection table and key, 162*ba222f6fSEric Joynerconfigured through the PF 163*ba222f6fSEric Joyner.It 164*ba222f6fSEric Joyner1 unicast MAC address reserved per VF 165*ba222f6fSEric Joyner.It 166*ba222f6fSEric Joyner8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device 167*ba222f6fSEric Joyner.It 168*ba222f6fSEric Joyner16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device 169*ba222f6fSEric Joyner.It 170*ba222f6fSEric JoynerStateless offloads \- non\-tunneled checksums 171*ba222f6fSEric Joyner.It 172*ba222f6fSEric JoynerAVF device ID 173*ba222f6fSEric Joyner.It 174*ba222f6fSEric JoynerHW mailbox is used for VF to PF communications 175*ba222f6fSEric Joyner.El 176*ba222f6fSEric Joyner.Sh CONFIGURATION AND TUNING 177*ba222f6fSEric Joyner.Ss Important System Configuration Changes 178*ba222f6fSEric JoynerIt is important to note that 100G operation can generate high 179*ba222f6fSEric Joynernumbers of interrupts, often incorrectly being interpreted as 180*ba222f6fSEric Joynera storm condition in the kernel. 181*ba222f6fSEric JoynerIt is suggested that this be resolved by setting 182*ba222f6fSEric Joyner.Va hw.intr_storm_threshold 183*ba222f6fSEric Joynerto 0. 1849343a1cdSEric Joyner.Pp 185*ba222f6fSEric JoynerThe default is 1000. 186*ba222f6fSEric Joyner.Pp 187*ba222f6fSEric JoynerBest throughput results are seen with a large MTU; use 9706 if possible. 188*ba222f6fSEric JoynerThe default number of descriptors per ring is 1024. 189*ba222f6fSEric JoynerIncreasing this may improve performance, depending on your use case. 190*ba222f6fSEric Joyner.Ss Configuring for no iflib 191*ba222f6fSEric Joyner.Xr iflib 4 192*ba222f6fSEric Joyneris a common framework for network interface drivers for 193*ba222f6fSEric Joyner.Fx 194*ba222f6fSEric Joynerthat uses a shared set of sysctl names. 195*ba222f6fSEric Joyner.Pp 196*ba222f6fSEric JoynerThe default 197*ba222f6fSEric Joyner.Nm 198*ba222f6fSEric Joynerdriver depends on it, but it can be compiled without it. 199*ba222f6fSEric Joyner.Ss Jumbo Frames 200*ba222f6fSEric JoynerJumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) 201*ba222f6fSEric Joynerto a value larger than the default value of 1500. 202*ba222f6fSEric Joyner.Pp 203*ba222f6fSEric JoynerUse the 204*ba222f6fSEric Joyner.Xr ifconfig 8 205*ba222f6fSEric Joynercommand to increase the MTU size. 206*ba222f6fSEric Joyner.Pp 207*ba222f6fSEric JoynerTo confirm the MTU used between two specific devices, use 208*ba222f6fSEric Joyner.Xr route 8 : 209*ba222f6fSEric Joyner.Bd -literal -offset indent 210*ba222f6fSEric Joynerroute get <destination_IP_address> 211*ba222f6fSEric Joyner.Ed 212*ba222f6fSEric Joyner.Pp 213*ba222f6fSEric JoynerNOTE: 214*ba222f6fSEric Joyner.Bl -bullet 215*ba222f6fSEric Joyner.It 216*ba222f6fSEric JoynerThe maximum MTU setting for jumbo frames is 9706. 217*ba222f6fSEric JoynerThis corresponds to the maximum jumbo frame size of 9728 bytes. 218*ba222f6fSEric Joyner.It 219*ba222f6fSEric JoynerThis driver will attempt to use multiple page-sized buffers to receive 220*ba222f6fSEric Joynereach jumbo packet. 221*ba222f6fSEric JoynerThis should help to avoid buffer starvation issues when allocating receive 222*ba222f6fSEric Joynerpackets. 223*ba222f6fSEric Joyner.It 224*ba222f6fSEric JoynerPacket loss may have a greater impact on throughput when you use jumbo 225*ba222f6fSEric Joynerframes. 226*ba222f6fSEric JoynerIf you observe a drop in performance after enabling jumbo frames, enabling 227*ba222f6fSEric Joynerflow control may mitigate the issue. 228*ba222f6fSEric Joyner.El 229*ba222f6fSEric Joyner.Ss Checksum Offload 230*ba222f6fSEric JoynerChecksum offloading supports both TCP and UDP packets and is supported for both 231*ba222f6fSEric Joynertransmit and receive. 232*ba222f6fSEric Joyner.Pp 233*ba222f6fSEric JoynerTSO (TCP Segmentation Offload) supports both IPv4 and IPv6. 234*ba222f6fSEric JoynerBoth of these features are enabled and disabled via 2359343a1cdSEric Joyner.Xr ifconfig 8 . 2369343a1cdSEric Joyner.Pp 237*ba222f6fSEric JoynerNOTE: 238*ba222f6fSEric Joyner.Bl -bullet -compact 239*ba222f6fSEric Joyner.It 240*ba222f6fSEric JoynerTSO requires Tx checksum; if Tx checksum is disabled then TSO will also 241*ba222f6fSEric Joynerbe disabled. 2429343a1cdSEric Joyner.El 243*ba222f6fSEric Joyner.Ss LRO 244*ba222f6fSEric JoynerLRO (Large Receive Offload) may provide Rx performance improvement. 245*ba222f6fSEric JoynerHowever, it is incompatible with packet\-forwarding workloads. 246*ba222f6fSEric JoynerYou should carefully evaluate the environment and enable LRO when possible. 247*ba222f6fSEric Joyner.Ss Rx and Tx Descriptor Rings 248*ba222f6fSEric JoynerAllows you to set the Rx and Tx descriptor rings independently. 249*ba222f6fSEric JoynerSet them via these 250*ba222f6fSEric Joyner.Xr iflib 4 251*ba222f6fSEric Joynersysctls: 252*ba222f6fSEric Joyner.Bl -tag -width indent 253*ba222f6fSEric Joyner.It dev.iavf.#.iflib.override_nrxds 254*ba222f6fSEric Joyner.It dev.iavf.#.iflib.override_ntxds 255*ba222f6fSEric Joyner.El 256*ba222f6fSEric Joyner.Ss Link\-Level Flow Control (LFC) 257*ba222f6fSEric JoynerThe VF driver does not have access to flow control settings. 258*ba222f6fSEric JoynerIt must be managed from the host side. 2599343a1cdSEric Joyner.Sh SEE ALSO 2609343a1cdSEric Joyner.Xr arp 4 , 261*ba222f6fSEric Joyner.Xr ice 4 , 262*ba222f6fSEric Joyner.Xr iflib 4 , 2639343a1cdSEric Joyner.Xr ixl 4 , 2649343a1cdSEric Joyner.Xr netintro 4 , 2659343a1cdSEric Joyner.Xr vlan 4 , 266*ba222f6fSEric Joyner.Xr ifconfig 8 267*ba222f6fSEric Joyner.Pp 268*ba222f6fSEric JoynerSee the 269*ba222f6fSEric Joyner.Dq Intel\(rg Ethernet Adapters and Devices User Guide 270*ba222f6fSEric Joynerfor additional information on features. 271*ba222f6fSEric JoynerIt is available on the Intel website at either of the following: 272*ba222f6fSEric Joyner.Bl -bullet 273*ba222f6fSEric Joyner.It 274*ba222f6fSEric Joyner.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 275*ba222f6fSEric Joyner.It 276*ba222f6fSEric Joyner.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html 277*ba222f6fSEric Joyner.El 278*ba222f6fSEric Joyner.Pp 279*ba222f6fSEric JoynerFor information on how to identify your adapter, and for the latest Intel 280*ba222f6fSEric Joynernetwork drivers, refer to the Intel Support website: 281*ba222f6fSEric Joyner.Aq Lk http://www.intel.com/support 282*ba222f6fSEric Joyner.Sh CAVEATS 283*ba222f6fSEric Joyner.Ss Driver Buffer Overflow Fix 284*ba222f6fSEric JoynerThe fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 285*ba222f6fSEric Joyner.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , 286*ba222f6fSEric Joyneris included in this and future versions of the driver. 287*ba222f6fSEric Joyner.Ss Network Memory Buffer Allocation 288*ba222f6fSEric Joyner.Fx 289*ba222f6fSEric Joynermay have a low number of network memory buffers (mbufs) by default. 290*ba222f6fSEric JoynerIf your mbuf value is too low, it may cause the driver to fail to initialize 291*ba222f6fSEric Joynerand/or cause the system to become unresponsive. 292*ba222f6fSEric JoynerYou can check to see if the system is mbuf\-starved by running 293*ba222f6fSEric Joyner.Li "netstat -m" . 294*ba222f6fSEric JoynerIncrease the number of mbufs by editing the lines below in 295*ba222f6fSEric Joyner.Xr sysctl.conf 5 : 296*ba222f6fSEric Joyner.Bd -literal -offset indent 297*ba222f6fSEric Joynerkern.ipc.nmbclusters 298*ba222f6fSEric Joynerkern.ipc.nmbjumbop 299*ba222f6fSEric Joynerkern.ipc.nmbjumbo9 300*ba222f6fSEric Joynerkern.ipc.nmbjumbo16 301*ba222f6fSEric Joynerkern.ipc.nmbufs 302*ba222f6fSEric Joyner.Ed 303*ba222f6fSEric Joyner.Pp 304*ba222f6fSEric JoynerThe amount of memory that you allocate is system specific, and may require 305*ba222f6fSEric Joynersome trial and error. 306*ba222f6fSEric JoynerAlso, increasing the following in 307*ba222f6fSEric Joyner.Xr sysctl.conf 5 308*ba222f6fSEric Joynercould help increase 309*ba222f6fSEric Joynernetwork performance: 310*ba222f6fSEric Joyner.Bd -literal -offset indent 311*ba222f6fSEric Joynerkern.ipc.maxsockbuf 312*ba222f6fSEric Joynernet.inet.tcp.sendspace 313*ba222f6fSEric Joynernet.inet.tcp.recvspace 314*ba222f6fSEric Joynernet.inet.udp.maxdgram 315*ba222f6fSEric Joynernet.inet.udp.recvspace 316*ba222f6fSEric Joyner.Ed 317*ba222f6fSEric Joyner.Ss UDP Stress Test Dropped Packet Issue 318*ba222f6fSEric JoynerUnder small packet UDP stress with the 319*ba222f6fSEric Joyner.Nm 320*ba222f6fSEric Joynerdriver, the system may drop UDP packets due to socket buffers being full. 321*ba222f6fSEric JoynerSetting the PF driver's Flow Control variables to the minimum may resolve the 322*ba222f6fSEric Joynerissue. 323*ba222f6fSEric Joyner.Ss Disable LRO when routing/bridging 324*ba222f6fSEric JoynerLRO must be turned off when forwarding traffic. 325*ba222f6fSEric Joyner.Sh SUPPORT 326*ba222f6fSEric JoynerFor general information, go to the Intel support website at 327*ba222f6fSEric Joyner.Aq Lk http://www.intel.com/support/ . 328*ba222f6fSEric Joyner.Pp 329*ba222f6fSEric JoynerIf an issue is identified with the released source code on a supported kernel 330*ba222f6fSEric Joynerwith a supported adapter, email the specific information related to the issue 331*ba222f6fSEric Joynerto 332*ba222f6fSEric Joyner.Aq Mt freebsd@intel.com . 333*ba222f6fSEric Joyner.Sh LEGAL 334*ba222f6fSEric JoynerIntel\(rg is a trademark or registered trademark of Intel Corporation 335*ba222f6fSEric Joyneror its subsidiaries in the United States and / or other countries. 336*ba222f6fSEric Joyner.Pp 337*ba222f6fSEric JoynerOther names and brands may be claimed as the property of others. 3389343a1cdSEric Joyner.Sh HISTORY 3399343a1cdSEric JoynerThe 3409343a1cdSEric Joyner.Nm 3419343a1cdSEric Joynerdevice driver first appeared in 342*ba222f6fSEric Joyner.Fx 10.1 343*ba222f6fSEric Joynerunder the name 344*ba222f6fSEric Joyner.Nm ixlv . 3459343a1cdSEric JoynerIt was converted to use 346*ba222f6fSEric Joyner.Xr iflib 4 347*ba222f6fSEric Joynerand renamed in 348*ba222f6fSEric Joyner.Fx 12.4 . 3499343a1cdSEric Joyner.Sh AUTHORS 3509343a1cdSEric JoynerThe 3519343a1cdSEric Joyner.Nm 352*ba222f6fSEric Joynerdriver was written by the 353*ba222f6fSEric Joyner.An Intel Corporation Aq Mt freebsd@intel.com 354