DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jiang, Cheng1" <cheng1.jiang@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"Xia, Chenbo" <chenbo.xia@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Hu, Jiayu" <jiayu.hu@intel.com>,
	"Ding, Xuan" <xuan.ding@intel.com>,
	"Ma, WenwuX" <wenwux.ma@intel.com>,
	"Wang, YuanX" <yuanx.wang@intel.com>,
	"Yang, YvonneX" <yvonnex.yang@intel.com>
Subject: RE: [PATCH] add support for async vhost packed ring dequeue
Date: Mon, 20 Jun 2022 12:33:31 +0000	[thread overview]
Message-ID: <BL0PR11MB31875A11FBBD1A4A6E9BF923DCB09@BL0PR11MB3187.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1737263f-55b6-2116-b57f-c700a48c3967@redhat.com>

Hi Maxime,

Sorry for the late reply.
I missed this email somehow.

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Friday, June 17, 2022 9:34 PM
> To: Jiang, Cheng1 <cheng1.jiang@intel.com>; Xia, Chenbo
> <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; Ding, Xuan
> <xuan.ding@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>; Wang,
> YuanX <yuanx.wang@intel.com>; Yang, YvonneX <yvonnex.yang@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@intel.com>
> > Reviewed-by: Maxime Coquelin <maxime.coquelin@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);
>          }


      reply	other threads:[~2022-06-20 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  8:21 Cheng Jiang
2022-06-17 13:33 ` Maxime Coquelin
2022-06-20 12:33   ` Jiang, Cheng1 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BL0PR11MB31875A11FBBD1A4A6E9BF923DCB09@BL0PR11MB3187.namprd11.prod.outlook.com \
    --to=cheng1.jiang@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=wenwux.ma@intel.com \
    --cc=xuan.ding@intel.com \
    --cc=yuanx.wang@intel.com \
    --cc=yvonnex.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).