Re: [Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()

2018-06-19 Thread Gerd Hoffmann
On Tue, Jun 19, 2018 at 11:01:00AM +0200, Marc-André Lureau wrote: > Hi > > On Tue, Jun 19, 2018 at 8:23 AM, Gerd Hoffmann wrote: > >> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev, > >> VhostUserMsg *msg) > >> error_report("Failed to read msg header." > >>

Re: [Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()

2018-06-19 Thread Marc-André Lureau
Hi On Tue, Jun 19, 2018 at 8:23 AM, Gerd Hoffmann wrote: >> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev, >> VhostUserMsg *msg) >> error_report("Failed to read msg header." >> " Size %d exceeds the maximum %zu.", msg->hdr.size, >>

Re: [Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()

2018-06-18 Thread Gerd Hoffmann
> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev, > VhostUserMsg *msg) > error_report("Failed to read msg header." > " Size %d exceeds the maximum %zu.", msg->hdr.size, > VHOST_USER_PAYLOAD_SIZE); > -goto fail; > +ret

[Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()

2018-06-18 Thread Marc-André Lureau
Split vhost_user_read(), so only header can be read with vhost_user_read_header(). Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 5b