|
|
0a122b |
From 46ab899a1dd2c704e18b5542aa2297d6e342e803 Mon Sep 17 00:00:00 2001
|
|
|
0a122b |
Message-Id: <46ab899a1dd2c704e18b5542aa2297d6e342e803.1387382496.git.minovotn@redhat.com>
|
|
|
0a122b |
In-Reply-To: <c5386144fbf09f628148101bc674e2421cdd16e3.1387382496.git.minovotn@redhat.com>
|
|
|
0a122b |
References: <c5386144fbf09f628148101bc674e2421cdd16e3.1387382496.git.minovotn@redhat.com>
|
|
|
0a122b |
From: Nigel Croxon <ncroxon@redhat.com>
|
|
|
0a122b |
Date: Thu, 14 Nov 2013 22:53:13 +0100
|
|
|
0a122b |
Subject: [PATCH 37/46] rdma: constify ram_chunk_{index, start, end}
|
|
|
0a122b |
|
|
|
0a122b |
RH-Author: Nigel Croxon <ncroxon@redhat.com>
|
|
|
0a122b |
Message-id: <1384469598-13137-38-git-send-email-ncroxon@redhat.com>
|
|
|
0a122b |
Patchwork-id: 55721
|
|
|
0a122b |
O-Subject: [RHEL7.0 PATCH 37/42] rdma: constify ram_chunk_{index, start, end}
|
|
|
0a122b |
Bugzilla: 1011720
|
|
|
0a122b |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
0a122b |
|
|
|
0a122b |
Bugzilla: 1011720
|
|
|
0a122b |
https://bugzilla.redhat.com/show_bug.cgi?id=1011720
|
|
|
0a122b |
|
|
|
0a122b |
>From commit ID:
|
|
|
0a122b |
commit dd286ed700c6ca2768ac3452bc5b79af1709296a
|
|
|
0a122b |
Author: Isaku Yamahata <yamahata@private.email.ne.jp>
|
|
|
0a122b |
Date: Wed Sep 4 11:32:19 2013 +0900
|
|
|
0a122b |
|
|
|
0a122b |
rdma: constify ram_chunk_{index, start, end}
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
|
|
|
0a122b |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
migration-rdma.c | 8 +++++---
|
|
|
0a122b |
1 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Michal Novotny <minovotn@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
migration-rdma.c | 8 +++++---
|
|
|
0a122b |
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
diff --git a/migration-rdma.c b/migration-rdma.c
|
|
|
0a122b |
index be3d984..f79be20 100644
|
|
|
0a122b |
--- a/migration-rdma.c
|
|
|
0a122b |
+++ b/migration-rdma.c
|
|
|
0a122b |
@@ -511,19 +511,21 @@ static int qemu_rdma_exchange_send(RDMAContext *rdma, RDMAControlHeader *head,
|
|
|
0a122b |
int *resp_idx,
|
|
|
0a122b |
int (*callback)(RDMAContext *rdma));
|
|
|
0a122b |
|
|
|
0a122b |
-static inline uint64_t ram_chunk_index(uint8_t *start, uint8_t *host)
|
|
|
0a122b |
+static inline uint64_t ram_chunk_index(const uint8_t *start,
|
|
|
0a122b |
+ const uint8_t *host)
|
|
|
0a122b |
{
|
|
|
0a122b |
return ((uintptr_t) host - (uintptr_t) start) >> RDMA_REG_CHUNK_SHIFT;
|
|
|
0a122b |
}
|
|
|
0a122b |
|
|
|
0a122b |
-static inline uint8_t *ram_chunk_start(RDMALocalBlock *rdma_ram_block,
|
|
|
0a122b |
+static inline uint8_t *ram_chunk_start(const RDMALocalBlock *rdma_ram_block,
|
|
|
0a122b |
uint64_t i)
|
|
|
0a122b |
{
|
|
|
0a122b |
return (uint8_t *) (((uintptr_t) rdma_ram_block->local_host_addr)
|
|
|
0a122b |
+ (i << RDMA_REG_CHUNK_SHIFT));
|
|
|
0a122b |
}
|
|
|
0a122b |
|
|
|
0a122b |
-static inline uint8_t *ram_chunk_end(RDMALocalBlock *rdma_ram_block, uint64_t i)
|
|
|
0a122b |
+static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block,
|
|
|
0a122b |
+ uint64_t i)
|
|
|
0a122b |
{
|
|
|
0a122b |
uint8_t *result = ram_chunk_start(rdma_ram_block, i) +
|
|
|
0a122b |
(1UL << RDMA_REG_CHUNK_SHIFT);
|
|
|
0a122b |
--
|
|
|
0a122b |
1.7.11.7
|
|
|
0a122b |
|