From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v6 05/11] vhost-user: add vhost_user_gpu_set_socket()
Date: Mon, 29 Apr 2019 11:01:14 -0400 [thread overview]
Message-ID: <20190429105933-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20190429071243.icqw3qbzcxbcz7ph@sirius.home.kraxel.org>
On Mon, Apr 29, 2019 at 09:12:43AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > > What questions for example?
> >
> > This opens up different kind of possible replies, and error handling.
> >
> > With current proposal and needs, the reply (or absence of reply) is
> > entirely driven by the request.
> >
> > With your proposal, should all request have a reply?
>
> Yes.
>
> > which makes a lot
> > more code synchronous,
>
> Why? You don't have to wait for the reply before sending the next
> request.
>
> Adding a request id to the messages might be useful, so it is possible
> to wait for a reply to a specific message without having to keeping
> track of all in-flight messages.
>
> > and complicates both sides unnecessarily.
>
> Having headers in the reply allows it to process them in generic code.
> There is a size header for the reply, so you can parse the stream
> without knowing what replay to expect. You can use the status field to
> indicate the payload, simliar to virtio-gpu which has response code
> OK_NODATA, some OK_$whatpayload and some ERR_$failure codes.
>
> You can dispatch based on the response/status code and run *fully*
> asynchronous without too much trouble.
>
> > > > Can we leave that for future protocol extensions negotiated with
> > > > GET/SET_PROTOCOL_FEATURES ?
> > >
> > > I don't think negotiating such a basic protocol change is a good idea.
> >
> > Well, then I would rather focus on improving protocol negociation,
> > rather than adding unnecessary protocol changes.
> >
> > Given that GET/SET_PROTOCOL_FEATURES is the first messages being sent,
> > why couldn't it have flags indicating new protocol revision?
>
> A properly structed reply allows a different approach in reply
> processing (see above). But that only works if it is in the protocol
> right from the start. As add-on feature it can't provide the benefits
> because the reply parser must be able to handle both protocol variants.
>
> cheers,
> Gerd
I think it can in theory - but if we know we want a feature we should
just add it as mandatory. More options does imply more overhead.
--
MST
next prev parent reply other threads:[~2019-04-29 15:01 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 13:19 [Qemu-devel] [PATCH v6 00/11] vhost-user for input & GPU Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 01/11] Add vhost-user-backend Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 02/11] Add vhost-user-input-pci Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-26 7:11 ` Gerd Hoffmann
2019-04-26 7:11 ` Gerd Hoffmann
2019-04-26 9:28 ` Marc-André Lureau
2019-04-26 9:28 ` Marc-André Lureau
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 03/11] libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 04/11] contrib: add vhost-user-input Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-26 7:15 ` Gerd Hoffmann
2019-04-26 7:15 ` Gerd Hoffmann
2019-04-26 10:02 ` Marc-André Lureau
2019-04-26 10:02 ` Marc-André Lureau
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 05/11] vhost-user: add vhost_user_gpu_set_socket() Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-26 7:24 ` Gerd Hoffmann
2019-04-26 7:24 ` Gerd Hoffmann
2019-04-26 11:49 ` Marc-André Lureau
2019-04-26 11:49 ` Marc-André Lureau
2019-04-26 12:05 ` Gerd Hoffmann
2019-04-26 12:05 ` Gerd Hoffmann
2019-04-26 12:15 ` Marc-André Lureau
2019-04-26 12:15 ` Marc-André Lureau
2019-04-29 7:12 ` Gerd Hoffmann
2019-04-29 7:12 ` Gerd Hoffmann
2019-04-29 10:50 ` Marc-André Lureau
2019-04-29 10:50 ` Marc-André Lureau
2019-04-29 14:32 ` Gerd Hoffmann
2019-04-29 14:32 ` Gerd Hoffmann
2019-04-29 15:01 ` Michael S. Tsirkin [this message]
2019-04-29 15:01 ` Michael S. Tsirkin
2019-04-23 13:19 ` [Qemu-devel] [PATCH v6 06/11] virtio: add virtio-gpu bswap helpers header Marc-André Lureau
2019-04-23 13:19 ` Marc-André Lureau
2019-04-23 13:20 ` [Qemu-devel] [PATCH v6 07/11] util: compile drm.o on Linux Marc-André Lureau
2019-04-23 13:20 ` Marc-André Lureau
2019-04-23 13:20 ` [Qemu-devel] [PATCH v6 08/11] contrib: add vhost-user-gpu Marc-André Lureau
2019-04-23 13:20 ` Marc-André Lureau
2019-04-26 7:46 ` Gerd Hoffmann
2019-04-26 7:46 ` Gerd Hoffmann
2019-04-26 13:46 ` Marc-André Lureau
2019-04-26 13:46 ` Marc-André Lureau
2019-04-23 13:20 ` [Qemu-devel] [PATCH v6 09/11] virtio-gpu: split virtio-gpu, introduce virtio-gpu-base Marc-André Lureau
2019-04-23 13:20 ` Marc-André Lureau
2019-04-23 13:20 ` [Qemu-devel] [PATCH v6 10/11] virtio-gpu: split virtio-gpu-pci & virtio-vga Marc-André Lureau
2019-04-23 13:20 ` Marc-André Lureau
2019-04-23 13:20 ` [Qemu-devel] [PATCH v6 11/11] hw/display: add vhost-user-vga & gpu-pci Marc-André Lureau
2019-04-23 13:20 ` Marc-André Lureau
2019-04-23 15:32 ` [Qemu-devel] [PATCH v6 00/11] vhost-user for input & GPU no-reply
2019-04-23 15:32 ` no-reply
2019-04-23 16:09 ` no-reply
2019-04-23 16:09 ` no-reply
2019-04-24 13:20 ` Michael S. Tsirkin
2019-04-24 13:20 ` Michael S. Tsirkin
2019-04-24 13:50 ` Marc-André Lureau
2019-04-24 13:50 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190429105933-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).