NVIDIA BlueField Virtio-net v24.07
NVIDIA BlueField Virtio-net v24.07

Transitional Device

A transitional device is a virtio device which supports drivers conforming to virtio specification 1.x and legacy drivers operating under virtio specification 0.95 (i.e., legacy mode) so servers with old Linux kernels can still utilize virtio-based technology.

Info

Currently, only transitional VF device is supported.

Note

Host kernel version must be newer than v6.9.

Note

When using this feature, vfe-vdpa-dpdk solutions cannot be used anymore, including vfe-vdpa-dpdk live migration.

Note

Libvirt does not support the virtio_vfio_pci kernel driver. Use the QEMU command line to start the VM instead.

  1. Configure virtio-net SR-IOV. R efer to "Virtio-net Deployment" for details.

  2. Modify configuration file to add the "lm_prov": "kernel" option.

    Copy
    Copied!
                

    [dpu]# cat /opt/mellanox/mlnx_virtnet/virtnet.conf { ... "lm_prov": "kernel", ... }

  3. Restart the virtio-net controller for the configuration to take effect:

    Copy
    Copied!
                

    [dpu]# systemctl restart virtio-net-controller.service

  4. Create virtio-net VF devices on the host:

    Copy
    Copied!
                

    [host]# modprobe -v virtio_pci [host]# modprobe -v virtio_net [host]# echo <vf_num> > /sys/bus/pci/devices/<pf_bdf>/sriov_numvfs

  5. Bind the VF devices with the virtio_vfio_pci kernel driver:

    Copy
    Copied!
                

    [host]# echo <vf_bdf> > /sys/bus/pci/devices/<vf_bdf>/driver/unbind [host]# echo 0x1af4 0x1041 > /sys/bus/pci/drivers/virtio_vfio_pci/new_id [host]# modprobe -v virtio_vfio_pci [host]# lspci -s <vf_bdf> -vvv | grep -i virtio_vfio_pci Kernel driver in use: virtio_vfio_pci

  6. Add the following option into the QEMU cmdline to passthrough the VF device into the VM:

    Copy
    Copied!
                

    -device vfio-pci,host=<vf_bdf>,id=hostdev0,bus=pci.<#BUS_IN_VM>,addr=<#FUNC_IN_VM>

  7. Load virtio-net driver as legacy mode inside the VM:

    Copy
    Copied!
                

    [vm]# modprobe -v virtio_pci force_legacy=1 [vm]# modprobe -v virtio_net [vm]# lspci -s <vf_bdf_in_vm> -n 00:0a.0 0200: 1af4:1000

  8. Verify that the VF is a transitional device:

    Copy
    Copied!
                

    [dpu]# virtnet query -p <pf_id> -v <vf_id> | grep transitional "transitional": 1,

© Copyright 2024, NVIDIA. Last updated on Aug 14, 2024.