diff options
author | Peter Maydell | 2016-10-17 11:31:10 +0200 |
---|---|---|
committer | Peter Maydell | 2016-10-17 11:31:10 +0200 |
commit | 4378caf59edf6df796b9ad3174e5703fd25a781c (patch) | |
tree | ea5627e0532e0cbfffd103be09cff3796f5122d0 /migration/rdma.c | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161013-1' into st... (diff) | |
parent | docs/xbzrle: correction (diff) | |
download | qemu-4378caf59edf6df796b9ad3174e5703fd25a781c.tar.gz qemu-4378caf59edf6df796b9ad3174e5703fd25a781c.tar.xz qemu-4378caf59edf6df796b9ad3174e5703fd25a781c.zip |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20161014' into staging
migration/next for 20161014
# gpg: Signature made Fri 14 Oct 2016 16:24:13 BST
# gpg: using RSA key 0xF487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg: aka "Juan Quintela <quintela@trasno.org>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* remotes/juanquintela/tags/migration/20161014:
docs/xbzrle: correction
migrate: move max-bandwidth and downtime-limit to migrate_set_parameter
migration: Fix seg with missing port
migration/postcopy: Explicitly disallow huge pages
RAMBlocks: Store page size
Postcopy vs xbzrle: Don't send xbzrle pages once in postcopy [for 2.8]
migrate: Fix bounds check for migration parameters in migration.c
migrate: Use boxed qapi for migrate-set-parameters
migrate: Share common MigrationParameters struct
migrate: Fix cpu-throttle-increment regression in HMP
migration/rdma: Don't flag an error when we've been told about one
migration: Make failed migration load set file error
migration/rdma: Pass qemu_file errors across link
migration: Report values for comparisons
migration: report an error giving the failed field
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r-- | migration/rdma.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/migration/rdma.c b/migration/rdma.c index 88bdb64457..674ccab12e 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, @@ -2804,6 +2808,9 @@ static int qio_channel_rdma_close(QIOChannel *ioc, QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(ioc); trace_qemu_rdma_close(); if (rioc->rdma) { + if (!rioc->rdma->error_state) { + rioc->rdma->error_state = qemu_file_get_error(rioc->file); + } qemu_rdma_cleanup(rioc->rdma); g_free(rioc->rdma); rioc->rdma = NULL; |