All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] chardev: add nodelay option
Date: Tue, 2 Mar 2021 13:15:15 +0100	[thread overview]
Message-ID: <c4413f53-7d5e-5c94-fcd7-2ec86e98f5ce@redhat.com> (raw)
In-Reply-To: <b5c10844-83e7-9fb5-0197-4ba5f7f343cb@redhat.com>

On 02/03/21 12:33, Philippe Mathieu-Daudé wrote:
> On 3/2/21 12:04 PM, Paolo Bonzini wrote:
>> The "delay" option was introduced as a way to enable Nagle's algorithm
>> with ",nodelay".  Since the short form for boolean options has now been
>> deprecated, introduce a more properly named "nodelay" option.  The "delay"
>> option remains as an undocumented option.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   chardev/char-socket.c |  9 +++++++--
>>   gdbstub.c             |  2 +-
>>   qemu-options.hx       | 14 +++++++-------
>>   3 files changed, 15 insertions(+), 10 deletions(-)
>>
>> diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>> index 06a37c0cc8..73a7afe5a0 100644
>> --- a/chardev/char-socket.c
>> +++ b/chardev/char-socket.c
>> @@ -1472,8 +1472,13 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
>>       sock = backend->u.socket.data = g_new0(ChardevSocket, 1);
>>       qemu_chr_parse_common(opts, qapi_ChardevSocket_base(sock));
>>   
>> -    sock->has_nodelay = qemu_opt_get(opts, "delay");
>> -    sock->nodelay = !qemu_opt_get_bool(opts, "delay", true);
>> +    sock->has_nodelay =
>> +        qemu_opt_get(opts, "delay") ||
>> +        qemu_opt_get(opts, "nodelay");
>> +    sock->nodelay =
>> +        !qemu_opt_get_bool(opts, "delay", true) ||
>> +        qemu_opt_get_bool(opts, "nodelay", false);
> 
> Should we add a deprecation note to remember to remove this later,
> or do we want to keep it infinitely? Then a comment here would be
> useful.

We cannot deprecate it only when options like -serial start warning for 
short-form boolean options (which I was going to propose for 6.1).  We 
probably also don't want a warning like "Please use delay=off instead"; 
suggesting "nodelay=on" would be an improvement (though an ugly one).

So the plan could be:

6.0: add "nodelay", deprecate -chardev short-form boolean options
6.1: deprecate "delay" and -serial short-form boolean options
6.2: some options (-M/-accel) start rejecting short-form boolean options
6.3: remove "delay"

Paolo



  reply	other threads:[~2021-03-02 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 11:04 [PATCH] chardev: add nodelay option Paolo Bonzini
2021-03-02 11:33 ` Philippe Mathieu-Daudé
2021-03-02 12:15   ` Paolo Bonzini [this message]
2021-03-02 11:39 ` Daniel P. Berrangé
2021-03-02 12:10   ` Paolo Bonzini
2021-03-03  8:25     ` Markus Armbruster

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=c4413f53-7d5e-5c94-fcd7-2ec86e98f5ce@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=philmd@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.