From nobody Mon Feb 9 19:29:42 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=1683634280; cv=none; d=zohomail.com; s=zohoarc; b=GSDsV+UjyERHH5sKmOJmF6N2/qcH0jqesmV4rTqJateUTCCVrepgbOsLA6D9RxOp+b4zqLMaKlnWr3vNJLKdBeMc8cj6V7dn7uVtKm3v8p54Il/1DDwxNRxwnLDgK9OkUz5JB6nv8QoLGbW9zGdWujcnA5R+blFC+pX/vTp+oAw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683634280; h=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=q+OYFTQDLo2hPw+W3librz25YjPdfcHejCgXDTWQyjQ=; b=UVYb3BsvIwMnRQiZxtRdYF2XNDhlrudjwyIYNM/ufIgtoXapFN9ZJL9H6Gs22ABnhvx6HTdwhdJXpS0DmIwcJfal6fXoJtiFfJg7eVEcap4tDx4fodprzOWcmYZrtvvqR2qySiH7l5YdFq2doqcqM135UcRhM9BrU9VYqrKjNZU= 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 1683634280884420.6150136675748; Tue, 9 May 2023 05:11:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwMBU-0006SH-F3; Tue, 09 May 2023 08:11:13 -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 1pwMBS-0006Rs-I8 for qemu-devel@nongnu.org; Tue, 09 May 2023 08:11:10 -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 1pwMBN-0008LH-RW for qemu-devel@nongnu.org; Tue, 09 May 2023 08:11: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-511-su1u0oeNMciBMhsQo0RTyw-1; Tue, 09 May 2023 08:07:11 -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 757FE3C0F67A for ; Tue, 9 May 2023 12:07:11 +0000 (UTC) Received: from secure.mitica (unknown [10.39.193.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC35B63F8B; Tue, 9 May 2023 12:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683634264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q+OYFTQDLo2hPw+W3librz25YjPdfcHejCgXDTWQyjQ=; b=KV8jNdl3/B95L0fjA4NMIx6Wbke0IaA9J9/8TaTnUJkYhy0fvAG701mCDKTtYQqYjhnaZ7 8LlojeWeAmx1a+lIV40/u6xlUyrizy3HyZEvakPqVnYBAiQae8Pm1vbPouDbOIe2VYYWUW OoYO3HTcd6tX6eYj+oSGD9NNSW5Dgcc= X-MC-Unique: su1u0oeNMciBMhsQo0RTyw-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Leonardo Bras , Juan Quintela , Peter Xu Subject: [PATCH v3 08/10] migration/rdma: Move rdma constants from qemu-file.h to rdma.h Date: Tue, 9 May 2023 14:06:58 +0200 Message-Id: <20230509120700.78359-9-quintela@redhat.com> In-Reply-To: <20230509120700.78359-1-quintela@redhat.com> References: <20230509120700.78359-1-quintela@redhat.com> MIME-Version: 1.0 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=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: , 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: 1683634282624100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Juan Quintela --- migration/qemu-file.h | 17 ----------------- migration/ram.c | 2 +- migration/rdma.h | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/migration/qemu-file.h b/migration/qemu-file.h index c7c832d200..83b8fb10de 100644 --- a/migration/qemu-file.h +++ b/migration/qemu-file.h @@ -29,13 +29,6 @@ #include "exec/cpu-common.h" #include "io/channel.h" =20 -/* - * Constants used by ram_control_* hooks - */ -#define RAM_CONTROL_SETUP 0 -#define RAM_CONTROL_ROUND 1 -#define RAM_CONTROL_FINISH 3 - QEMUFile *qemu_file_new_input(QIOChannel *ioc); QEMUFile *qemu_file_new_output(QIOChannel *ioc); int qemu_fclose(QEMUFile *f); @@ -105,16 +98,6 @@ void qemu_fflush(QEMUFile *f); void qemu_file_set_blocking(QEMUFile *f, bool block); int qemu_file_get_to_fd(QEMUFile *f, int fd, size_t size); =20 -/* Whenever this is found in the data stream, the flags - * will be passed to ram_control_load_hook in the incoming-migration - * side. This lets before_ram_iterate/after_ram_iterate add - * transport-specific sections to the RAM migration data. - */ -#define RAM_SAVE_FLAG_HOOK 0x80 - -#define RAM_SAVE_CONTROL_NOT_SUPP -1000 -#define RAM_SAVE_CONTROL_DELAYED -2000 - QIOChannel *qemu_file_get_ioc(QEMUFile *file); =20 #endif diff --git a/migration/ram.c b/migration/ram.c index d329c36c16..4960f5960f 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -86,7 +86,7 @@ #define RAM_SAVE_FLAG_EOS 0x10 #define RAM_SAVE_FLAG_CONTINUE 0x20 #define RAM_SAVE_FLAG_XBZRLE 0x40 -/* 0x80 is reserved in qemu-file.h for RAM_SAVE_FLAG_HOOK */ +/* 0x80 is reserved in rdma.h for RAM_SAVE_FLAG_HOOK */ #define RAM_SAVE_FLAG_COMPRESS_PAGE 0x100 #define RAM_SAVE_FLAG_MULTIFD_FLUSH 0x200 /* We can't use any flag that is bigger than 0x200 */ diff --git a/migration/rdma.h b/migration/rdma.h index 4674dceb4a..9f3ace0900 100644 --- a/migration/rdma.h +++ b/migration/rdma.h @@ -24,6 +24,22 @@ void rdma_start_outgoing_migration(void *opaque, const c= har *host_port, =20 void rdma_start_incoming_migration(const char *host_port, Error **errp); =20 +/* + * Constants used by rdma return codes + */ +#define RAM_CONTROL_SETUP 0 +#define RAM_CONTROL_ROUND 1 +#define RAM_CONTROL_FINISH 3 + +/* + * Whenever this is found in the data stream, the flags + * will be passed to rdma functions in the incoming-migration + * side. + */ +#define RAM_SAVE_FLAG_HOOK 0x80 + +#define RAM_SAVE_CONTROL_NOT_SUPP -1000 +#define RAM_SAVE_CONTROL_DELAYED -2000 =20 #ifdef CONFIG_RDMA int qemu_rdma_registration_handle(QEMUFile *f); --=20 2.40.0