[ovs-dev] [PATCH RFC dpdk-latest 0/1] netdev-dpdk: Enable DPDK vHost async API's

Sunil Pai G sunil.pai.g at intel.com
Fri Oct 23 09:48:44 UTC 2020

This series brings in the new asynchronous vHost API's in DPDK to OVS.
With the asynchronous framework, vHost-user can offload the memory copy operations
to the hardware like Intel® QuickData Technology without blocking the CPU.

This series also attempts to highlight noteable issues
associated with enabling asynchronous data path in OVS.

Currently OVS seems to be quite synchronous in nature in terms of packet data path.
This poses a problem in implementing the async data path as there doesnt seem to be a clean way to
free the packets at a later point in time without breaking abstractions.
Which is why the free for asynchronously sent packets is currently done at the dpif level per PMD.

It should also be noted that the DPDK libraries used in the series(raw/ioat and vHost async)
are currently experimental in nature.

One can enable OVS to use the vHost async data path via :
ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-async-copy-support=true
Note: This attribute must be set before adding the vhost ports.

Followed by setting the vhost async attributes:
ovs-vsctl set Interface <vhost_interface_name> \
options:vhost-async-attr="(txq#,hardware channel DBDF,Async threshold in bytes),..."
ex: ovs-vsctl set Interface vhostuserclient0 options:vhost-async-attr="(txq0,00:04.0,256)"

1. The hardware channel must be bound to a userspace driver like VFIO/IGB UIO,
   and will be statically mapped to the provided TXQ.
2. The async threshold provided in the vhost-async-attr is suggestive to the DPDK vHost library
   to switch between CPU and hardware pipeline.
   For ex:
   Lets assume the async threshold is set to 256 bytes for txq0.
   The vHost library will pick the CPU pipeline for packets less than 256 bytes
   and the hardware pipleline otherwise.

This patch was tested on:
OVS branch  : dpdk-latest
DPDK branch : 20.11-rc1

1. Update documentation.
2. Introduce debuggability.
3. Further investigation on where and when to free the packets sent via async data path.

Sunil Pai G (1):
  netdev-dpdk: Enable DPDK vHost async API's.

 lib/dpdk-stub.c   |   6 +
 lib/dpdk.c        |  13 ++
 lib/dpdk.h        |   1 +
 lib/dpif-netdev.c |  19 +-
 lib/netdev-dpdk.c | 548 +++++++++++++++++++++++++++++++++++++++++++++-
 lib/netdev-dpdk.h |   3 +
 6 files changed, 579 insertions(+), 11 deletions(-)


More information about the dev mailing list