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

2022-07-26 Thread David Marchand
On Tue, Jul 26, 2022 at 10:52 AM Maxime Coquelin 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, > > -

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

2022-07-26 Thread Maxime Coquelin
On 7/25/22 22:32, David Marchand wrote: Having a back reference to the index of the vq in the dev->virtqueue[] array makes it possible to unify the internal API, with only passing dev and vq. It also allows displaying the vq index in log messages. Remove virtqueue index checks where unneeded

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

2022-07-25 Thread David Marchand
Having a back reference to the index of the vq in the dev->virtqueue[] array makes it possible to unify the internal API, with only passing dev and vq. It also allows displaying the vq index in log messages. Remove virtqueue index checks where unneeded (like in static helpers called from a loop on