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 
operation
to DPDK DMA-dev based enabled devices like Intel® QuickData Technology without
blocking the CPU.

The intention of this patch is solely to communicate the design of the feature,
evaluate the code impact and to get early feedback from the community.

Usage:
To enable DMA offload for vhost path, one can issue the following command:
ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-async-support=true

Issuing this requires restarting the vswitchd daemon.

Please note that, its required to have DMA devices visible to DPDK before OVS 
launch either
by binding them to userspace driver vfio-pci or through other facilities like
assigning specific DSA worker queues to DPDK as mentioned in the driver 
documentation.

The current assignment model is 1 DMA device per data plane thread.
If no DMA devices are found for that thread, it will fall back to perform CPU 
copy.

To check if async support is enabled, one can check for the following message 
in the ovs-vswitchd.log
dpdk|INFO|Async support enabled for vhost-user-client.

To verify if DMA devices are assigned to the data plane thread, one can check 
the ovs-vswitchd.log for messages like:
netdev_dpdk(pmd-c01/id:7)|INFO|DMA device with dev id: 0 assigned to pmd for 
vhost async copy offload.


This patch was tested on :
OVS : branch  : dpdk-latest
with
DPDK : branch : main,
commit id : 45f04d88ae,  version: 21.11.0
+ https://patches.dpdk.org/project/dpdk/list/?series=21041 : v1 of vhost: 
integrate dmadev in asynchronous datapath.
+ https://patches.dpdk.org/project/dpdk/list/?series=21043 : v1 RFC of : vhost: 
support async dequeue data path.

Please note:
        - All the DPDK API's (both vhost async and DMADEV) utilized in the 
patch are experimental.
        - Its required to have atleast one vhost Rxq on every single core since 
currently even the vhost Tx packets are polled for completions from vhost Rx 
context.
        - Packets are not cleared on quiesce currently. So for graceful exit, 
its required to stop the traffic first before stopping OVS.

Future work:
        - Graceful vhost hot plugging.
        - Compatibility with PMD auto load balancing.
        - Clear packets from Rx and Tx queues before quiesce.

V2-> V3:
----------
- update code according to new architecture with dmadev datapath in vhost 
library.
    ○ The dmadev datapath is now moved to the vhost library and OVS is now only 
responsible to configure/use the DMA device.
    ○ This allows OVS the flexibility to decide on the allocation scheme of DMA 
devices.


Sunil Pai G (1):
  netdev-dpdk: Enable vhost async API's in OvS.

 lib/dpdk-stub.c   |   6 +
 lib/dpdk.c        |  28 +++
 lib/dpdk.h        |   1 +
 lib/netdev-dpdk.c | 442 ++++++++++++++++++++++++++++++++++++++++++++--
 4 files changed, 463 insertions(+), 14 deletions(-)

-- 
2.25.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to