summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/iser/iser_memory.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2015-04-14 18:08:24 +0300
committerDoug Ledford <dledford@redhat.com>2015-04-15 16:07:13 -0400
commit90a6684c30918786446fd062c7422a4098926891 (patch)
tree457f5bc46fd28161fb931b77e7db7b7d73d94aa7 /drivers/infiniband/ulp/iser/iser_memory.c
parent8b95aa2c1bf8c936e5b0e9096b180a3e4f5327ff (diff)
downloadblackbird-op-linux-90a6684c30918786446fd062c7422a4098926891.tar.gz
blackbird-op-linux-90a6684c30918786446fd062c7422a4098926891.zip
IB/iser: Modify struct iser_mem_reg members
No need to keep lkey, va, len variables, we can keep them as struct ib_sge. This will help when we change the memory registration logic. This patch does not change any functionality. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Adir Lev <adirl@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_memory.c')
-rw-r--r--drivers/infiniband/ulp/iser/iser_memory.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c
index 45f512043ef5..40d22d5c3fac 100644
--- a/drivers/infiniband/ulp/iser/iser_memory.c
+++ b/drivers/infiniband/ulp/iser/iser_memory.c
@@ -400,10 +400,10 @@ int iser_reg_page_vec(struct iscsi_iser_task *iser_task,
return ret;
}
- mem_reg->lkey = fmr->fmr->lkey;
+ mem_reg->sge.lkey = fmr->fmr->lkey;
mem_reg->rkey = fmr->fmr->rkey;
- mem_reg->va = page_vec->pages[0] + page_vec->offset;
- mem_reg->len = page_vec->data_size;
+ mem_reg->sge.addr = page_vec->pages[0] + page_vec->offset;
+ mem_reg->sge.length = page_vec->data_size;
mem_reg->mem_h = fmr;
return 0;
@@ -479,17 +479,17 @@ int iser_reg_rdma_mem_fmr(struct iscsi_iser_task *iser_task,
if (mem->dma_nents == 1) {
sg = mem->sg;
- mem_reg->lkey = device->mr->lkey;
+ mem_reg->sge.lkey = device->mr->lkey;
mem_reg->rkey = device->mr->rkey;
- mem_reg->len = ib_sg_dma_len(ibdev, &sg[0]);
- mem_reg->va = ib_sg_dma_address(ibdev, &sg[0]);
+ mem_reg->sge.length = ib_sg_dma_len(ibdev, &sg[0]);
+ mem_reg->sge.addr = ib_sg_dma_address(ibdev, &sg[0]);
iser_dbg("PHYSICAL Mem.register: lkey: 0x%08X rkey: 0x%08X "
"va: 0x%08lX sz: %ld]\n",
- (unsigned int)mem_reg->lkey,
+ (unsigned int)mem_reg->sge.lkey,
(unsigned int)mem_reg->rkey,
- (unsigned long)mem_reg->va,
- (unsigned long)mem_reg->len);
+ (unsigned long)mem_reg->sge.addr,
+ (unsigned long)mem_reg->sge.length);
} else { /* use FMR for multiple dma entries */
err = iser_reg_page_vec(iser_task, mem, ib_conn->fmr.page_vec,
mem_reg);
@@ -799,19 +799,19 @@ int iser_reg_rdma_mem_fastreg(struct iscsi_iser_task *iser_task,
}
desc->reg_indicators |= ISER_FASTREG_PROTECTED;
- mem_reg->lkey = sig_sge.lkey;
+ mem_reg->sge.lkey = sig_sge.lkey;
mem_reg->rkey = desc->pi_ctx->sig_mr->rkey;
- mem_reg->va = sig_sge.addr;
- mem_reg->len = sig_sge.length;
+ mem_reg->sge.addr = sig_sge.addr;
+ mem_reg->sge.length = sig_sge.length;
} else {
if (desc)
mem_reg->rkey = desc->data_mr->rkey;
else
mem_reg->rkey = device->mr->rkey;
- mem_reg->lkey = data_sge.lkey;
- mem_reg->va = data_sge.addr;
- mem_reg->len = data_sge.length;
+ mem_reg->sge.lkey = data_sge.lkey;
+ mem_reg->sge.addr = data_sge.addr;
+ mem_reg->sge.length = data_sge.length;
}
return 0;
OpenPOWER on IntegriCloud