mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
migration: convert rdma backend to accept MigrateAddress
RDMA based transport backend for 'migrate'/'migrate-incoming' QAPIs accept new wire protocol of MigrateAddress struct. It is achived by parsing 'uri' string and storing migration parameters required for RDMA connection into well defined InetSocketAddress struct. Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com> Signed-off-by: Het Gala <het.gala@nutanix.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231023182053.8711-7-farosas@suse.de>
This commit is contained in:
parent
34dfc5e407
commit
3fa9642ff7
3 changed files with 19 additions and 28 deletions
|
@ -534,7 +534,7 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
|
|||
fd_start_incoming_migration(saddr->u.fd.str, errp);
|
||||
}
|
||||
#ifdef CONFIG_RDMA
|
||||
} else if (strstart(uri, "rdma:", &p)) {
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_RDMA) {
|
||||
if (migrate_compress()) {
|
||||
error_setg(errp, "RDMA and compression can't be used together");
|
||||
return;
|
||||
|
@ -547,7 +547,7 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
|
|||
error_setg(errp, "RDMA and multifd can't be used together");
|
||||
return;
|
||||
}
|
||||
rdma_start_incoming_migration(p, errp);
|
||||
rdma_start_incoming_migration(&channel->u.rdma, errp);
|
||||
#endif
|
||||
} else if (strstart(uri, "exec:", &p)) {
|
||||
exec_start_incoming_migration(p, errp);
|
||||
|
@ -1935,8 +1935,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
|
|||
fd_start_outgoing_migration(s, saddr->u.fd.str, &local_err);
|
||||
}
|
||||
#ifdef CONFIG_RDMA
|
||||
} else if (strstart(uri, "rdma:", &p)) {
|
||||
rdma_start_outgoing_migration(s, p, &local_err);
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_RDMA) {
|
||||
rdma_start_outgoing_migration(s, &channel->u.rdma, &local_err);
|
||||
#endif
|
||||
} else if (strstart(uri, "exec:", &p)) {
|
||||
exec_start_outgoing_migration(s, p, &local_err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue