Basic SR-IOV - Basic SR-IOV - UG1739

AMD Solarflare X4 Series Ethernet Adapter User Guide (UG1739)

Document ID
UG1739
Release Date
2026-08-04
Revision
1.4 English

In the simplest of SR-IOV supported configurations each physical port is exposed as a single PF (adapter default) and up to 240 VFs.

The AMD Solarflare net driver (sfc.ko) detects that PF/VFs are present from the sfboot configuration and automatically configure the virtual adapters and virtual ports as required.

Adapter firmware also configures the firmware switching functions allowing packets to pass between PF and VFs or from VF to VF.

Figure 1. Basic SR-IOV: Single PF with Multiple VFs
  • With no VLAN configuration, the PFs and VFs are in the same Ethernet layer 2 broadcast domain, so any packet broadcast from the PF is received by all VFs. VLAN tags can optionally be assigned to VFs using standard libvirt commands.
  • The L2 switch supports replication of received/transmitted broadcast packets to all functions.
  • The L2 switch replicates received/transmitted multicast packets to all functions that have subscribed.
  • The MUXER function is a firmware enabled layer2 switching function for transmit and receive traffic.

In the example above there are no virtual machines (VM) created. Network interfaces for the PF and each VF appear in the host. An sfc NIC driver loaded in the host identifies the PF and each VF as individual network interfaces.

Configuring Basic SR-IOV

To configure a basic SR-IOV setup:

  1. Ensure SR-IOV and the IOMMU are enabled on the host server kernel command line.

    Refer to Setting Up the Server for SR-IOV.

  2. Ensure the AMD Solarflare adapter driver (sfc.ko) is installed on the host.
  3. Enable VFs on the adapter by loading a configuration file onto it. These example parameters select the full_featured firmware variant (which is required), and configure two VFs per PF:
    [global]
    firmware_variant=full_featured
    vf_count=2

    Refer to Configuring the Adapter for SR-IOV.

  4. Give the server a cold reboot to perform the adapter reconfiguration.
  5. Create the VFs, up to the maximum number of VFs that you enabled in step 3. For example using sysfs to create two VFs on the eth8 PF:
    echo 2 > /sys/class/net/eth8/device/sriov_numvfs

    Confirm the setting you have made:

    cat /sys/class/net/eth8/device/sriov_totalvfs

    Refer to arz1599571718498.html#arz1599571718498__.

Examining PFs and VFs

You can examine the PFs and VFs to get information about them:

  • To view the PCI® addresses for the PFs and VFs, use the lspci command. The following examples are from a dual-port adapter.

    If the record of PCI® IDs on your server is up to date, output is detailed:

    # lspci -D -d1924:
    0000:03:00.0 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS
    0000:03:00.1 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS
    0000:03:00.2 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS (Virtual Function)
    0000:03:00.3 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS (Virtual Function)
    0000:03:00.4 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS (Virtual Function)
    0000:03:00.5 Ethernet controller: AMD Solarflare NS9480 1/10/25/40/50/100Gb Ethernet Controller PLUS (Virtual Function)

    Otherwise the output shows PCI® device IDs, where the PFs are shown as Device 0c03, and the VFs are presented as eitherDevice 1c03 or Device 3c03:

    # lspci -D -d1924:
    0000:03:00.0 Ethernet controller: AMD Solarflare Device 0c03
    0000:03:00.1 Ethernet controller: AMD Solarflare Device 0c03
    0000:03:00.2 Ethernet controller: AMD Solarflare Device 3c03
    0000:03:00.3 Ethernet controller: AMD Solarflare Device 3c03
    0000:03:00.4 Ethernet controller: AMD Solarflare Device 3c03
    0000:03:00.5 Ethernet controller: AMD Solarflare Device 3c03
  • To view the interface names for the PFs and VFs, use the ifconfig command:
    # ifconfig
    eth4   Link encap:Ethernet HWaddr 74:27:2C:21:00:60
    eth5   Link encap:Ethernet HWaddr 74:27:2C:21:00:61
    eth6   Link encap:Ethernet HWaddr AE:82:AB:C9:67:49
    eth7   Link encap:Ethernet HWaddr 86:B4:C8:9E:27:D6
    eth8   Link encap:Ethernet HWaddr 72:0B:C7:21:E1:59
    eth9   Link encap:Ethernet HWaddr D2:B7:68:54:35:A5

    This example is from a dual-port adapter. The output is abbreviated. It shows two PFs and four VFs:

    • MAC addresses beginning 74:27:2C are AMD Solarflare designated hardware addresses, used for PFs.

      So in this example, the PFs are eth4 and eth5 .

    • MAC addresses assigned to VFs are randomly generated by the host.

      So in this example, the VFs are eth6 - eth9 inclusive.

    • MAC addresses visible to the host are replaced by libvirt-generated MAC addresses in a VM.
  • To identify which physical port a given network interface is using, use the following command:
    # cat /sys/class/net/eth<N>/device/physical_port
  • To identify which PF a given VF is associated with, use the ip link show command:
    # ip link show
    19: eth4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
        link/ether 74:27:2c:21:00:61 brd ff:ff:ff:ff:ff:ff
        vf 0 MAC 76:c1:36:0a:be:2b
        vf 1 MAC 1e:b8:a8:ea:c7:fb
        vf 2 MAC 52:6e:32:3d:50:85
        vf 3 MAC b6:ad:a0:56:39:94

    In this example there are four VFs assigned to PF eth4.