On 6/11/20 12:02 PM, patrick...@intel.com wrote:
> From: Patrick <patrick...@intel.com>
>
> This patch implement async enqueue data path for split ring.
>
> Signed-off-by: Patrick <patrick...@intel.com>
> ---
> lib/librte_vhost/rte_vhost_async.h | 38 +++
> lib/librte_vhost/virtio_net.c | 538
> ++++++++++++++++++++++++++++++++++++-
> 2 files changed, 574 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_vhost/rte_vhost_async.h
> b/lib/librte_vhost/rte_vhost_async.h
> index 82f2ebe..efcba0a 100644
> --- a/lib/librte_vhost/rte_vhost_async.h
> +++ b/lib/librte_vhost/rte_vhost_async.h
> @@ -131,4 +131,42 @@ int rte_vhost_async_channel_register(int vid, uint16_t
> queue_id,
> */
> int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
>
> +/**
> + * This function submit enqueue data to DMA. This function has no
> + * guranttee to the transfer completion upon return. Applications should
> + * poll transfer status by rte_vhost_poll_enqueue_completed()
> + *
> + * @param vid
> + * id of vhost device to enqueue data
> + * @param queue_id
> + * queue id to enqueue data
> + * @param pkts
> + * array of packets to be enqueued
> + * @param count
> + * packets num to be enqueued
> + * @return
> + * num of packets enqueued
> + */
> +uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
> + struct rte_mbuf **pkts, uint16_t count);
> +
> +/**
> + * This function check DMA completion status for a specific vhost
> + * device queue. Packets which finish copying (enqueue) operation
> + * will be returned in an array.
> + *
> + * @param vid
> + * id of vhost device to enqueue data
> + * @param queue_id
> + * queue id to enqueue data
> + * @param pkts
> + * blank array to get return packet pointer
> + * @param count
> + * size of the packet array
> + * @return
> + * num of packets returned
> + */
> +uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
> + struct rte_mbuf **pkts, uint16_t count);
> +
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.
> #endif /* _RTE_VDPA_H_ */
You need to fix the comment here (/* _RTE_VHOST_ASYNC_H_ */)