qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace GSource with AioContext for chardev


From: Daniel P . Berrangé
Subject: Re: Replace GSource with AioContext for chardev
Date: Wed, 15 Apr 2020 13:31:04 +0100
User-agent: Mutt/1.13.3 (2020-01-12)

On Tue, Apr 14, 2020 at 02:13:45PM +0200, Kevin Wolf wrote:
> 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.

I'd be fine with this approach too.  I'm not bothered about the dotted
syntax being verbose, as that battle is already lost, and can only be
solved by switching to a different config approach, such as reading
an actual json file.  IOW, we'd not be making life worse than it already
is.

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 via email to

[Prev in Thread] Current Thread [Next in Thread]