[dpdk-stable] patch 'vhost: fix payload size of reply' has been queued to LTS release 16.11.9

Luca Boccassi bluca at debian.org
Mon Oct 29 17:32:24 CET 2018


Great, thanks for the heads-up, I've changed as suggested.

On Mon, 2018-10-29 at 16:12 +0300, Ilya Maximets wrote:
> Hi,
> I'm not sure if we need to backport this change because
> sending the payload doesn't cause any issues in current
> QEMU implementation.
> Anyway, If you want to do that, the change should be done
> like this (and some comments merge will be needed):
> 
> ---
> diff --git a/lib/librte_vhost/vhost_user.c
> b/lib/librte_vhost/vhost_user.c
> index 04c92ceb3..44b792420 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -1114,7 +1114,7 @@ vhost_user_msg_handler(int vid, int fd)
>                 vhost_user_set_log_base(dev, &msg);
>  
>                 /* it needs a reply */
> -               msg.size = sizeof(msg.payload.u64);
> +               msg.size = 0;
>                 send_vhost_message(fd, &msg);
>                 break;
>         case VHOST_USER_SET_LOG_FD:
> ---
> 
> This is because before commit
> e951355ffcae ("vhost: make message handling functions prepare the
> reply")
> replies was handled in-place by the caller function.
> 
> Best regards, Ilya Maximets.
> 
> On 29.10.2018 15:53, Luca Boccassi wrote:
> > Hi,
> > 
> > FYI, your patch has been queued to LTS release 16.11.9
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
> > yet.
> > It will be pushed if I get no objections before 10/31/18. So please
> > shout if anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream
> > commit vs the patch applied
> > to the branch. If the code is different (ie: not only metadata
> > diffs), due for example to
> > a change in context or macro names, please double check it.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > > From 2fb95d184bf2b7715c9e2696059d41fd044a2d88 Mon Sep 17 00:00:00
> > > 2001
> > 
> > From: Maxime Coquelin <maxime.coquelin at redhat.com>
> > Date: Fri, 12 Oct 2018 14:40:32 +0200
> > Subject: [PATCH] vhost: fix payload size of reply
> > 
> > [ upstream commit 57b4d90b5893db2678ca3e28c50e1fcd37bb9b91 ]
> > 
> > QEMU doesn't expect any payload for the reply of
> > VHOST_USER_SET_LOG_BASE request, so don't send any.
> > Note that the Vhost-user specification isn't clear about
> > it and would need to be fixed.
> > 
> > Fixes: 54f9e32305d4 ("vhost: handle dirty pages logging request")
> > 
> > Reported-by: Ilya Maximets <i.maximets at samsung.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> > Acked-by: Ilya Maximets <i.maximets at samsung.com>
> > ---
> >  lib/librte_vhost/vhost_user.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/lib/librte_vhost/vhost_user.c
> > b/lib/librte_vhost/vhost_user.c
> > index f3b286e72..a88f19aae 100644
> > --- a/lib/librte_vhost/vhost_user.c
> > +++ b/lib/librte_vhost/vhost_user.c
> > @@ -911,6 +911,12 @@ vhost_user_set_log_base(struct virtio_net
> > *dev, struct VhostUserMsg *msg)
> >  	dev->log_base = dev->log_addr + off;
> >  	dev->log_size = size;
> >  
> > +	/*
> > +	 * The spec is not clear about it (yet), but QEMU doesn't
> > expect
> > +	 * any payload in the reply.
> > +	 */
> > +	msg->size = 0;
> > +
> >  	return 0;
> >  }
> >  
> > 

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list