IB/srp: Convert to new registration API

Instead of constructing a page list, call ib_map_mr_sg
and post a new ib_reg_wr. srp_map_finish_fr now returns
the number of sg elements registered.

Remove srp_finish_mapping since no one is calling it.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Tested-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Sagi Grimberg
2015-10-13 19:11:39 +03:00
committed by Doug Ledford
parent 26630e8a09
commit f7f7aab1a5
2 changed files with 71 additions and 65 deletions

View File

@@ -242,7 +242,6 @@ struct srp_iu {
struct srp_fr_desc {
struct list_head entry;
struct ib_mr *mr;
struct ib_fast_reg_page_list *frpl;
};
/**
@@ -294,11 +293,17 @@ struct srp_map_state {
} gen;
};
struct srp_direct_buf *desc;
u64 *pages;
union {
u64 *pages;
struct scatterlist *sg;
};
dma_addr_t base_dma_addr;
u32 dma_len;
u32 total_len;
unsigned int npages;
union {
unsigned int npages;
int sg_nents;
};
unsigned int nmdesc;
unsigned int ndesc;
};