[dpdk-dev] [PATCH v1 2/2] vhost: introduce async enqueue for split ring
Fu, Patrick
patrick.fu at intel.com
Mon Jun 29 03:25:17 CEST 2020
Hi Maxime,
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Friday, June 26, 2020 10:46 PM
> To: Fu, Patrick <patrick.fu at intel.com>; dev at dpdk.org; Xia, Chenbo
> <chenbo.xia at intel.com>; Wang, Zhihong <zhihong.wang at intel.com>; Ye,
> Xiaolong <xiaolong.ye at intel.com>
> Cc: Jiang, Cheng1 <cheng1.jiang at intel.com>; Liang, Cunming
> <cunming.liang at intel.com>
> Subject: Re: [PATCH v1 2/2] vhost: introduce async enqueue for split ring
>
>
>
> On 6/11/20 12:02 PM, patrick.fu at intel.com wrote:
> > From: Patrick <patrick.fu at intel.com>
> >
> > This patch implement async enqueue data path for split ring.
> >
> > Signed-off-by: Patrick <patrick.fu at 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_ */)
I will update in the v2 version
Thanks,
Patrick
More information about the dev
mailing list