hdr->flags |= ISER_RSV;
hdr->read_stag = cpu_to_be32(mem_reg->rkey);
- hdr->read_va = cpu_to_be64(mem_reg->va);
+ hdr->read_va = cpu_to_be64(mem_reg->sge.addr);
iser_dbg("Cmd itt:%d READ tags RKEY:%#.4X VA:%#llX\n",
task->itt, mem_reg->rkey,
- (unsigned long long)mem_reg->va);
+ (unsigned long long)mem_reg->sge.addr);
return 0;
}
if (unsol_sz < edtl) {
hdr->flags |= ISER_WSV;
hdr->write_stag = cpu_to_be32(mem_reg->rkey);
- hdr->write_va = cpu_to_be64(mem_reg->va + unsol_sz);
+ hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz);
iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X "
"VA:%#llX + unsol:%d\n",
task->itt, mem_reg->rkey,
- (unsigned long long)mem_reg->va, unsol_sz);
+ (unsigned long long)mem_reg->sge.addr, unsol_sz);
}
if (imm_sz > 0) {
iser_dbg("Cmd itt:%d, WRITE, adding imm.data sz: %d\n",
task->itt, imm_sz);
- tx_dsg->addr = mem_reg->va;
+ tx_dsg->addr = mem_reg->sge.addr;
tx_dsg->length = imm_sz;
- tx_dsg->lkey = mem_reg->lkey;
+ tx_dsg->lkey = mem_reg->sge.lkey;
iser_task->desc.num_sge = 2;
}
mem_reg = &iser_task->rdma_reg[ISER_DIR_OUT];
tx_dsg = &tx_desc->tx_sg[1];
- tx_dsg->addr = mem_reg->va + buf_offset;
- tx_dsg->length = data_seg_len;
- tx_dsg->lkey = mem_reg->lkey;
+ tx_dsg->addr = mem_reg->sge.addr + buf_offset;
+ tx_dsg->length = data_seg_len;
+ tx_dsg->lkey = mem_reg->sge.lkey;
tx_desc->num_sge = 2;
if (buf_offset + data_seg_len > iser_task->data[ISER_DIR_OUT].data_len) {
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;
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);
}
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;