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.ji...@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coque...@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 via email to