On 6/11/20 12:02 PM, patrick...@intel.com wrote:
> From: Patrick <patrick...@intel.com>
> 
> This patch introduces registration/un-registration APIs
> for async data path together with all required data
> structures and DMA callback function proto-types.
> 
> Signed-off-by: Patrick <patrick...@intel.com>
> ---
>  lib/librte_vhost/Makefile          |   3 +-
>  lib/librte_vhost/rte_vhost.h       |   1 +
>  lib/librte_vhost/rte_vhost_async.h | 134 
> +++++++++++++++++++++++++++++++++++++
>  lib/librte_vhost/socket.c          |  20 ++++++
>  lib/librte_vhost/vhost.c           |  74 +++++++++++++++++++-
>  lib/librte_vhost/vhost.h           |  30 ++++++++-
>  lib/librte_vhost/vhost_user.c      |  28 ++++++--
>  7 files changed, 283 insertions(+), 7 deletions(-)
>  create mode 100644 lib/librte_vhost/rte_vhost_async.h
> 

> +/**
> + * register a dma channel for vhost
> + *
> + * @param vid
> + *  vhost device id DMA channel to be attached to
> + * @param queue_id
> + *  vhost queue id DMA channel to be attached to
> + * @param features
> + *  DMA channel feature bit
> + *    b0       : DMA supports inorder data transfer
> + *    b1  - b15: reserved
> + *    b16 - b27: Packet length threshold for DMA transfer
> + *    b28 - b31: reserved
> + * @param ops
> + *  DMA operation callbacks
> + * @return
> + *  0 on success, -1 on failures
> + */
> +int rte_vhost_async_channel_register(int vid, uint16_t queue_id,
> +     uint32_t features, struct rte_vhost_async_channel_ops *ops);
> +
> +/**
> + * unregister a dma channel for vhost
> + *
> + * @param vid
> + *  vhost device id DMA channel to be detached
> + * @param queue_id
> + *  vhost queue id DMA channel to be detached
> + * @return
> + *  0 on success, -1 on failures
> + */
> +int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);

These new APIs need to be tagged as experimental. We'll need a few
releases before considering them stable.

You need to add them to rte_vhost_version.map too.

Reply via email to