Based on ConnectX-6 What is the different of [VirtIO Acceleration through VF Relay (Software & Hardware vDPA)] and [VirtIO Acceleration through Hardware vDPA] which is in Documents of [MLNX_EN Documentation Rev 5.3-1.0.0.1__07_09_2021.pdf]

In document [MLNX_EN Documentation Rev 5.3-1.0.0.1__07_09_2021.pdf], there are two sections, called [VirtIO Acceleration through VF Relay (Software & Hardware vDPA)] and [VirtIO Acceleration through Hardware vDPA] respectively, I’m confused what is the difference of these two modes.

Hi Jianquan,

vDPA allows the connection to the VM to be established using VirtIO, so that the data-plane is built between the SR-IOV VF and the standard VirtIO driver within the VM, while the control-plane is managed on the host by the vDPA application.

Two flavors of vDPA are supported, Software vDPA and Hardware vDPA.

In general, SW solution uses emulated driver which simulates HW supports, wastes more CPUs and can work on older NICs which don’t support HW plugin.

For more information, please refer to the below article, sections: VirtIO Acceleration through VF Relay (Software vDPA) and VirtIO Acceleration through Hardware vDPA.

https://docs.mellanox.com/m/view-rendered-page.action?abstractPageId=52011200#

Thanks,

Chen

I know what you mean, Hardware vDPA is better in performance compared with software vDPA. What confuse me most is the difference between [VirtIO Acceleration through VF Relay (Software & Hardware vDPA)] and [VirtIO Acceleration through Hardware vDPA], Is VF Relay with Hardware vDPA is different with Hardware vDPA? What’s the difference?

I have read the attached link page​, and have practice with ConnectX-6 in the lab, could you please give me more information/documents about the hardware acceleration principle, or simply, how hardware vDPA works, thank you.

We support hardware vDPA from CX6Dx.

While both work in accelerating virtio, the difference is quite big:

ConnectX-6Dx has a dedicated processing unit (ACE) which can emulate virtio software.

Unlike previous different solutions, virtio datapath is not handled by software, but directly by hardware.

This provides several advantages:

  • No CPU utilization due to memcopy for packets between virtio ring to DPDK / OVS
  • Can run via separate instance using DPDK vDPA driver or using OVS-DPDK
  • Better scaling for many devices (64/127 VFs)

VF relay was gen1 solution, which can also run on ConnectX-5.

With VF Relay, the software (OVS) opens a dpdk port which translates between phy port to virtIO port. It takes packets from the Rx queue and sends them to the suitable Tx queue, and allows transfer of packets from virtIO guest. DPDK mlx5 rx_burst/tx_burst functions are used for datapath. This approach is costly on CPU but provides better performance than legacy virtio solution.

Thanks,

Chen

Sorry, I’m a little confused. In sentence​ [please refer to the below article, sections: VirtIO Acceleration through VF Relay (Software vDPA) and VirtIO Acceleration through Hardware vDPA.], you just said two situations, VF Relay based on software vDPA and VirtIO Acceleration through Hardware vDPA. However, in my oppion, there are three situations:

1. VF Relay based on software vDPA;

2. VF Relay based on hardware vDPA;

3. VirtIO Acceleration through Hardware vDPA;

The section name is [VirtIO Acceleration through VF Relay (Software & Hardware vDPA)], so I think the first two situations are included in this section.

The difference between situation 1 and situation 2 is easy to distinguish, but what is the difference between situation 2 and situation 3.

In situation 2, Vitual Fumction is exposed in host machine, while in situation 3, just Virtio-net port is exposed in host machine?

VF relay is SW solution only (no HW in VF relay).

VirtIO Acceleration through Hardware vDPA is HW based, on ConnectX-6 and BF-2.

The difference between the SW solution (VF relay) and HW solution is described in my previous comment.

Thanks,

Chen

That means, there are some mistakes in section name of [VirtIO Acceleration through VF Relay (Software & Hardware vDPA)] ?

In the document, command [# ovs-vsctl add-port br0 vdpa0 – set Interface vdpa0 type=dpdkvdpa options:vdpa-socket-path=/tmp/sock-virtio0 options:vdpa-accelerator-devargs=0000:5e:00.2 options:dpdk-devargs=0000:5e:00.0,representor=[0] options:vdpa-max-queues=8 [options:vdpa-sw=true]] isused for VF Relay based Software/Hardware vDPA through adding [options:vdpa-sw=true] or not. While in section Running Hardware vDPA, command [./vdpa -w ,class=vdpa --log-level=pmd,info – -i] is needed.

The document is attached, in page 152 and page 156.