aboutsummaryrefslogtreecommitdiff
path: root/migration/socket.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2019-08-19 18:14:44 +0200
committerJuan Quintela <quintela@redhat.com>2019-09-03 23:24:42 +0200
commit0705e56496d2b155b5796c6b28d4110e5bcbd5d8 (patch)
tree587af1db18f730a5b1eb7b5a9b2ea1766012338c /migration/socket.c
parentfc8135c63021e8e442a7a894e5434f210614a73c (diff)
multifd: Use number of channels as listen backlog
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/socket.c')
-rw-r--r--migration/socket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/migration/socket.c b/migration/socket.c
index e63f5e1612..97c9efde59 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -178,10 +178,15 @@ static void socket_start_incoming_migration(SocketAddress *saddr,
{
QIONetListener *listener = qio_net_listener_new();
size_t i;
+ int num = 1;
qio_net_listener_set_name(listener, "migration-socket-listener");
- if (qio_net_listener_open_sync(listener, saddr, 1, errp) < 0) {
+ if (migrate_use_multifd()) {
+ num = migrate_multifd_channels();
+ }
+
+ if (qio_net_listener_open_sync(listener, saddr, num, errp) < 0) {
object_unref(OBJECT(listener));
return;
}