[PATCH v3 3/4] vhost: keep a reference to virtqueue index

David Marchand david.marchand at redhat.com
Tue Jul 26 12:00:55 CEST 2022


On Tue, Jul 26, 2022 at 10:52 AM Maxime Coquelin
<maxime.coquelin at redhat.com> wrote:
> > @@ -2275,12 +2267,11 @@ rte_vhost_clear_queue(int vid, uint16_t queue_id, struct rte_mbuf **pkts,
> >       }
> >
> >       if ((queue_id & 1) == 0)
> > -             n_pkts_cpl = vhost_poll_enqueue_completed(dev, queue_id,
> > -                             pkts, count, dma_id, vchan_id);
> > -     else {
> > +             n_pkts_cpl = vhost_poll_enqueue_completed(dev, vq, pkts, count,
> > +                     dma_id, vchan_id);
> > +     else
> >               n_pkts_cpl = async_poll_dequeue_completed(dev, vq, pkts, count,
> > -                                     dma_id, vchan_id, dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS);
> > -     }
> > +                     dma_id, vchan_id, dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS);
>
> One of the two functions should be renamed for consistency, but that's
> not the point of this series.

The async prefix makes sense, so renaming vhost_poll_enqueue_completed
as async_poll_enqueue_completed seems the way to go.
I don't mind sending a separate patch for this.


-- 
David Marchand



More information about the dev mailing list