From ff3315e41f6e33e2ef7d764e064be60b3b7670e4 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 18 May 2022 02:52:23 -0300 Subject: [PATCH 07/34] multifd: Fill offset and block for reception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Leonardo BrĂ¡s RH-MergeRequest: 185: MSG_ZEROCOPY + Multifd @ rhel8.6 RH-Commit: [7/34] e1c460e910a7de2bbe21221b4c54da0bbc09b4c0 RH-Bugzilla: 2117252 RH-Acked-by: quintela1 RH-Acked-by: Dr. David Alan Gilbert RH-Acked-by: Peter Xu We were using the iov directly, but we will need this info on the following patch. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert (cherry picked from commit 01102a2ef6c97acc5cc8a2c3bb62b7665a20f51f) Signed-off-by: Leonardo Bras --- migration/multifd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 55d99a8232..0533da154a 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -354,6 +354,7 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams *p, Error **errp) return -1; } + p->pages->block = block; for (i = 0; i < p->pages->num; i++) { uint64_t offset = be64_to_cpu(packet->offset[i]); @@ -363,6 +364,7 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams *p, Error **errp) offset, block->used_length); return -1; } + p->pages->offset[i] = offset; p->pages->iov[i].iov_base = block->host + offset; p->pages->iov[i].iov_len = page_size; } -- 2.35.3