diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2016-09-23 20:14:04 +0100 |
---|---|---|
committer | Juan Quintela <quintela@trasno.org> | 2016-10-13 17:22:38 +0200 |
commit | cd5ea070645682893312d67dba6d4dd0b1a80739 (patch) | |
tree | 23634198f31a1124eaff2bca321f8f8a8df0a462 /migration | |
parent | ccb783c3124b66fed6b11aa7a1cd1939a2268287 (diff) | |
download | qemu-cd5ea070645682893312d67dba6d4dd0b1a80739.zip qemu-cd5ea070645682893312d67dba6d4dd0b1a80739.tar.gz qemu-cd5ea070645682893312d67dba6d4dd0b1a80739.tar.bz2 |
migration/rdma: Don't flag an error when we've been told about one
If the other side tells us there's been an error and we fail
the migration, we don't need to signal that failure to the other
side because it already knew.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael R. Hines <michael@hinespot.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/rdma.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/migration/rdma.c b/migration/rdma.c index 7271292..674ccab 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -350,6 +350,7 @@ typedef struct RDMAContext { */ int error_state; int error_reported; + int received_error; /* * Description of ram blocks used throughout the code. @@ -1676,6 +1677,9 @@ static int qemu_rdma_exchange_get_response(RDMAContext *rdma, ", but got: %s (%d), length: %d", control_desc[expecting], expecting, control_desc[head->type], head->type, head->len); + if (head->type == RDMA_CONTROL_ERROR) { + rdma->received_error = true; + } return -EIO; } if (head->len > RDMA_CONTROL_MAX_BUFFER - sizeof(*head)) { @@ -2202,7 +2206,7 @@ static void qemu_rdma_cleanup(RDMAContext *rdma) int ret, idx; if (rdma->cm_id && rdma->connected) { - if (rdma->error_state) { + if (rdma->error_state && !rdma->received_error) { RDMAControlHeader head = { .len = 0, .type = RDMA_CONTROL_ERROR, .repeat = 1, |