[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/18] migration/rdma: set the REUSEADDR option for destination
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 06/18] migration/rdma: set the REUSEADDR option for destination |
Date: |
Wed, 2 Mar 2022 18:29:24 +0000 |
From: Jack Wang <jinpu.wang@ionos.com>
We hit following error during testing RDMA transport:
in case of migration error, mgmt daemon pick one migration port,
incoming rdma:[::]:8089: RDMA ERROR: Error: could not rdma_bind_addr
Then try another -incoming rdma:[::]:8103, sometime it worked,
sometimes need another try with other ports number.
Set the REUSEADDR option for destination, This allow address could
be reused to avoid rdma_bind_addr error out.
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Message-Id: <20220208085640.19702-1-jinpu.wang@ionos.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert: Fixed up some tabs
---
migration/rdma.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/migration/rdma.c b/migration/rdma.c
index c7c7a38487..ef1e65ec36 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -2705,6 +2705,7 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error
**errp)
char ip[40] = "unknown";
struct rdma_addrinfo *res, *e;
char port_str[16];
+ int reuse = 1;
for (idx = 0; idx < RDMA_WRID_MAX; idx++) {
rdma->wr_data[idx].control_len = 0;
@@ -2740,6 +2741,12 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error
**errp)
goto err_dest_init_bind_addr;
}
+ ret = rdma_set_option(listen_id, RDMA_OPTION_ID, RDMA_OPTION_ID_REUSEADDR,
+ &reuse, sizeof reuse);
+ if (ret) {
+ ERROR(errp, "Error: could not set REUSEADDR option");
+ goto err_dest_init_bind_addr;
+ }
for (e = res; e != NULL; e = e->ai_next) {
inet_ntop(e->ai_family,
&((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof ip);
--
2.35.1
- [PULL 00/18] migration queue, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 01/18] clock-vmstate: Add missing END_OF_LIST, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 03/18] monitor/hmp: add support for flag argument with value, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 04/18] qapi/monitor: refactor set/expire_password with enums, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 02/18] virtiofsd: Let meson check for statx.stx_mnt_id, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 08/18] migration: Finer grained tracepoints for POSTCOPY_LISTEN, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 07/18] migration: Dump sub-cmd name in loadvm_process_command tp, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 05/18] qapi/monitor: allow VNC display id in set/expire_password, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 06/18] migration/rdma: set the REUSEADDR option for destination,
Dr. David Alan Gilbert (git) <=
- [PULL 09/18] migration: Tracepoint change in postcopy-run bottom half, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 11/18] migration: Dump ramblock and offset too when non-same-page detected, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 14/18] migration: Enlarge postcopy recovery to capture !-EIO too, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 10/18] migration: Introduce postcopy channels on dest node, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 13/18] migration: Move static var in ram_block_from_stream() into global, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 12/18] migration: Add postcopy_thread_create(), Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 15/18] migration: postcopy_pause_fault_thread() never fails, Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 16/18] migration: Add migration_incoming_transport_cleanup(), Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 17/18] tests: Pass in MigrateStart** into test_migrate_start(), Dr. David Alan Gilbert (git), 2022/03/02
- [PULL 18/18] migration: Remove load_state_old and minimum_version_id_old, Dr. David Alan Gilbert (git), 2022/03/02