From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: [PATCH v3 04/19] vhost: fix payload size of reply Date: Thu, 4 Oct 2018 10:13:48 +0200 Message-ID: <20181004081403.8039-5-maxime.coquelin@redhat.com> References: <20181004081403.8039-1-maxime.coquelin@redhat.com> Cc: dgilbert@redhat.com, stable@dpdk.org, Maxime Coquelin To: dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com, nicknickolaev@gmail.com, i.maximets@samsung.com, bruce.richardson@intel.com, alejandro.lucero@netronome.com Return-path: In-Reply-To: <20181004081403.8039-1-maxime.coquelin@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Cc: stable@dpdk.org Reported-by: Ilya Maximets Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 25d050905..8ffe5aa66 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1296,7 +1296,11 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg) dev->log_base = dev->log_addr + off; dev->log_size = size; - msg->size = sizeof(msg->payload.u64); + /* + * The spec is not clear about it (yet), but QEMU doesn't expect + * any payload in the reply. + */ + msg->size = 0; return VH_RESULT_REPLY; } -- 2.17.1