Intel® Ethernet Controller E810 Application Device Queues (ADQ)

Configuration Guide

ID 609008
Date 04/03/2023
Version 2.8
Document Table of Contents

SUT Configuration VF Inside a VM

This section describes system configuration using ADQ with a VF that is spawned inside a Virtual Machine (VM) on the SUT.

On the SUT Host OS

  1. Unload the iavf (VF) and ice (PF) drivers. rmmod iavf sleep 1 rmmod ice sleep 2
  2. Reload the ice driver and bring up the PF interface. modprobe ice sleep 2 ifup $iface_pf
  3. Spawn VFs. Use the following command to create virtual function(s): echo $numvfs > /sys/class/net/$iface_pf/device/sriov_numvfs

    The following example creates 1 VF on the p1p2 PF network interface:

    echo 1 > /sys/class/net/p1p2/device/sriov_numvfs Note:To find the maximum number of VFs the supported by the PF network device: cat /sys/class/net/$iface_pf/device/sriov_totalvfs
    1. Verify that the VF was created using lspci utility. For example: lspci | grep -i virtual 18:11.0 Ethernet controller: Intel Corporation Ethernet Adaptive Virtual Function (rev 01)
    2. Verify that the VF interface was created using the ip addr command. The VF interface is the PF interface name with a _​0 suffix (_​1, _​2, and so on for multiple VFs). The VF interface is represented by $iface_​vf in this section.

      For example, if the PF interface is p1p2. the VF spawned above would create VF interface p1p2_​0:

      12: p1p2_0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 7a:79:3c:b0:8f:da brd ff:ff:ff:ff:ff:ff inet 13.100.4.21/24 scope global p1p2_0 valid_lft forever preferred_lft forever
  4. Disable spoof checking and enable trust on the VF interface. ip link set dev $iface_pf vf 0 spoofchk off ip link set dev $iface_pf vf 0 trust on

    Verify spoof checking and trust settings using ip link command:

    11: p1p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 68:05:ca:a3:70:71 brd ff:ff:ff:ff:ff:ff vf 0 MAC 7a:79:3c:b0:8f:da, spoof checking off, link-state auto, trust on 12: p1p2_0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 7a:79:3c:b0:8f:da brd ff:ff:ff:ff:ff:ff Note:Trusted mode must be enabled for TC filters to be created in the hardware on the NIC. If the iavf driver is used without trusted mode enabled, TC filters are added to the software table but not offloaded to hardware, as documented in Fixed and Known Issues - Read First.
  5. Install packages required for VM creation and VM management. Example, on RHEL: yum install qemu-kvm qemu-img libvirt virt-manager
  6. Create a Virtual Machine (VM).
    1. Create a VM using virt-manager Graphical User Interface (GUI) or qemu Command Line Interface (CLI).
    2. Select guest OS during VM creation for VM OS install.
    3. Assign a VF interface to the VM using virt-manager or qemu.
    Note:This document does not include details for creating a VM or assigning a VF to the VM. Refer to SR-IOV documentation for instructions on creating VMs and assigning VFs.

On the SUT Guest OS (inside VM)

  1. Configure VM guest OS environment. Apply all system tunings to the VM from ADQ System Under Test (SUT) Installation and General System Tuning. This include the required kernel with ADQ flags, ice driver with ADQ flags, iproute2, cgroup packages, and various system tunings. Note:Many settings in General System Tuning do not persist between reboots and might need to be reapplied.
  2. Compile and install the iavf driver.
    1. Download the iavf driver and untar: tar -xzvf iavf-${vfdriverver}.tar.gz cd iavf-${vfdriverver}/src
    2. Compile and install the iavf driver: make -j$(nproc) install
    3. Load iavf driver: modprobe iavf sleep 2
  3. Bring up the VF interface inside the VM and assign an IP Address. ip addr add $ipaddr_vf dev $iface_vf ifup $iface_vf

    Verify connectivity with link partner.

    ping $ipaddrclient