qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 16/21] migration/rdma: Unfold hook_ram_load()


From: Daniel P . Berrangé
Subject: Re: [PULL 16/21] migration/rdma: Unfold hook_ram_load()
Date: Thu, 1 Jun 2023 10:02:41 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

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 <peterx@redhat.com>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> Message-Id: <20230509120700.78359-6-quintela@redhat.com>
> ---
>  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 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]