From: "Daniel P. Berrangé" <berrange@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org,
"reviewer:Incompatible changes" <libvir-list@redhat.com>,
kraxel@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] RFC: char: deprecate usage of bidirectional pipe
Date: Tue, 26 Jul 2022 09:44:25 +0100 [thread overview]
Message-ID: <Yt+pabvylcNdh0wL@redhat.com> (raw)
In-Reply-To: <20220726083232.2567756-1-marcandre.lureau@redhat.com>
On Tue, Jul 26, 2022 at 12:32:32PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> As Ed Swierk explained back in 2006:
> https://lists.nongnu.org/archive/html/qemu-devel/2006-12/msg00160.html
>
> "When qemu writes into the pipe, it immediately reads back what it just
> wrote and treats it as a monitor command, endlessly breathing its own
> exhaust."
>
> This is similarly confusing when using the chardev with a serial device,
> as reported in https://bugzilla.redhat.com/show_bug.cgi?id=2106975.
>
> It seems we have kept the support for bidirectional pipes for historical
> reasons and odd systems, however it's not documented in qemu -chardev
> options. I suggest to stop supporting it, for portability reasons.
Hmm, I always assumed that in this scenario the pipe was operating
in output-only mode. Obviously not the case with the code as it
exists, but perhaps this would be useful ? eg its good as a serial
console logging mechanism at least.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> docs/about/deprecated.rst | 6 ++++++
> chardev/char-pipe.c | 4 ++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 7ee26626d5cf..dd5ca30d527b 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -45,6 +45,12 @@ transmit audio through the VNC protocol.
> ``tty`` and ``parport`` are aliases that will be removed. Instead, the
> actual backend names ``serial`` and ``parallel`` should be used.
>
> +``-chardev pipe`` support for bidirectional pipes (since 7.1)
> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +For portability reasons, the support for bidirectional ``pipe`` will
> +be removed. Instead, use ``file.in`` & ``file.out`` unidirectional pipes.
> +
> Short-form boolean options (since 6.0)
> ''''''''''''''''''''''''''''''''''''''
>
> diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
> index 66d3b8509183..7db963035e7d 100644
> --- a/chardev/char-pipe.c
> +++ b/chardev/char-pipe.c
> @@ -27,6 +27,7 @@
> #include "qemu/main-loop.h"
> #include "qemu/module.h"
> #include "qemu/option.h"
> +#include "qemu/error-report.h"
> #include "chardev/char.h"
>
> #ifdef _WIN32
> @@ -142,6 +143,9 @@ static void qemu_chr_open_pipe(Chardev *chr,
> if (fd_out >= 0) {
> close(fd_out);
> }
> + warn_report("Support for bidirectional pipe is deprecated,");
> + warn_report("please use portable one-way pipes instead (%s.in & %s.out).",
> + filename, filename);
> TFR(fd_in = fd_out = qemu_open_old(filename, O_RDWR | O_BINARY));
> if (fd_in < 0) {
> error_setg_file_open(errp, errno, filename);
> --
> 2.37.0.rc0
>
With 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 :|
next prev parent reply other threads:[~2022-07-26 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 8:32 [PATCH] RFC: char: deprecate usage of bidirectional pipe marcandre.lureau
2022-07-26 8:44 ` Daniel P. Berrangé [this message]
2022-08-05 9:55 ` Marc-André Lureau
2022-08-05 10:15 ` Daniel P. Berrangé
2022-08-16 7:51 ` Gerd Hoffmann
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=Yt+pabvylcNdh0wL@redhat.com \
--to=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=libvir-list@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@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 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).