[dpdk-dev] [PATCH] vhost: remove a hack on queue allocation

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Mar 22 09:56:12 CET 2017


On Wed, Mar 22, 2017 at 09:41:07AM +0100, Maxime Coquelin wrote:
> 
> 
> On 03/02/2017 07:16 AM, Yuanhan Liu wrote:
> >We used to allocate queues based on the index from SET_VRING_CALL
> >request: if corresponding queue hasn't been allocated, allocate it.
> >
> >Though it's pratically right (it's the first per-vring request we
> >will get from QEMU for vhost-user negotiation), but it's not technically
> >right: it's not documented in the vhost-user spec that it will always
> >be the first per-vring request. For example, SET_VRING_ADDR could also
> >be the first per-vring request.
> >
> >Thus, we should not depend the SET_VRING_CALL on queue allocation.
> >Instead, we could catch all the per-vring messages at the entrance of
> >request handler, and allocate one if it hasn't been allocated before.
> >
> >By that, we could remove a hack.
> >
> >Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> >---
> >
> >v2: add missing break
> >---
> > lib/librte_vhost/vhost_user.c | 61 ++++++++++++++++++++++++++++++++++---------
> > 1 file changed, 48 insertions(+), 13 deletions(-)
> 
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks.

Applied to dpdk-next-virtio.

	--yliu


More information about the dev mailing list