All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>,
	"quintela@redhat.com" <quintela@redhat.com>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: 回复: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only
Date: Mon, 19 Jul 2021 03:21:04 +0000	[thread overview]
Message-ID: <OS3PR01MB76502CD55D5EEBC969594D53A5E19@OS3PR01MB7650.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20210716075909.50575-2-lizhijian@cn.fujitsu.com>

there was a typo:  s/protocal/protocol

________________________________________
发件人: Li Zhijian <lizhijian@cn.fujitsu.com>
发送时间: 2021年7月16日 15:59
收件人: quintela@redhat.com; dgilbert@redhat.com
抄送: qemu-devel@nongnu.org; Li, Zhijian/李 智坚
主题: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only

And change the default to true so that '-incoming defer' can enable
multifd first.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 migration/migration.c | 8 ++++++++
 migration/multifd.c   | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index d6d48f6999b..bcc8b3bcb92 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1249,6 +1249,14 @@ static bool migrate_caps_check(bool *cap_list,
         }
     }

+    /* incoming side only */
+    if (runstate_check(RUN_STATE_INMIGRATE) &&
+        !migrate_multifd_is_allowed() &&
+        cap_list[MIGRATION_CAPABILITY_MULTIFD]) {
+        error_setg(errp, "multifd is not supported by current protocol");
+        return false;
+    }
+
     return true;
 }

diff --git a/migration/multifd.c b/migration/multifd.c
index b3d99c79d83..372f3633eda 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -864,7 +864,7 @@ cleanup:
     multifd_new_send_channel_cleanup(p, sioc, local_err);
 }

-static bool migrate_allow_multifd;
+static bool migrate_allow_multifd = true;
 void migrate_protocal_allow_multifd(bool allow)
 {
     migrate_allow_multifd = allow;
--
2.31.1


      reply	other threads:[~2021-07-19  3:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  7:59 [PATCH 1/2] migration: allow multifd for socket protocol only Li Zhijian
2021-07-16  7:59 ` [PATCH 2/2] migration: allow enabling mutilfd for specific " Li Zhijian
2021-07-19  3:21   ` lizhijian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OS3PR01MB76502CD55D5EEBC969594D53A5E19@OS3PR01MB7650.jpnprd01.prod.outlook.com \
    --to=lizhijian@fujitsu.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.