qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	libvir-list <libvir-list@redhat.com>,
	"Hoffmann, Gerd" <kraxel@redhat.com>,
	"Liu, Changpeng" <changpeng.liu@intel.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Felipe Franciosi <felipe@nutanix.com>,
	Gonglei <arei.gonglei@huawei.com>,
	"Coquelin, Maxime" <maxime.coquelin@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Kaplansky, Victor" <victork@redhat.com>,
	"Armbruster, Markus" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends
Date: Wed, 31 Oct 2018 16:04:30 +0000	[thread overview]
Message-ID: <20181031160430.GN9625@redhat.com> (raw)
In-Reply-To: <CAMxuvayaPxq1EJATVVsQUvA1bktUoUPZmez+-O4R2U81g-Vvfg@mail.gmail.com>

On Wed, Oct 31, 2018 at 07:44:36PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Oct 16, 2018 at 4:14 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > > > It just reinvents the chardev unix socket syntax, but in a
> > > > different adhoc manner, which is repeating the mistake we have
> > > > made time & again in QEMU. Using QAPI we can directly accept
> > > > the ChardevSocket syntax we already know about. Instead of
> > > > having --socket-path and --fd and documenting that they are
> > > > mutually exclusive ChardevSocket QAPI schema provides that
> > > > representation in a well defined format which is discoverable
> > > > and QEMU and mgmt apps already understand.
> > >
> > > That would require external vhost-user backends to implement QAPI/json
> > > parsing. Is this necessary for a vhost-user backend? I doubt it.
> >
> > They could, but would not be required, to implement QAPI/json parser.
> >
> > The QAPI schema defines a standard for how to model & interpret the
> > non-scalar values for command line arguments. An external impl would
> > need to ensure that whatever parsing it does for CLI args is semantically
> > compatible with the parsing rules defined by the QEMU QAPI schema we
> > define to ensure interoperability of its impl.
> 
> So you would want to have something like?
> 
> --chardev '{ "id" : "bar", "backend" : { "type" : "socket", "data" : {
> "addr" : { "type": "unix", "path": "/tmp/foo.sock" }, "server":
> "false"  } } }'

I wasn't specificially suggesting json syntax. Just the flattened
dot separate syntax, whose valid components are mapped to corresponding
qapi schema defintions. eg closer to what we have already today

  --chardev socket,id=bar,path=/tmp/foo.sock,server

>
> instead of:
> 
> --socket-path=/tmp/foo.sock
> 
> I don't really get what that will help with, for the vhost-user backend case...

It avoids presuming that we forever want to launch the backend with
a single socket path and nothing else. Using the chardev, means we
can choosen between client/server mode. We can choose whether to
pass an FD to the socket, instead of the socket path. Whether the
reconnect flag is set or not, and all the other aspects of a chardev
you can define.

I don't think we should have to add more & more adhoc CLI args (--socket-path,
--fd, --reconnect, etc) and then manually parse them & pack their values
together into a chardev object.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2018-10-31 16:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 13:52 [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends Marc-André Lureau
2018-10-05 13:50 ` Ján Tomko
2018-10-05 14:23   ` Marc-André Lureau
2018-10-05 15:58     ` Hoffmann, Gerd
2018-10-05 22:32       ` Marc-André Lureau
2018-10-10  9:59         ` Hoffmann, Gerd
2018-10-11 15:48 ` Daniel P. Berrangé
2018-10-12  9:37   ` Daniel P. Berrangé
2018-10-12 10:23     ` Gerd Hoffmann
2018-10-12 10:28       ` Daniel P. Berrangé
2018-10-12  9:43   ` Marc-André Lureau
2018-10-12  9:55     ` Daniel P. Berrangé
2018-10-16 10:47       ` Marc-André Lureau
2018-10-16 12:14         ` Daniel P. Berrangé
2018-10-31 15:44           ` Marc-André Lureau
2018-10-31 16:04             ` Daniel P. Berrangé [this message]
2018-11-01  8:32               ` 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=20181031160430.GN9625@redhat.com \
    --to=berrange@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=changpeng.liu@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=kraxel@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=victork@redhat.com \
    /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).