[ovs-dev] [PATCH ovs v2 0/2] Introduce dpdkvdpa netdev

Noa Ezra noae at mellanox.com
Wed Oct 2 18:15:54 UTC 2019


There are two approaches to communicate with a guest, using virtIO or
SR-IOV.
SR-IOV allows working with port representor which is attached to the
OVS and a matching VF is given with pass-through to the VM.
HW rules can process packets from up-link and direct them to the VF
without going through SW (OVS) and therefore SR-IOV gives the best
performance.
However, SR-IOV architecture requires that the guest will use a driver
which is specific to the underlying HW. Specific HW driver has two main
drawbacks:
1. Breaks virtualization in some sense (VM aware of the HW), can also
   limit the type of images supported.
2. Less natural support for live migration.

Using virtIO interface solves both problems, but reduces performance and
causes losing of some functionality, for example, for some HW offload,
working directly with virtIO cannot be supported.
In order to solve this conflict, we created a new netdev type-dpdkvdpa.
The new netdev is basically similar to a regular dpdk netdev, but it
has some additional functionality for transferring packets from virtIO
guest (VM) to a VF and vice versa. With this solution we can benefit
both SR-IOV and virtIO.
vDPA netdev is designed to support both SW and HW use-cases.
HW mode will be used to configure vDPA capable devices. The support
for this mode is on progress in the dpdk community.
SW acceleration is used to leverage SR-IOV offloads to virtIO guests
by relaying packets between VF and virtio devices and as a pre-step for
supporting vDPA in HW mode.

Running example:
1. Configure OVS bridge and ports:
ovs-vsctl add-br br0-ovs -- set bridge br0-ovs datapath_type=netdev
ovs-vsctl add-port br0-ovs pf -- set Interface pf type=dpdk options: \
        dpdk-devargs=<pf pci id>
ovs-vsctl add-port br0 vdpa0 -- set Interface vdpa0 type=dpdkvdpa \
        options:vdpa-socket-path=<sock path> \
        options:vdpa-accelerator-devargs=<vf pci id> \
        options:dpdk-devargs=<pf pci id>,representor=[id]
2. Run a virtIO guest (VM) in server mode that creates the socket of
   the vDPA port.
3. Send traffic.

Noa Ezra (2):
  netdev-dpdk-vdpa: Introduce dpdkvdpa netdev
  netdev-dpdk: Add dpdkvdpa port

 NEWS                   |   1 +
 lib/automake.mk        |   4 +-
 lib/netdev-dpdk-vdpa.c | 750 +++++++++++++++++++++++++++++++++++++++++++++++++
 lib/netdev-dpdk-vdpa.h |  54 ++++
 lib/netdev-dpdk.c      | 162 +++++++++++
 vswitchd/vswitch.xml   |  25 ++
 6 files changed, 995 insertions(+), 1 deletion(-)
 create mode 100755 lib/netdev-dpdk-vdpa.c
 create mode 100644 lib/netdev-dpdk-vdpa.h

-- 
1.8.3.1



More information about the dev mailing list