migration: RDMA is not compatible with anything else
authorJuan Quintela <quintela@redhat.com>
Tue, 13 Jun 2023 14:57:42 +0000 (16:57 +0200)
committerJuan Quintela <quintela@redhat.com>
Tue, 17 Oct 2023 20:14:51 +0000 (22:14 +0200)
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>
Message-ID: <20230613145757.10131-4-quintela@redhat.com>

migration/migration.c

index 6ba5e145ac1dbc4f998b61d6a41b847f68599a50..81862fcaa93ed6eb061416ba5a399e5967050e6f 100644 (file)
@@ -447,6 +447,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)) {