From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDCF1C433F5 for ; Tue, 23 Nov 2021 17:58:27 +0000 (UTC) Received: from localhost ([::1]:34052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpa3m-000438-V4 for qemu-devel@archiver.kernel.org; Tue, 23 Nov 2021 12:58:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpZxJ-0006g8-W3 for qemu-devel@nongnu.org; Tue, 23 Nov 2021 12:51:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpZxF-0006tc-Ln for qemu-devel@nongnu.org; Tue, 23 Nov 2021 12:51:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637689899; 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=ffZrQjVgGHNgunaflrengDVoG/ghaT4oQPjHYo/PfYo=; b=gQm4UaQKLDsvEEjBbLbyLoa6j7Ie/w6+JJKoFlRn+p8IduUHRIty0aoutrLSRW2uPUXe0/ pDoYEMeOfBvzdY0+jLjMzftFC2znHZ0x0YZhFeuq8Mg6+GPYQOS0iqSROa2FoFTTmFaGt7 EpIXeAccq1Y0G/jw4aQexfQ91mmldxY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-41-FaPbFev5Pg68_gCxWonQ7A-1; Tue, 23 Nov 2021 12:51:38 -0500 X-MC-Unique: FaPbFev5Pg68_gCxWonQ7A-1 Received: by mail-wm1-f72.google.com with SMTP id 69-20020a1c0148000000b0033214e5b021so8814650wmb.3 for ; Tue, 23 Nov 2021 09:51:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ffZrQjVgGHNgunaflrengDVoG/ghaT4oQPjHYo/PfYo=; b=UcueWtvLjLlxE54lis9kc+DNFMvv4eVj5YhbdJe1OsBNfyzQ6lhxNt/ZDGDNGQiw+H /EvA6i8x8nKPEmakafGdtF56mv2GpyKkM9ujH+GYh48eAWMpBhFjZxI4fi1GBsl7nKLO kz8/jH71G3UQhG4/toWm1BCZgMIyPYhpHv559pHSAw99tTjJTUWvshdnPD1T0VP7NdOn PLzw3c9tCyi94deq7CPisTu/gpMLwyCO0NHDUhuE0ZF9MXvv+6N4Guyc1wSzz1k4Vv/6 w8s+WjhkqjCoOdQ4OG+xUqfibW+aPbltXd47CkYBqwS3V3jOfuv//lelDgBTym3WBYHd kROQ== X-Gm-Message-State: AOAM533fKvWnAd0an06S5KlDONJYr14xwAYxD1NK6ugYXBClr9E5/N38 ZgdRmSaZ/MHUOtFXRdnZhi/QZ20zXtStCTAFzZN8FVGMlM9eyFm+ns6UNJxD5LqN5tbDxosL6mS Jtrgxa12pL+WUdmlx4PAOu/4jumVQmnwz25MoCG9rMgHsG9CETN51HGScLOG69RdFItA= X-Received: by 2002:a05:600c:b46:: with SMTP id k6mr5437832wmr.45.1637689896471; Tue, 23 Nov 2021 09:51:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzimihdnZU2EBx6X/hLMGXrYOqsZUewzP+nwvo4PJJsB5YXD81DMiVZl6VBw5HjUGOppCICYA== X-Received: by 2002:a05:600c:b46:: with SMTP id k6mr5437779wmr.45.1637689896174; Tue, 23 Nov 2021 09:51:36 -0800 (PST) Received: from localhost (static-233-86-86-188.ipcom.comunitel.net. [188.86.86.233]) by smtp.gmail.com with ESMTPSA id w17sm12866826wrp.79.2021.11.23.09.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 09:51:35 -0800 (PST) From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PATCH 14/23] multifd: Remove send_write() method Date: Tue, 23 Nov 2021 18:51:04 +0100 Message-Id: <20211123175113.35569-15-quintela@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211123175113.35569-1-quintela@redhat.com> References: <20211123175113.35569-1-quintela@redhat.com> MIME-Version: 1.0 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.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leonardo Bras , "Dr. David Alan Gilbert" , Peter Xu , Juan Quintela Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Everything use now iov's. Signed-off-by: Juan Quintela --- 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 478a4af115..f65159392a 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 259277dc42..6933ba622a 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 37487fd01c..71bdef068e 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 @@ -687,7 +670,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.33.1