From nobody Tue Feb 10 01:35:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684154142; cv=none; d=zohomail.com; s=zohoarc; b=cccv/XI1YkOizQ3iYpbujUA2r2anOpo3xTyhR/N5ENCbrF3WMgxCknCebotl2LCmu79mEqGPXgo8DZHgJYa8fLc6D3oz2nBUwzKthHC9p2rVZTsS6giXpfuJXXZZW8A+QYWr7mk02b/hAN+igAhMbDyVSxFOri8LQhi3qWfE39Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684154142; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aWmRjz4fwuIJDiq0s/t2IkjQIvfxRe7eKWP6VfkWff8=; b=LHSQSr1sz1k3f+f0v8EN8x9vUmEiOHb/7I4UKbwmJlDTxz3wunonVpAASMPhig2kV0VXguY8Bnf/q9UD/bEfwiOaoKO/tYlTCwCvlHPWC6KDWBbD+R39o+uh6wW0gJxHw1wr+yIpHn9lQbysugzw36Y7plEQSI0clw05Gc53gvQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684154142392340.9084684732936; Mon, 15 May 2023 05:35:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXPg-0006p6-7X; Mon, 15 May 2023 08:34:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyXP1-0006TG-HF for qemu-devel@nongnu.org; Mon, 15 May 2023 08:34:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyXOw-0003MX-J5 for qemu-devel@nongnu.org; Mon, 15 May 2023 08:34:10 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-251-o5W7XfJMOtCLsoRRX7Bq_A-1; Mon, 15 May 2023 08:33:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5E0C938123A5; Mon, 15 May 2023 12:33:59 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 504A963F3D; Mon, 15 May 2023 12:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684154042; 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=aWmRjz4fwuIJDiq0s/t2IkjQIvfxRe7eKWP6VfkWff8=; b=WZbCq+j6ybiaBID7HcwM0l1p91JKIOuKeOcn89B16guISUYPLTpOZhVUTdLrzDLW6b4Cm7 JGYu0UOk5Blf784W1/iYO3sxhqo/ce12qRQV2Ouxv0y9+67T/hDRS4mST63Y4vrlKklnyH HV1EEVhXLMpLKN4uMUL+LnhTsUDA7K4= X-MC-Unique: o5W7XfJMOtCLsoRRX7Bq_A-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: David Hildenbrand , qemu-block@nongnu.org, Juan Quintela , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Leonardo Bras , Peter Xu , Stefan Hajnoczi , Fam Zheng , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 10/11] qemu-file: Make rate_limit_used an uint64_t Date: Mon, 15 May 2023 14:33:33 +0200 Message-Id: <20230515123334.58995-11-quintela@redhat.com> In-Reply-To: <20230515123334.58995-1-quintela@redhat.com> References: <20230515123334.58995-1-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684154142891100001 Change all the functions that use it. It was already passed as uint64_t. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Message-Id: <20230508130909.65420-6-quintela@redhat.com> --- migration/qemu-file.h | 2 +- migration/qemu-file.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/qemu-file.h b/migration/qemu-file.h index 13c7c78c0d..6905825f23 100644 --- a/migration/qemu-file.h +++ b/migration/qemu-file.h @@ -138,7 +138,7 @@ void qemu_file_reset_rate_limit(QEMUFile *f); * out of band from the main file object I/O methods, and * need to be applied to the rate limiting calcuations */ -void qemu_file_acct_rate_limit(QEMUFile *f, int64_t len); +void qemu_file_acct_rate_limit(QEMUFile *f, uint64_t len); void qemu_file_set_rate_limit(QEMUFile *f, uint64_t new_rate); uint64_t qemu_file_get_rate_limit(QEMUFile *f); int qemu_file_get_error_obj(QEMUFile *f, Error **errp); diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 94d1069c8e..1b39d51dd4 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -49,7 +49,7 @@ struct QEMUFile { * Total amount of data in bytes queued for transfer * during this rate limiting time window */ - int64_t rate_limit_used; + uint64_t rate_limit_used; =20 /* The sum of bytes transferred on the wire */ uint64_t total_transferred; @@ -756,7 +756,7 @@ void qemu_file_reset_rate_limit(QEMUFile *f) f->rate_limit_used =3D 0; } =20 -void qemu_file_acct_rate_limit(QEMUFile *f, int64_t len) +void qemu_file_acct_rate_limit(QEMUFile *f, uint64_t len) { f->rate_limit_used +=3D len; } --=20 2.40.1