IAVF(4)

๐Ÿ“ฆ version 15.1, in freebsd 14.5, freebsd 15.1

๐Ÿ’– IAVF(4) ๐Ÿ’–

okay so bestie, this is the iavf(4) page from the Kernel Interfaces Manual, and it's literally all about the Intel Ethernet Adaptive Virtual Function Driver. grab a lil snack ๐Ÿ“, because we're getting into virtual functions, queues, and all the tuning vibes. iykyk.


โœจ NAME โœจ

iavf โ€” Intel Ethernet Adaptive Virtual Function Driver

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

So you wanna compile this driver into the kernel? bestie, drop these lines into your kernel configuration file:

device iflib
device iavf

And if you'd rather load the driver as a module at boot time, put this in loader.conf(5):

if_iavf_load="YES"

๐ŸŒธ DESCRIPTION ๐ŸŒธ

The iavf driver gives you support for any PCI Virtual Function created from certain Intel Ethernet devices. It's compatible with virtual functions bound to devices based on these icons ๐Ÿ‘‘:

  • Intelยฎ Ethernet Controller E810-C
  • Intelยฎ Ethernet Controller E810-XXV
  • Intelยฎ Ethernet Connection E822-C
  • Intelยฎ Ethernet Connection E822-L
  • Intelยฎ Ethernet Connection E823-C
  • Intelยฎ Ethernet Connection E823-L
  • Intelยฎ Ethernet Controller I710
  • Intelยฎ Ethernet Controller X710
  • Intelยฎ Ethernet Controller XL710
  • Intelยฎ Ethernet Network Connection X722
  • Intelยฎ Ethernet Controller XXV710
  • Intelยฎ Ethernet Controller V710

The associated Physical Function (PF) drivers for this VF driver are:

Got hardware requirement questions? go read the documentation that came with your Intel Ethernet Adapter. All the hardware requirements listed there apply to use with FreeBSD. no cap. ๐Ÿ“š

๐Ÿ‘‘ The VF Driver ๐Ÿ‘‘

The VF driver is normally used in a virtualized environment where a host driver manages SR-IOV and hands a VF device to the guest. In the FreeBSD guest, the iavf driver would be loaded and will function using the VF device assigned to it. it's giving guest-star main character energy โœจ

The VF driver provides most of the same functionality as the core driver, but it's actually a subordinate to the host. Access to many controls happens by sending a request to the host through what's called the "Admin queue." These are startup and initialization events, though โ€” once it's in operation, the device is self-contained and should achieve near native performance. slay ๐Ÿ’…

Some notable limitations of the VF environment:

  • The PF can configure the VF to allow promiscuous mode, using a configuration parameter in iovctl.conf(5); otherwise, promiscuous mode will not work.
  • Media info is not available from the PF, so the active media will always be displayed as auto in ifconfig(8).

๐ŸŒˆ Adaptive Virtual Function ๐ŸŒˆ

Adaptive Virtual Function (AVF) lets the virtual function driver, or VF, adapt to changing feature sets of the physical function driver (PF) it's associated with. This means system administrators can update a PF without having to update all the VFs associated with it. All AVFs have a single common device ID and branding string. iconic behavior, honestly ๐ŸŽ€

AVFs have a minimum set of features known as "base mode," but they may provide additional features depending on what's available in the PF the AVF is associated with. The following are base mode features:

  • 4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) for Tx/Rx
  • iavf descriptors and ring format
  • Descriptor write-back completion
  • 1 control queue, with iavf descriptors, CSRs and ring format
  • 5 MSI-X interrupt vectors and corresponding iavf CSRs
  • 1 Interrupt Throttle Rate (ITR) index
  • 1 Virtual Station Interface (VSI) per VF
  • 1 Traffic Class (TC), TC0
  • Receive Side Scaling (RSS) with 64 entry indirection table and key, configured through the PF
  • 1 unicast MAC address reserved per VF
  • 8 MAC address filters for each VF on an Intelยฎ Ethernet 800 Series device
  • 16 MAC address filters for each VF on an Intelยฎ Ethernet 700 Series device
  • Stateless offloads โ€” non-tunneled checksums
  • AVF device ID
  • HW mailbox is used for VF to PF communications

๐ŸŽ€ CONFIGURATION AND TUNING ๐ŸŽ€

โญ Important System Configuration Changes โญ

okay so this part matters: 100G operation can generate high numbers of interrupts, and those often get incorrectly interpreted as a storm condition in the kernel. the suggestion is to fix that by setting hw.intr_storm_threshold to 0.

The default is 1000.

Best throughput results are seen with a large MTU; use 9706 if possible. The default number of descriptors per ring is 1024. Increasing this may improve performance, depending on your use case. tune responsibly, bestie ๐Ÿ”ฅ

๐Ÿ“ Configuring for no iflib ๐Ÿ“

iflib(4) is a common framework for network interface drivers for FreeBSD that uses a shared set of sysctl names.

The default iavf driver depends on it, but it can be compiled without it. lowkey flexible ๐Ÿ’…

๐Ÿงš Jumbo Frames ๐Ÿงš

Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) to a value larger than the default value of 1500.

Use the ifconfig(8) command to increase the MTU size.

To confirm the MTU used between two specific devices, use route(8):

route get <destination_IP_address>
NOTE: - The maximum MTU setting for jumbo frames is 9706. This corresponds to the maximum jumbo frame size of 9728 bytes. - This driver will attempt to use multiple page-sized buffers to receive each jumbo packet. This should help to avoid buffer starvation issues when allocating receive packets. - Packet loss may have a greater impact on throughput when you use jumbo frames. If you observe a drop in performance after enabling jumbo frames, enabling flow control may mitigate the issue.

๐Ÿ’œ Checksum Offload ๐Ÿ’œ

Checksum offloading supports both TCP and UDP packets and is supported for both transmit and receive.

TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. Both of these features are enabled and disabled via ifconfig(8).

NOTE: - TSO requires Tx checksum; if Tx checksum is disabled then TSO will also be disabled.

๐Ÿ”ฅ LRO ๐Ÿ”ฅ

LRO (Large Receive Offload) may provide Rx performance improvement. However, it is incompatible with packet-forwarding workloads. You should carefully evaluate the environment and enable LRO when possible. it's giving "great in the right context" energy ๐Ÿ˜Œ

๐ŸŒธ Rx and Tx Descriptor Rings ๐ŸŒธ

This lets you set the Rx and Tx descriptor rings independently. Set them via these iflib(4) sysctls:

dev.iavf.#.iflib.override_nrxds
dev.iavf.#.iflib.override_ntxds

The VF driver does not have access to flow control settings. It must be managed from the host side. not me trying to control something the VF literally cannot touch ๐Ÿ™ˆ

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

arp(4), ice(4), iflib(4), ixl(4), netintro(4), vlan(4), ifconfig(8)

See the "Intelยฎ Ethernet Adapters and Devices User Guide" for additional information on features. It's available on the Intel website at either of these:

For info on how to identify your adapter, and for the latest Intel network drivers, refer to the Intel Support website: โŸจhttp://www.intel.com/supportโŸฉ

๐Ÿ’€ CAVEATS ๐Ÿ’€

๐Ÿฉน Driver Buffer Overflow Fix ๐Ÿฉน

The fix to resolve CVE-2016-8105, referenced in Intel SA-00069 โŸจhttps://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00069.htmlโŸฉ, is included in this and future versions of the driver. security slay ๐Ÿ”

๐Ÿง  Network Memory Buffer Allocation ๐Ÿง 

FreeBSD may have a low number of network memory buffers (mbufs) by default. If your mbuf value is too low, it may cause the driver to fail to initialize and/or cause the system to become unresponsive. You can check if the system is mbuf-starved by running netstat -m. Increase the number of mbufs by editing the lines below in sysctl.conf(5):

kern.ipc.nmbclusters
kern.ipc.nmbjumbop
kern.ipc.nmbjumbo9
kern.ipc.nmbjumbo16
kern.ipc.nmbufs

The amount of memory you allocate is system specific and may require some trial and error. Also, increasing the following in sysctl.conf(5) could help increase network performance:

kern.ipc.maxsockbuf
net.inet.tcp.sendspace
net.inet.tcp.recvspace
net.inet.udp.maxdgram
net.inet.udp.recvspace

๐Ÿ˜ญ UDP Stress Test Dropped Packet Issue ๐Ÿ˜ญ

Under small packet UDP stress with the iavf driver, the system may drop UDP packets due to socket buffers being full. Setting the PF driver's Flow Control variables to the minimum may resolve the issue. fr fr, tiny packets can be dramatic ๐Ÿ’€

๐Ÿšซ Disable LRO when routing/bridging ๐Ÿšซ

LRO must be turned off when forwarding traffic. periodt.

๐Ÿซถ SUPPORT ๐Ÿซถ

For general information, go to the Intel support website at โŸจhttp://www.intel.com/support/โŸฉ.

If an issue is identified with the released source code on a supported kernel with a supported adapter, email the specific information related to the issue to โŸจfreebsd@intel.comโŸฉ. bestie, include the deets and they'll help you out ๐Ÿ’Œ

Intelยฎ is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United States and / or other countries.

Other names and brands may be claimed as the property of others.

๐Ÿ“œ HISTORY ๐Ÿ“œ

The iavf device driver first appeared in FreeBSD 10.1 under the name ixlv. It was converted to use iflib(4) and renamed in FreeBSD 12.4. a glow-up moment, honestly โœจ

โœ๏ธ AUTHORS โœ๏ธ

The iavf driver was written by the Intel Corporation <freebsd@intel.com>.


xoxo, this page came from Debian, dated May 21, 2024 โ€” and that's the whole IAVF(4) vibe check, bestie ๐Ÿ’–๐Ÿฆ‹๐ŸŒˆ

๐Ÿ“ฆ where this page comes from