Creating a Virtual Function on the Host Server
|
|
Notes:
|
This procedure enables SR-IOV for the BlueField-3 network function and creates one Virtual Function (VF) to be dedicated to a workload.
For reference, use NVIDIA DOCA Documentation > BlueField SR-IOV.
All low-level BlueField-3 configuration is performed using the Mellanox Firmware Tools (MFT).
Procedure:
-
Connect to the command line on the Host Server and log in.
-
Start the "MST" service:
sudo mst start -
Make sure the MST devices are available:
sudo mst status -vIn this output, locate the BlueField-3 network interface.
-
Identify the BlueField-3 network interface and the MST device.
In our example, we use only channel 0:
-
Host Server Physical Function (PF) interface:
ens2f0 -
MST device:
/dev/mst/mt41686_pciconf0
Important - Always make sure the BlueField-3 network interface and the MST device correspond to the same PCI function.
-
-
Check whether the SR-IOV support is already enabled for the identified BlueField-3 network interface:
sudo ls /sys/class/net/ens2f0/device/sriov_numvfs-
If the file exists, then SR-IOV is already enabled. Skip to the next step.
-
If the file does not exist:
-
Run these commands to enable SR-IOV for the identified the MST device:
sudo mlxconfig -e -d /dev/mst/mt41686_pciconf0 s PF_NUM_OF_VF_VALID=1sudo mlxconfig -e -d /dev/mst/mt41686_pciconf0 s PF_NUM_OF_VF=1 -
Reboot the Host Server (a full power cycle is required).
-
-
-
Create the Virtual Function (VF) for the identified BlueField-3 network interface:
echo 1 | sudo tee /sys/class/net/ens2f0/device/sriov_numvfsThis creates one Host Server VF (in our example, "
ens2f0v0") and a corresponding DPU VF representor (in our example, "pf0vf0"). -
Bring up the Host Server VF:
sudo ip link set ens2f0v0 up -
Assign an IP address to the Host Server VF:
sudo ip addr add 20.20.20.8/8 dev ens2f0v0 -
Examine the VF on the Host Server:
sudo ip link show ens2f0v0 -
Examine the VF on the DPU:
sudo ip link show | grep pf0vf
At this point the VF exists, it is up, and has an IP address assigned.