From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 51D761B465; Tue, 9 Oct 2018 12:22:44 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 03:22:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,360,1534834800"; d="scan'208";a="269731104" Received: from btwcube1.sh.intel.com (HELO debian) ([10.67.104.158]) by fmsmga005.fm.intel.com with ESMTP; 09 Oct 2018 03:22:40 -0700 Date: Tue, 9 Oct 2018 18:21:25 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, zhihong.wang@intel.com, jfreimann@redhat.com, nicknickolaev@gmail.com, i.maximets@samsung.com, bruce.richardson@intel.com, alejandro.lucero@netronome.com, dgilbert@redhat.com, stable@dpdk.org Message-ID: <20181009102125.GA27427@debian> References: <20181008152557.14275-1-maxime.coquelin@redhat.com> <20181008152557.14275-5-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181008152557.14275-5-maxime.coquelin@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v4 04/19] vhost: fix payload size of reply X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 10:22:44 -0000 On Mon, Oct 08, 2018 at 05:25:42PM +0200, Maxime Coquelin wrote: > 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 > Acked-by: Ilya Maximets > --- > 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 7f3e86778..71a0e7dd7 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; I think the spec is clear about it that no payload is expected in the reply: https://github.com/qemu/qemu/blob/7c69b7c84964/docs/interop/vhost-user.txt#L496 But below line in the spec needs to be fixed: https://github.com/qemu/qemu/blob/7c69b7c84964/docs/interop/vhost-user.txt#L495 > > return VH_RESULT_REPLY; > } > -- > 2.17.1 >