1 Intel AVF device driver
2 =======================
7 This plugins provides native device support for intel Adaptive Virtual
8 Function (AVF). AVF is driver specification for current and future Intel
9 Virtual Function devices. AVF defines communication channel between
10 Physical Functions (PF) and VF. In essence, today this driver can be
11 used only with Intel XL710 / X710 / XXV710 adapters.
16 - Driver requires newer i40e PF linux driver to be installed on the
17 system, which supports virtualchnl interface. This code is tested
18 with i40e driver version 2.4.6.
20 - Driver requires MSI-X interrupt support, which is not supported by
21 uio_pci_generic driver, so vfio-pci needs to be used. On systems
22 without IOMMU vfio driver can still be used with recent kernels which
23 support no-iommu mode.
28 This driver is still in experimental phase, however it shows very good
41 sudo modprobe vfio-pci
43 2. (systems without IOMMU only) enable unsafe NOIOMMU mode
47 echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
49 3. Create and bind SR-IOV virtual function(s)
51 Following script creates VF, assigns MAC address and binds VF to
58 if [ $USER != "root" ] ; then
59 echo "Restarting script with sudo..."
65 cd /sys/bus/pci/devices/${1}
66 driver=$(basename $(readlink driver))
67 if [ "${driver}" != "i40e" ]; then
68 echo ${1} | tee driver/unbind
69 echo ${1} | tee /sys/bus/pci/drivers/i40e/bind
71 ifname=$(basename net/*)
72 echo 0 | tee sriov_numvfs > /dev/null
73 echo 1 | tee sriov_numvfs > /dev/null
74 ip link set dev ${ifname} vf 0 mac ${2}
75 ip link show dev ${ifname}
76 vf=$(basename $(readlink virtfn0))
77 echo ${vf} | tee virtfn0/driver/unbind
78 echo vfio-pci | tee virtfn0/driver_override
79 echo ${vf} | sudo tee /sys/bus/pci/drivers/vfio-pci/bind
80 echo | tee virtfn0/driver_override
83 # Setup one VF on PF 0000:3b:00.0 and assign MAC address
84 setup 0000:3b:00.0 00:11:22:33:44:00
85 # Setup one VF on PF 0000:3b:00.1 and assign MAC address
86 setup 0000:3b:00.1 00:11:22:33:44:01
91 In cases when interface is used in the L2 mode or promisc mode is needed
92 for some other reason, trust needs to be set to “on” using the linux “ip
97 ip link set dev <PF inteface name> vf <VF id> trust on
102 By default Virtual Function is not allowed to send ethernet frames which
103 have source MAC address different than address assigned to the VF. In
104 some cases it is expected that VPP will send such frames (e.g. L2
105 bridging, bonding, l2 cross-connect) and in such cases spoof check needs
106 to be turned off by issuing following command:
110 ip link set dev <PF inteface name> vf <VF id> spoofchk off
115 Interfaces can be dynamically created by using following CLI:
119 create interface avf 0000:3b:02.0
120 set int state avf-0/3b/2/0 up
125 Interface can be deleted with following CLI:
129 delete interface avf <interface name>
134 Interface statistics can be displayed with
135 ``sh hardware-interface <if-name>`` command.