All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
	"Maciej S . Szmigiero" <mail@maciej.szmigiero.name>,
	Elena Ufimtseva <elena.ufimtseva@oracle.com>,
	Jagannathan Raman <jag.raman@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Zhao Liu <zhao1.liu@intel.com>, Coiby Xu <Coiby.Xu@gmail.com>
Subject: Re: [RFC PATCH v2 6/8] io: Plumb read flags into qio_channel_read_all_eof
Date: Fri, 7 Feb 2025 14:51:32 +0000	[thread overview]
Message-ID: <Z6Yd9MY0IEZ7Jkf1@redhat.com> (raw)
In-Reply-To: <20250207142758.6936-7-farosas@suse.de>

On Fri, Feb 07, 2025 at 11:27:56AM -0300, Fabiano Rosas wrote:
> We want to pass flags into qio_channel_tls_readv() but some functions
> along the way don't take a flags argument. Plumb the flags through.
> 
> No functional change.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---

> diff --git a/include/io/channel.h b/include/io/channel.h
> index bdf0bca92a..6110f0ffe9 100644
> --- a/include/io/channel.h
> +++ b/include/io/channel.h
> @@ -298,6 +298,7 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
>   * @ioc: the channel object
>   * @iov: the array of memory regions to read data into
>   * @niov: the length of the @iov array
> + * @flags: read flags (QIO_CHANNEL_READ_FLAG_*)
>   * @errp: pointer to a NULL-initialized error object
>   *
>   * Read data from the IO channel, storing it in the
> @@ -321,6 +322,7 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
>  int coroutine_mixed_fn qio_channel_readv_all_eof(QIOChannel *ioc,
>                                                   const struct iovec *iov,
>                                                   size_t niov,
> +                                                 int flags,
>                                                   Error **errp);
>  
>  /**
> @@ -442,6 +444,7 @@ ssize_t qio_channel_write(QIOChannel *ioc,
>   * @ioc: the channel object
>   * @buf: the memory region to read data into
>   * @buflen: the number of bytes to @buf
> + * @flags: read flags (QIO_CHANNEL_READ_FLAG_*)
>   * @errp: pointer to a NULL-initialized error object
>   *
>   * Reads @buflen bytes into @buf, possibly blocking or (if the
> @@ -457,6 +460,7 @@ ssize_t qio_channel_write(QIOChannel *ioc,
>  int coroutine_mixed_fn qio_channel_read_all_eof(QIOChannel *ioc,
>                                                  char *buf,
>                                                  size_t buflen,
> +                                                int flags,
>                                                  Error **errp);
>

The 'int flags' parameter is intended to only be added to the
"_full" method variants since it is niche usage, so these two
shouldn't be changed.

>  /**
> @@ -885,6 +889,7 @@ void qio_channel_set_aio_fd_handler(QIOChannel *ioc,
>   * @niov: the length of the @iov array
>   * @fds: an array of file handles to read
>   * @nfds: number of file handles in @fds
> + * @flags: read flags (QIO_CHANNEL_READ_FLAG_*)
>   * @errp: pointer to a NULL-initialized error object
>   *
>   *
> @@ -903,6 +908,7 @@ int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
>                                                        const struct iovec *iov,
>                                                        size_t niov,
>                                                        int **fds, size_t *nfds,
> +                                                      int flags,
>                                                        Error **errp);

This is ok, and migration code should switch to calling this
method instead of qio_channel_readv_all_eof to make use of flags.

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 :|



  reply	other threads:[~2025-02-07 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 14:27 [RFC PATCH v2 0/8] crypto,io,migration: Add support to gnutls_bye() Fabiano Rosas
2025-02-07 14:27 ` [RFC PATCH v2 1/8] crypto: Allow gracefully ending the TLS session Fabiano Rosas
2025-02-07 14:33   ` Daniel P. Berrangé
2025-02-07 17:21   ` Peter Xu
2025-02-07 17:55     ` Fabiano Rosas
2025-02-07 18:09       ` Peter Xu
2025-02-07 14:27 ` [RFC PATCH v2 2/8] io: tls: Add qio_channel_tls_bye Fabiano Rosas
2025-02-07 14:39   ` Daniel P. Berrangé
2025-02-07 14:27 ` [RFC PATCH v2 3/8] migration/multifd: Terminate the TLS connection Fabiano Rosas
2025-02-07 18:00   ` Peter Xu
2025-02-07 18:15     ` Fabiano Rosas
2025-02-10 14:20       ` Peter Xu
2025-02-07 14:27 ` [RFC PATCH v2 4/8] migration: Check migration error after loadvm Fabiano Rosas
2025-02-07 18:02   ` Peter Xu
2025-02-07 14:27 ` [RFC PATCH v2 5/8] crypto: Remove qcrypto_tls_session_get_handshake_status Fabiano Rosas
2025-02-07 14:41   ` Daniel P. Berrangé
2025-02-07 14:27 ` [RFC PATCH v2 6/8] io: Plumb read flags into qio_channel_read_all_eof Fabiano Rosas
2025-02-07 14:51   ` Daniel P. Berrangé [this message]
2025-02-07 14:27 ` [RFC PATCH v2 7/8] io: Add a read flag for relaxed EOF Fabiano Rosas
2025-02-07 14:53   ` Daniel P. Berrangé
2025-02-07 14:27 ` [RFC PATCH v2 8/8] migration/multifd: Add a compat property for TLS termination Fabiano Rosas
2025-02-07 18:07   ` Peter Xu
2025-02-07 18:40     ` Fabiano Rosas
2025-02-07 19:44 ` [RFC PATCH v2 0/8] crypto,io,migration: Add support to gnutls_bye() Maciej S. Szmigiero

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=Z6Yd9MY0IEZ7Jkf1@redhat.com \
    --to=berrange@redhat.com \
    --cc=Coiby.Xu@gmail.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=farosas@suse.de \
    --cc=jag.raman@oracle.com \
    --cc=mail@maciej.szmigiero.name \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.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 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.