On Tue, May 30, 2023 at 08:25:26PM +0200, Juan Quintela wrote:
> There is only one flag called with: RAM_CONTROL_BLOCK_REG.
>
> Reviewed-by: Peter Xu <[email protected]>
> Signed-off-by: Juan Quintela <[email protected]>
> Message-Id: <[email protected]>
> ---
> migration/qemu-file.h | 11 -----------
> migration/rdma.h | 3 +++
> migration/qemu-file.c | 10 ----------
> migration/ram.c | 6 ++++--
> migration/rdma.c | 29 +++++++++--------------------
> 5 files changed, 16 insertions(+), 43 deletions(-)
> diff --git a/migration/rdma.c b/migration/rdma.c
> index a477985c6d..948e93256d 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -3811,20 +3811,22 @@ out:
> }
>
> /* Destination:
> - * Called via a ram_control_load_hook during the initial RAM load section
> which
> - * lists the RAMBlocks by name. This lets us know the order of the RAMBlocks
> - * on the source.
> - * We've already built our local RAMBlock list, but not yet sent the list to
> - * the source.
> + * Called during the initial RAM load section which lists the
> + * RAMBlocks by name. This lets us know the order of the RAMBlocks on
> + * the source. We've already built our local RAMBlock list, but not
> + * yet sent the list to the source.
> */
> -static int
> -rdma_block_notification_handle(QEMUFile *f, const char *name)
> +int rdma_block_notification_handle(QEMUFile *f, const char *name)
> {
> RDMAContext *rdma;
> QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(qemu_file_get_ioc(f));
Casting to QIOChannelRDMA ...
> int curr;
> int found = -1;
>
> + if (!migrate_rdma()) {
..before checking if this is RDMA
> + return 0;
> + }
> +
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 :|