[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] rdma: simplify qemu_rdma_register_and_get_k
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] rdma: simplify qemu_rdma_register_and_get_keys() |
Date: |
Wed, 18 Sep 2013 15:00:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Isaku Yamahata <address@hidden> wrote:
> Signed-off-by: Isaku Yamahata <address@hidden>
I don't understand this bit:
> + uint8_t *chunk_start = ram_chunk_start(block, chunk);
> + uint8_t *chunk_end = ram_chunk_end(block, chunk);
Here we are getting just the length of a chunk
> sge.length = length;
>
> chunk = ram_chunk_index(block->local_host_addr, (uint8_t *) sge.addr);
> - chunk_start = ram_chunk_start(block, chunk);
>
> if (block->is_ram_block) {
> chunks = length / (1UL << RDMA_REG_CHUNK_SHIFT);
> @@ -1884,8 +1883,6 @@ retry:
> DDPRINTF("Writing %" PRIu64 " chunks, (%" PRIu64 " MB)\n",
> chunks + 1, (chunks + 1) * (1UL << RDMA_REG_CHUNK_SHIFT) / 1024 /
> 1024);
>
> - chunk_end = ram_chunk_end(block, chunk + chunks);
> -
But here chuck_end was the length of a list of chucks.
> @@ -3076,11 +3069,9 @@ static int qemu_rdma_registration_handle(QEMUFile *f,
> void *opaque,
> host_addr = block->local_host_addr +
> (reg->key.chunk * (1UL << RDMA_REG_CHUNK_SHIFT));
> }
> - chunk_start = ram_chunk_start(block, chunk);
> - chunk_end = ram_chunk_end(block, chunk + reg->chunks);
> if (qemu_rdma_register_and_get_keys(rdma, block,
> (uint8_t *)host_addr, NULL, ®_result->rkey,
> - chunk, chunk_start, chunk_end)) {
> + chunk)) {
Same here.
I am missing something obvious?
PD. No, I don't claim to understand RDMA.
- [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Isaku Yamahata, 2013/09/03
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Juan Quintela, 2013/09/18
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Michael R. Hines, 2013/09/18
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Isaku Yamahata, 2013/09/20
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Michael R. Hines, 2013/09/20
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Juan Quintela, 2013/09/24
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Michael R. Hines, 2013/09/24
- Re: [Qemu-devel] [PATCH 1/2] rdma: constify ram_chunk_{index, start, end}, Juan Quintela, 2013/09/24