[PATCH 03/18] migration: RDMA is not compatible with anything else

Juan Quintela posted 18 patches 2 years, 8 months ago
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras <leobras@redhat.com>
There is a newer version of this series
[PATCH 03/18] migration: RDMA is not compatible with anything else
Posted by Juan Quintela 2 years, 8 months ago
So give an error instead of just ignoring the other methods.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/migration.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/migration/migration.c b/migration/migration.c
index dc05c6f6ea..84551f040c 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -436,6 +436,18 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
         socket_start_incoming_migration(p ? p : uri, errp);
 #ifdef CONFIG_RDMA
     } else if (strstart(uri, "rdma:", &p)) {
+        if (migrate_compress()) {
+            error_setg(errp, "RDMA and compression can't be used together");
+            return;
+        }
+        if (migrate_xbzrle()) {
+            error_setg(errp, "RDMA and XBZRLE can't be used together");
+            return;
+        }
+        if (migrate_multifd()) {
+            error_setg(errp, "RDMA and multifd can't be used together");
+            return;
+        }
         rdma_start_incoming_migration(p, errp);
 #endif
     } else if (strstart(uri, "exec:", &p)) {
-- 
2.40.1
Re: [PATCH 03/18] migration: RDMA is not compatible with anything else
Posted by Lukas Straub 2 years, 7 months ago
On Tue, 13 Jun 2023 16:57:42 +0200
Juan Quintela <quintela@redhat.com> wrote:

> So give an error instead of just ignoring the other methods.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Lukas Straub <lukasstraub2@web.de>

> ---
>  migration/migration.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index dc05c6f6ea..84551f040c 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -436,6 +436,18 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
>          socket_start_incoming_migration(p ? p : uri, errp);
>  #ifdef CONFIG_RDMA
>      } else if (strstart(uri, "rdma:", &p)) {
> +        if (migrate_compress()) {
> +            error_setg(errp, "RDMA and compression can't be used together");
> +            return;
> +        }
> +        if (migrate_xbzrle()) {
> +            error_setg(errp, "RDMA and XBZRLE can't be used together");
> +            return;
> +        }
> +        if (migrate_multifd()) {
> +            error_setg(errp, "RDMA and multifd can't be used together");
> +            return;
> +        }
>          rdma_start_incoming_migration(p, errp);
>  #endif
>      } else if (strstart(uri, "exec:", &p)) {