qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}
@ 2013-09-04  2:32 Isaku Yamahata
  2013-09-04  2:32 ` [Qemu-devel] [PATCH 2/2] rdma: simplify qemu_rdma_register_and_get_keys() Isaku Yamahata
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Isaku Yamahata @ 2013-09-04  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: owasserm, pbonzini, mrhines, quintela

Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
---
 migration-rdma.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/migration-rdma.c b/migration-rdma.c
index e71c10a..db5a908 100644
--- a/migration-rdma.c
+++ b/migration-rdma.c
@@ -511,19 +511,21 @@ static int qemu_rdma_exchange_send(RDMAContext *rdma, RDMAControlHeader *head,
                                    int *resp_idx,
                                    int (*callback)(RDMAContext *rdma));
 
-static inline uint64_t ram_chunk_index(uint8_t *start, uint8_t *host)
+static inline uint64_t ram_chunk_index(const uint8_t *start,
+                                       const uint8_t *host)
 {
     return ((uintptr_t) host - (uintptr_t) start) >> RDMA_REG_CHUNK_SHIFT;
 }
 
-static inline uint8_t *ram_chunk_start(RDMALocalBlock *rdma_ram_block,
+static inline uint8_t *ram_chunk_start(const RDMALocalBlock *rdma_ram_block,
                                        uint64_t i)
 {
     return (uint8_t *) (((uintptr_t) rdma_ram_block->local_host_addr)
                                     + (i << RDMA_REG_CHUNK_SHIFT));
 }
 
-static inline uint8_t *ram_chunk_end(RDMALocalBlock *rdma_ram_block, uint64_t i)
+static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block,
+                                     uint64_t i)
 {
     uint8_t *result = ram_chunk_start(rdma_ram_block, i) +
                                          (1UL << RDMA_REG_CHUNK_SHIFT);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-09-24 17:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04  2:32 [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end} Isaku Yamahata
2013-09-04  2:32 ` [Qemu-devel] [PATCH 2/2] rdma: simplify qemu_rdma_register_and_get_keys() Isaku Yamahata
2013-09-18 13:00   ` Juan Quintela
2013-09-18 15:01   ` Michael R. Hines
2013-09-20 16:59     ` Isaku Yamahata
2013-09-20 17:44       ` Michael R. Hines
2013-09-18 12:55 ` [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end} Juan Quintela
2013-09-18 14:28 ` Michael R. Hines
2013-09-20  7:55   ` Isaku Yamahata
2013-09-20 14:11     ` Michael R. Hines
2013-09-24 16:36       ` Juan Quintela
2013-09-24 17:21         ` Michael R. Hines
2013-09-24 17:38           ` Juan Quintela
2013-09-24 17:44             ` Michael R. Hines

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).