DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Cheng Jiang <cheng1.jiang@intel.com>, chenbo.xia@intel.com
Cc: dev@dpdk.org, jiayu.hu@intel.com, xuan.ding@intel.com,
	wenwux.ma@intel.com, yuanx.wang@intel.com,
	yvonnex.yang@intel.com
Subject: Re: [PATCH] add support for async vhost packed ring dequeue
Date: Fri, 17 Jun 2022 15:33:44 +0200	[thread overview]
Message-ID: <1737263f-55b6-2116-b57f-c700a48c3967@redhat.com> (raw)
In-Reply-To: <20220613082159.40077-1-cheng1.jiang@intel.com>

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?

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-17 13:33 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 [this message]
2022-06-20 12:33   ` Jiang, Cheng1

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=1737263f-55b6-2116-b57f-c700a48c3967@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=cheng1.jiang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.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).