qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 02/10] qemu-options: update to show preferred boolean syntax for -chardev
Date: Wed, 17 Feb 2021 10:10:57 +0000	[thread overview]
Message-ID: <YCzrsWuxoXXolo8U@redhat.com> (raw)
In-Reply-To: <CAFEAcA8Pjz8SuzuZVKNGCmS-QkewD-0MLSu+coOOvG88jKJq5Q@mail.gmail.com>

On Tue, Feb 16, 2021 at 09:08:39PM +0000, Peter Maydell wrote:
> On Tue, 16 Feb 2021 at 19:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > The preferred syntax is to use "foo=on|off", rather than a bare
> > "foo" or "nofoo".
> >
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > -    "-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay][,reconnect=seconds]\n"
> > -    "         [,server][,nowait][,telnet][,websocket][,reconnect=seconds][,mux=on|off]\n"
> > +    "-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,delay=on|off][,reconnect=seconds]\n"
> 
> Watch out, 'nodelay' is a special case, where the option name itself
> starts with 'no':
> 
> { 'struct': 'ChardevSocket',
>   'data': { 'addr': 'SocketAddressLegacy',
>             '*tls-creds': 'str',
>             '*tls-authz'  : 'str',
>             '*server': 'bool',
>             '*wait': 'bool',
>             '*nodelay': 'bool',
>             '*telnet': 'bool',
>             '*tn3270': 'bool',
>             '*websocket': 'bool',
>             '*reconnect': 'int' },
>   'base': 'ChardevCommon' }
> 
> (because it's setting the TCP_NODELAY option).
> 
> This probably applies elsewhere, eg I suspect the 'nodelay' in
> patch 1 also should remain.

For added fun that's not what we call it in QemuOpts though !

In qemu_chr_parse_socket we do:

    sock->has_nodelay = qemu_opt_get(opts, "delay");
    sock->nodelay = !qemu_opt_get_bool(opts, "delay", true);

So we really were relying on the "no$FOO" syntax here

Arguably it would be saner if we really did call it "nodelay" at the
QemuOpts level. I guess we trying to avoid having "nonodelay".

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:[~2021-02-17 10:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 19:10 [PATCH 00/10] qemu-options: always use key=on|off syntax for bool option docs Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 01/10] gdbstub: use preferred boolean option syntax Daniel P. Berrangé
2021-02-17 16:38   ` Paolo Bonzini
2021-02-16 19:10 ` [PATCH 02/10] qemu-options: update to show preferred boolean syntax for -chardev Daniel P. Berrangé
2021-02-16 21:08   ` Peter Maydell
2021-02-17 10:10     ` Daniel P. Berrangé [this message]
2021-02-16 19:10 ` [PATCH 03/10] qemu-options: update to show preferred boolean syntax for -spice Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 04/10] qemu-options: update to show preferred boolean syntax for -netdev Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 05/10] qemu-options: update to show preferred boolean syntax for -incoming Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 06/10] qemu-options: update to show preferred boolean syntax for -vnc Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 07/10] docs: update to show preferred boolean syntax for -chardev Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 08/10] docs: update to show preferred boolean syntax for -vnc Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 09/10] docs: update to show preferred boolean syntax for -cpu Daniel P. Berrangé
2021-02-16 19:10 ` [PATCH 10/10] target/i386: " 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=YCzrsWuxoXXolo8U@redhat.com \
    --to=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).