qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming
@ 2023-05-18 16:00 Wei Wang
  2023-05-18 19:20 ` Peter Xu
  0 siblings, 1 reply; 14+ messages in thread
From: Wei Wang @ 2023-05-18 16:00 UTC (permalink / raw)
  To: quintela, lei4.wang, peterx, berrange, qemu-devel; +Cc: Wei Wang

qemu_start_incoming_migration needs to check the number of multifd
channels or postcopy ram channels to configure the backlog parameter (i.e.
the maximum length to which the queue of pending connections for sockfd
may grow) of listen(). So multifd and postcopy-preempt caps require the
use of deferred incoming, that is, calling qemu_start_incoming_migration
should be deferred via qmp or hmp commands after the cap of multifd and
postcopy-preempt are configured.

Check if deferred incoming is used when enabling multifd or
postcopy-preempt, and fail the check with error messages if not.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
 migration/options.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/migration/options.c b/migration/options.c
index c2a278ee2d..25b333b3f4 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -537,6 +537,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
             error_setg(errp, "Postcopy preempt not compatible with compress");
             return false;
         }
+
+        if (mis->transport_data) {
+            error_setg(errp, "Postcopy preempt should use deferred incoming");
+            return false;
+        }
     }
 
     if (new_caps[MIGRATION_CAPABILITY_MULTIFD]) {
@@ -544,6 +549,10 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
             error_setg(errp, "Multifd is not compatible with compress");
             return false;
         }
+        if (mis->transport_data) {
+            error_setg(errp, "Multifd should use deferred incoming");
+            return false;
+        }
     }
 
     return true;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-05-24  1:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-18 16:00 [PATCH v1] migration: fail the cap check if it requires the use of deferred incoming Wei Wang
2023-05-18 19:20 ` Peter Xu
2023-05-19  2:34   ` Wang, Wei W
2023-05-19 15:30     ` Peter Xu
2023-05-19 15:33       ` Peter Xu
2023-05-20  1:42         ` Wang, Wei W
2023-05-22 23:36           ` Peter Xu
2023-05-23  1:44             ` Wang, Wei W
2023-05-23 13:40               ` Peter Xu
2023-05-23 14:30                 ` Wang, Wei W
2023-05-23 14:50                   ` Peter Xu
2023-05-24  1:47                     ` Wang, Wei W
2023-05-19  8:26   ` Daniel P. Berrangé
2023-05-19 15:31     ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).