diff mbox series

[PULL,01/11] migration: RDMA is not compatible with anything else

Message ID 20231018100651.32674-2-quintela@redhat.com
State New
Headers show
Series [PULL,01/11] migration: RDMA is not compatible with anything else | expand

Commit Message

Juan Quintela Oct. 18, 2023, 10:06 a.m. UTC
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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/migration/migration.c b/migration/migration.c
index 6ba5e145ac..81862fcaa9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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)) {