From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id A5F5B1E2F for ; Mon, 29 Oct 2018 17:32:27 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id i17-v6so9368102wre.7 for ; Mon, 29 Oct 2018 09:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=SPCEbdwK85yR3PCQVL2syXJwXu/WCqRtxTNTRv+/ZLo=; b=tmCzHwKWjgzVMA1+YWFZiz9LLVGHOjvVYU1S8F8kAp71pb3/+IPdDUtqBFOTOevkj0 uO/YP20BfYVgnUQe0jLM62qZhYR1IPok56O2y92/l+cf39W875uDU9NAXrM0RIIQonVT ipDeaoPvYmn9PKMDPT2DScANI7fzlFI0LH04QQEFKnjglU6a3F+qGVK7NYKh8UaUHI5/ lHTUggY1rz2AjzgXTV6V+wDjj50rnn9f6TV/oGd40hAGgYNMUc6PrZ+vjloOYLu2hCNQ 8aHub1Vci1LCuIYtvlWKOnPM/2bCQ5pS8rysh8/EWcTlEvv/VRTVgKe3se0sp8aI/phw dRZA== X-Gm-Message-State: AGRZ1gJLDLCtnrLgP8JFDQ2dv/YiKUo2V/hIbfmV7miESf5CriVlAFYs LUsH6eltd+Dva7wibhUOQU8= X-Google-Smtp-Source: AJdET5eFMyqp2AjoQ9vIQrECncnLaJPFgpuDF3yCc/Q+CE2zjnAxA5JIgOBbR4uvF0RTHOOcxTXknQ== X-Received: by 2002:adf:a285:: with SMTP id s5-v6mr15344380wra.100.1540830747173; Mon, 29 Oct 2018 09:32:27 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id d6-v6sm19769003wro.72.2018.10.29.09.32.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 09:32:26 -0700 (PDT) Message-ID: <1540830744.29722.13.camel@debian.org> From: Luca Boccassi To: Ilya Maximets , Maxime Coquelin Cc: dpdk stable Date: Mon, 29 Oct 2018 16:32:24 +0000 In-Reply-To: <1d025844-5d3b-40d0-25c0-221bedf0a252@samsung.com> References: <20181015115144.27626-1-bluca@debian.org> <20181029125329.17729-1-bluca@debian.org> <20181029125329.17729-3-bluca@debian.org> <1d025844-5d3b-40d0-25c0-221bedf0a252@samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-stable] patch 'vhost: fix payload size of reply' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 16:32:27 -0000 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): >=20 > --- > 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) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0vhost_user_set_log_base(dev, &msg); > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0/* it needs a reply */ > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0msg.size =3D sizeof(msg.payload.u64); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0msg.size =3D 0; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0send_vhost_message(fd, &msg); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0break; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0case VHOST_USER_SET_LOG_F= D: > --- >=20 > This is because before commit > e951355ffcae ("vhost: make message handling functions prepare the > reply") > replies was handled in-place by the caller function. >=20 > Best regards, Ilya Maximets. >=20 > On 29.10.2018 15:53, Luca Boccassi wrote: > > Hi, > >=20 > > FYI, your patch has been queued to LTS release 16.11.9 > >=20 > > 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. > >=20 > > 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. > >=20 > > Thanks. > >=20 > > Luca Boccassi > >=20 > > --- > > > From 2fb95d184bf2b7715c9e2696059d41fd044a2d88 Mon Sep 17 00:00:00 > > > 2001 > >=20 > > From: Maxime Coquelin > > Date: Fri, 12 Oct 2018 14:40:32 +0200 > > Subject: [PATCH] vhost: fix payload size of reply > >=20 > > [ upstream commit 57b4d90b5893db2678ca3e28c50e1fcd37bb9b91 ] > >=20 > > 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. > >=20 > > Fixes: 54f9e32305d4 ("vhost: handle dirty pages logging request") > >=20 > > Reported-by: Ilya Maximets > > Signed-off-by: Maxime Coquelin > > Acked-by: Ilya Maximets > > --- > > =C2=A0lib/librte_vhost/vhost_user.c | 6 ++++++ > > =C2=A01 file changed, 6 insertions(+) > >=20 > > 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) > > =C2=A0 dev->log_base =3D dev->log_addr + off; > > =C2=A0 dev->log_size =3D size; > > =C2=A0 > > + /* > > + =C2=A0* The spec is not clear about it (yet), but QEMU doesn't > > expect > > + =C2=A0* any payload in the reply. > > + =C2=A0*/ > > + msg->size =3D 0; > > + > > =C2=A0 return 0; > > =C2=A0} > > =C2=A0 > >=20 --=20 Kind regards, Luca Boccassi