Received: by 2002:a0c:df87:0:0:0:0:0 with SMTP id w7csp1028270qvl; Fri, 28 Jan 2022 11:09:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJykkNz+MMDxpeGoxh7+w+p3HNsH02vVJx4v4DwkyfrnGaFMp9uOTZxmukPt4OPF5pXsykfw X-Received: by 2002:a05:6214:29e5:: with SMTP id jv5mr8854960qvb.41.1643396952408; Fri, 28 Jan 2022 11:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643396952; cv=none; d=google.com; s=arc-20160816; b=oDJkT+bbrbsOQLAW+d3QaJu/AQ9lyxdrRLf11dtMI1XFBf9FC8gX4r2Z2ohVOq0NWH TAfXZCS07AAgIHyYHWl8Mor+OhbQOxIxyGyqYKekL4zuNAJR2f6skE6S4uMokwgVUf8j QEUkO8TH6yLNoRIDndhe9b8socKUioXXFC4qYcOrbumjMoCxhBXCWabLbJUQqfG+01tC /jLOg4329+6a4c7C+emheOpvIOdqSoB+ZnnSqLEErxC6i+ec8Ww+Gv/Nhfi49VHcmR0W ktaVfzRQXjdg/RGdO7bP2z/pesYd05vP3pD4xyLVC6FKrJpIfHzSqvksEunsdL/mQl7W h9Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jIfcME6eplHNShXh8/3HCLJjEvw8mfxrLh/NM8x7gzI=; b=c9c9xN+5Ccf3VWcX9bhB/G8MYYzdHiqW45As3ijbvA/xXPxRPPDVtRAR8/9Ut+8gsB P4c5Qrk92IrsCVAe9O4Hqxza/pA28W49OObQeB5gJmBtn6G57mY+6F2W0d8BCutfgMhd /ls23nMUpbg66Zap5eHur+Sx2IJ/I9MmLgvQ1wynRyizUu3064sa+g2nhWaliyJ0vQYM e1zvEc2fGqD6PFmnEPUnhdURvbrcOfEaS/xoZNG9sET23oKYIO+IR7lZ4kXvSfHjiZ2L uuZJkV8BvtMtRcSLFsauOixm+nKih3i9lHH7+KGnH9IYWbGEbRxeG3JONaqlmriQgPvB VnCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=djVQJnHJ; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y15si14115781qkp.618.2022.01.28.11.09.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jan 2022 11:09:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=djVQJnHJ; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:49168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDWcR-0007ov-1A for alex.bennee@linaro.org; Fri, 28 Jan 2022 14:09:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDW6W-0007Nb-EK for qemu-arm@nongnu.org; Fri, 28 Jan 2022 13:36:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDW6O-0001Lx-Hs for qemu-arm@nongnu.org; Fri, 28 Jan 2022 13:36:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643394927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jIfcME6eplHNShXh8/3HCLJjEvw8mfxrLh/NM8x7gzI=; b=djVQJnHJ9DCNtBQVhj2SkPm+yFx10aRy2WNMZOWOIKx7+74GKhCSkFLMXj6ew+beT2VBTS X+riX7m8xd0lGuUV3piI8E0pSpPzKOK4kbrO3PjD7lvCqwfW4AlxJnjevT/7o1FV3uMSnn JWzY9/yAlqDyO6h9+SotS+YtBpFu5T8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-zI24HbDXP0mLceJmxK_nHA-1; Fri, 28 Jan 2022 13:35:24 -0500 X-MC-Unique: zI24HbDXP0mLceJmxK_nHA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC9281091DA1; Fri, 28 Jan 2022 18:35:21 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id C16FF77456; Fri, 28 Jan 2022 18:35:14 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PULL 11/36] multifd: Remove send_write() method Date: Fri, 28 Jan 2022 19:30:08 +0100 Message-Id: <20220128183033.31998-12-quintela@redhat.com> In-Reply-To: <20220128183033.31998-1-quintela@redhat.com> References: <20220128183033.31998-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=quintela@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) DKIMWL_WL_HIGH=-0.167, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Ani Sinha , Eric Blake , Hannes Reinecke , Vikram Garhwal , qemu-block@nongnu.org, Juan Quintela , Daniel Henrique Barboza , Markus Armbruster , Marcel Apfelbaum , Artyom Tarasenko , Pavel Pisa , Alistair Francis , "Dr. David Alan Gilbert" , Greg Kurz , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Igor Mammedov , Stafford Horne , David Gibson , Laurent Vivier , Andrew Baumann , qemu-ppc@nongnu.org, Paolo Bonzini , Aurelien Jarno Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: tJJsMwuE4MLL Everything use now iov's. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/multifd.h | 2 -- migration/multifd-zlib.c | 17 ----------------- migration/multifd-zstd.c | 17 ----------------- migration/multifd.c | 20 ++------------------ 4 files changed, 2 insertions(+), 54 deletions(-) diff --git a/migration/multifd.h b/migration/multifd.h index c3f18af364..7496f951a7 100644 --- a/migration/multifd.h +++ b/migration/multifd.h @@ -164,8 +164,6 @@ typedef struct { void (*send_cleanup)(MultiFDSendParams *p, Error **errp); /* Prepare the send packet */ int (*send_prepare)(MultiFDSendParams *p, Error **errp); - /* Write the send packet */ - int (*send_write)(MultiFDSendParams *p, uint32_t used, Error **errp); /* Setup for receiving side */ int (*recv_setup)(MultiFDRecvParams *p, Error **errp); /* Cleanup for receiving side */ diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index 71480c82bb..ba90f1aaf4 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -152,22 +152,6 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error **errp) return 0; } -/** - * zlib_send_write: do the actual write of the data - * - * Do the actual write of the comprresed buffer. - * - * Returns 0 for success or -1 for error - * - * @p: Params for the channel that we are using - * @used: number of pages used - * @errp: pointer to an error - */ -static int zlib_send_write(MultiFDSendParams *p, uint32_t used, Error **errp) -{ - return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp); -} - /** * zlib_recv_setup: setup receive side * @@ -307,7 +291,6 @@ static MultiFDMethods multifd_zlib_ops = { .send_setup = zlib_send_setup, .send_cleanup = zlib_send_cleanup, .send_prepare = zlib_send_prepare, - .send_write = zlib_send_write, .recv_setup = zlib_recv_setup, .recv_cleanup = zlib_recv_cleanup, .recv_pages = zlib_recv_pages diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index bd393aee0d..757434d1ee 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -163,22 +163,6 @@ static int zstd_send_prepare(MultiFDSendParams *p, Error **errp) return 0; } -/** - * zstd_send_write: do the actual write of the data - * - * Do the actual write of the comprresed buffer. - * - * Returns 0 for success or -1 for error - * - * @p: Params for the channel that we are using - * @used: number of pages used - * @errp: pointer to an error - */ -static int zstd_send_write(MultiFDSendParams *p, uint32_t used, Error **errp) -{ - return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp); -} - /** * zstd_recv_setup: setup receive side * @@ -320,7 +304,6 @@ static MultiFDMethods multifd_zstd_ops = { .send_setup = zstd_send_setup, .send_cleanup = zstd_send_cleanup, .send_prepare = zstd_send_prepare, - .send_write = zstd_send_write, .recv_setup = zstd_recv_setup, .recv_cleanup = zstd_recv_cleanup, .recv_pages = zstd_recv_pages diff --git a/migration/multifd.c b/migration/multifd.c index f75bd3c188..96b9cc0d8b 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -100,22 +100,6 @@ static int nocomp_send_prepare(MultiFDSendParams *p, Error **errp) return 0; } -/** - * nocomp_send_write: do the actual write of the data - * - * For no compression we just have to write the data. - * - * Returns 0 for success or -1 for error - * - * @p: Params for the channel that we are using - * @used: number of pages used - * @errp: pointer to an error - */ -static int nocomp_send_write(MultiFDSendParams *p, uint32_t used, Error **errp) -{ - return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp); -} - /** * nocomp_recv_setup: setup receive side * @@ -173,7 +157,6 @@ static MultiFDMethods multifd_nocomp_ops = { .send_setup = nocomp_send_setup, .send_cleanup = nocomp_send_cleanup, .send_prepare = nocomp_send_prepare, - .send_write = nocomp_send_write, .recv_setup = nocomp_recv_setup, .recv_cleanup = nocomp_recv_cleanup, .recv_pages = nocomp_recv_pages @@ -690,7 +673,8 @@ static void *multifd_send_thread(void *opaque) } if (used) { - ret = multifd_send_state->ops->send_write(p, used, &local_err); + ret = qio_channel_writev_all(p->c, p->iov, p->iovs_num, + &local_err); if (ret != 0) { break; } -- 2.34.1