|
|
1be5c7 |
From 1cdab9cadef1ed84ec34651a1edbffa36c1e67d0 Mon Sep 17 00:00:00 2001
|
|
|
1be5c7 |
From: Juan Quintela <quintela@redhat.com>
|
|
|
1be5c7 |
Date: Wed, 18 May 2022 02:52:24 -0300
|
|
|
1be5c7 |
Subject: [PATCH 12/37] multifd: Make zlib use iov's
|
|
|
1be5c7 |
MIME-Version: 1.0
|
|
|
1be5c7 |
Content-Type: text/plain; charset=UTF-8
|
|
|
1be5c7 |
Content-Transfer-Encoding: 8bit
|
|
|
1be5c7 |
|
|
|
1be5c7 |
RH-Author: Leonardo Brás <leobras@redhat.com>
|
|
|
1be5c7 |
RH-MergeRequest: 191: MSG_ZEROCOPY + Multifd @ rhel8.7
|
|
|
1be5c7 |
RH-Commit: [12/26] 58630452e14802e71a9eadb17cfe4964ebf8e091
|
|
|
1be5c7 |
RH-Bugzilla: 2072049
|
|
|
1be5c7 |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
1be5c7 |
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
1be5c7 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
1be5c7 |
|
|
|
1be5c7 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
1be5c7 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
1be5c7 |
(cherry picked from commit 48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69)
|
|
|
1be5c7 |
Signed-off-by: Leonardo Bras <leobras@redhat.com>
|
|
|
1be5c7 |
---
|
|
|
1be5c7 |
migration/multifd-zlib.c | 8 ++++----
|
|
|
1be5c7 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
1be5c7 |
|
|
|
1be5c7 |
diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c
|
|
|
1be5c7 |
index a987e4a26c..96475e096e 100644
|
|
|
1be5c7 |
--- a/migration/multifd-zlib.c
|
|
|
1be5c7 |
+++ b/migration/multifd-zlib.c
|
|
|
1be5c7 |
@@ -145,6 +145,9 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error **errp)
|
|
|
1be5c7 |
}
|
|
|
1be5c7 |
out_size += available - zs->avail_out;
|
|
|
1be5c7 |
}
|
|
|
1be5c7 |
+ p->iov[p->iovs_num].iov_base = z->zbuff;
|
|
|
1be5c7 |
+ p->iov[p->iovs_num].iov_len = out_size;
|
|
|
1be5c7 |
+ p->iovs_num++;
|
|
|
1be5c7 |
p->next_packet_size = out_size;
|
|
|
1be5c7 |
p->flags |= MULTIFD_FLAG_ZLIB;
|
|
|
1be5c7 |
|
|
|
1be5c7 |
@@ -164,10 +167,7 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error **errp)
|
|
|
1be5c7 |
*/
|
|
|
1be5c7 |
static int zlib_send_write(MultiFDSendParams *p, uint32_t used, Error **errp)
|
|
|
1be5c7 |
{
|
|
|
1be5c7 |
- struct zlib_data *z = p->data;
|
|
|
1be5c7 |
-
|
|
|
1be5c7 |
- return qio_channel_write_all(p->c, (void *)z->zbuff, p->next_packet_size,
|
|
|
1be5c7 |
- errp);
|
|
|
1be5c7 |
+ return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp);
|
|
|
1be5c7 |
}
|
|
|
1be5c7 |
|
|
|
1be5c7 |
/**
|
|
|
1be5c7 |
--
|
|
|
1be5c7 |
2.35.3
|
|
|
1be5c7 |
|