[PATCH] add support for async vhost packed ring dequeue
Jiang, Cheng1
cheng1.jiang at intel.com
Mon Jun 20 14:33:31 CEST 2022
Hi Maxime,
Sorry for the late reply.
I missed this email somehow.
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Friday, June 17, 2022 9:34 PM
> To: Jiang, Cheng1 <cheng1.jiang at intel.com>; Xia, Chenbo
> <chenbo.xia at intel.com>
> Cc: dev at dpdk.org; Hu, Jiayu <jiayu.hu at intel.com>; Ding, Xuan
> <xuan.ding at intel.com>; Ma, WenwuX <wenwux.ma at intel.com>; Wang,
> YuanX <yuanx.wang at intel.com>; Yang, YvonneX <yvonnex.yang at intel.com>
> Subject: Re: [PATCH] add support for async vhost packed ring dequeue
>
> Hi Cheng,
>
> On 6/13/22 10:21, Cheng Jiang wrote:
> > This patch implements packed ring dequeue data path for asynchronous
> > vhost.
> >
> > Signed-off-by: Cheng Jiang <cheng1.jiang at intel.com>
> > Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> > ---
> > lib/vhost/virtio_net.c | 218
> ++++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 192 insertions(+), 26 deletions(-)
> >
>
> I had to do below changes so that it builds with the series clearing inflight
> packets for async dequeue.
>
> Does that look good to you?
>
Yes, it looks good to me.
Thanks a lot.
Cheng
> Thanks,
> Maxime
>
>
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index
> 0d41e850d2..229e6b32f4 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -27,7 +27,7 @@
> #define MAX_BATCH_LEN 256
>
> static __rte_always_inline uint16_t
> -async_poll_dequeue_completed_split(struct virtio_net *dev, struct
> vhost_virtqueue *vq,
> +async_poll_dequeue_completed(struct virtio_net *dev, struct
> vhost_virtqueue *vq,
> struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
> uint16_t vchan_id, bool legacy_ol_flags);
>
> @@ -2207,12 +2207,7 @@ rte_vhost_clear_queue_thread_unsafe(int vid,
> uint16_t queue_id,
> n_pkts_cpl = vhost_poll_enqueue_completed(dev, queue_id,
> pkts, count, dma_id, vchan_id);
> else {
> - if (unlikely(vq_is_packed(dev)))
> - VHOST_LOG_DATA(ERR,
> - "(%s) %s: async dequeue does not
> support packed ring.\n",
> - dev->ifname, __func__);
> - else
> - n_pkts_cpl =
> async_poll_dequeue_completed_split(dev, vq, pkts, count,
> + n_pkts_cpl = async_poll_dequeue_completed(dev, vq, pkts,
> count,
> dma_id, vchan_id, dev->flags &
> VIRTIO_DEV_LEGACY_OL_FLAGS);
> }
>
> @@ -2271,12 +2266,7 @@ rte_vhost_clear_queue(int vid, uint16_t queue_id,
> struct rte_mbuf **pkts,
> n_pkts_cpl = vhost_poll_enqueue_completed(dev, queue_id,
> pkts, count, dma_id, vchan_id);
> else {
> - if (unlikely(vq_is_packed(dev)))
> - VHOST_LOG_DATA(ERR,
> - "(%s) %s: async dequeue does not
> support packed ring.\n",
> - dev->ifname, __func__);
> - else
> - n_pkts_cpl =
> async_poll_dequeue_completed_split(dev, vq, pkts, count,
> + n_pkts_cpl = async_poll_dequeue_completed(dev, vq, pkts,
> count,
> dma_id, vchan_id, dev->flags &
> VIRTIO_DEV_LEGACY_OL_FLAGS);
> }
More information about the dev
mailing list