From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCqSW-0008C6-Dz for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCqSR-0007bO-Tb for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:36:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCqSR-0007bA-NS for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:36:19 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 1A261AC7B3 for ; Wed, 8 Jul 2015 14:36:19 +0000 (UTC) From: Juan Quintela In-Reply-To: <1436365567-27164-1-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Wed, 8 Jul 2015 15:26:07 +0100") References: <1436365567-27164-1-git-send-email-dgilbert@redhat.com> Date: Wed, 08 Jul 2015 16:36:17 +0200 Message-ID: <87wpyan2ce.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] RDMA: Reduce restriction on block length match Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: amit.shah@redhat.com, qemu-devel@nongnu.org "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > My e4d633207 patch has an over zealous sanity check that checked > the lengths of the RAM Blocks on source/destination were the same. This > isn't true because of the 'used_length' trick for RAM blocks like the > ACPI table that vary in size. > > Prior to that patch RDMA would also fail in this case, but it should > now work with the changes in the set e4d633207 is in. > > Signed-off-by: Dr. David Alan Gilbert > > Fixes: e4d633207c129dc5b7d145240ac4a1997ef3902f > --- > migration/rdma.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index f106b2a..1d094b0 100644 > --- a/migration/rdma.c > +++ b/migration/rdma.c > @@ -3338,14 +3338,15 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, > for (i = 0; i < nb_dest_blocks; i++) { > network_to_dest_block(&rdma->dest_blocks[i]); > > - /* We require that the blocks are in the same order */ > + /* We require that the blocks are in the same order, > + * but the used_length trick for acpi blocks means that > + * the destination can validly be larger than the source > + */ > if (rdma->dest_blocks[i].length != local->block[i].length) { Should we change the check to be that destination is bigger or equal than source? With your change, we only remove the check? Thanks, Juan. > - ERROR(errp, "Block %s/%d has a different length %" PRIu64 > - "vs %" PRIu64, local->block[i].block_name, i, > - local->block[i].length, > + fprintf(stderr, "INFO: Block %s/%d has a different length %" > + PRIu64 "vs %" PRIu64, local->block[i].block_name, > + i, local->block[i].length, > rdma->dest_blocks[i].length); > - rdma->error_state = -EINVAL; > - return -EINVAL; > } > local->block[i].remote_host_addr = > rdma->dest_blocks[i].remote_host_addr;