From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Li Zhijian <lizhijian@fujitsu.com>
Subject: [PULL 2/7] migration/rdma: Fix return-path case
Date: Thu, 16 Mar 2023 16:12:20 +0100 [thread overview]
Message-ID: <20230316151225.11362-3-quintela@redhat.com> (raw)
In-Reply-To: <20230316151225.11362-1-quintela@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
The RDMA code has return-path handling code, but it's only enabled
if postcopy is enabled; if the 'return-path' migration capability
is enabled, the return path is NOT setup but the core migration
code still tries to use it and breaks.
Enable the RDMA return path if either postcopy or the return-path
capability is enabled.
bz: https://bugzilla.redhat.com/show_bug.cgi?id=2063615
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/rdma.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 288eadc2d2..9d70e9885b 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3373,7 +3373,8 @@ static int qemu_rdma_accept(RDMAContext *rdma)
* initialize the RDMAContext for return path for postcopy after first
* connection request reached.
*/
- if (migrate_postcopy() && !rdma->is_return_path) {
+ if ((migrate_postcopy() || migrate_use_return_path())
+ && !rdma->is_return_path) {
rdma_return_path = qemu_rdma_data_init(rdma->host_port, NULL);
if (rdma_return_path == NULL) {
rdma_ack_cm_event(cm_event);
@@ -3455,7 +3456,8 @@ static int qemu_rdma_accept(RDMAContext *rdma)
}
/* Accept the second connection request for return path */
- if (migrate_postcopy() && !rdma->is_return_path) {
+ if ((migrate_postcopy() || migrate_use_return_path())
+ && !rdma->is_return_path) {
qemu_set_fd_handler(rdma->channel->fd, rdma_accept_incoming_migration,
NULL,
(void *)(intptr_t)rdma->return_path);
@@ -4192,7 +4194,7 @@ void rdma_start_outgoing_migration(void *opaque,
}
/* RDMA postcopy need a separate queue pair for return path */
- if (migrate_postcopy()) {
+ if (migrate_postcopy() || migrate_use_return_path()) {
rdma_return_path = qemu_rdma_data_init(host_port, errp);
if (rdma_return_path == NULL) {
--
2.39.2
next prev parent reply other threads:[~2023-03-16 15:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 15:12 [PULL 0/7] Migration 20230316 patches Juan Quintela
2023-03-16 15:12 ` [PULL 1/7] migration: Wait on preempt channel in preempt thread Juan Quintela
2023-03-16 15:12 ` Juan Quintela [this message]
2023-03-16 15:12 ` [PULL 3/7] migration/xbzrle: use ctz64 to avoid undefined result Juan Quintela
2023-03-16 15:12 ` [PULL 4/7] migration/xbzrle: fix out-of-bounds write with axv512 Juan Quintela
2023-03-16 15:12 ` [PULL 5/7] migration/rdma: Remove deprecated variable rdma_return_path Juan Quintela
2023-03-16 15:12 ` [PULL 6/7] migration/multifd: correct multifd_send_thread to trace the flags Juan Quintela
2023-03-16 15:12 ` [PULL 7/7] migration: fix populate_vfio_info Juan Quintela
2023-03-17 13:11 ` [PULL 0/7] Migration 20230316 patches Peter Maydell
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=20230316151225.11362-3-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lizhijian@fujitsu.com \
--cc=qemu-devel@nongnu.org \
/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 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).