qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Coiby Xu" <coiby.xu@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: Replace GSource with AioContext for chardev
Date: Tue, 14 Apr 2020 14:13:45 +0200	[thread overview]
Message-ID: <20200414121345.GB7747@linux.fritz.box> (raw)
In-Reply-To: <802d831b-e13a-7256-77d8-03c7a064522a@redhat.com>

Am 14.04.2020 um 12:54 hat Paolo Bonzini geschrieben:
> On 14/04/20 12:27, Daniel P. Berrangé wrote:
> > Ignoring back compat, what would be our ideal CLI syntax ?
> > 
> > Current syntax is
> > 
> >   -chardev socket,id=charnet1,path=/tmp/vhost1.sock
> >   -netdev vhost-user,chardev=charnet1,id=hostnet1 
> > 
> > Should we have an option that expresses a "SocketAddress" struct on the
> > CLI ?
> > 
> >    -socket type=unix,path=/tmp/vhost1.sock,id=sock0
> >    -netdev vhost-user,socket=sock0,id=hostnet1
> 
> I think this should be just a "-object socket" that under the covers
> creates a QIOChannel.  There are also ideas of switching "-chardev" to
> "-object"; we could do the reverse of Marc-André's suggestion, and have
> "chardev=" take both a "chardev-foo" object or a QIOChannel object
> (converting the latter to a socket-based chardev).

Is this just an attempt to avoid nesting on the command line? Because I
don't see much use in socket objects that need to be managed separately
and require separate object-add/del commands.

While dotted syntax can make SocketAddress specifications a bit lengthy,
the obvious syntax is:

-netdev vhost-user,socket.type=unix,socket.path=/tmp/vhost1.sock,id=hostnet1

Assuming that this would be a QAPIfied -netdev, JSON is a readily
available alternative syntax.

Kevin



  reply	other threads:[~2020-04-14 12:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 12:46 Replace GSource with AioContext for chardev Coiby Xu
2020-04-09 13:16 ` Marc-André Lureau
2020-04-09 13:24   ` Daniel P. Berrangé
2020-04-14  7:25     ` Markus Armbruster
2020-04-14 10:27       ` Daniel P. Berrangé
2020-04-14 10:54         ` Paolo Bonzini
2020-04-14 12:13           ` Kevin Wolf [this message]
2020-04-15 12:31             ` Daniel P. Berrangé

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=20200414121345.GB7747@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=coiby.xu@gmail.com \
    --cc=fam@euphon.net \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).