IB/core: Add passing an offset into the SG to ib_map_mr_sg
Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
0691a286d5
commit
ff2ba99365
@@ -1827,7 +1827,8 @@ struct ib_device {
|
||||
u32 max_num_sg);
|
||||
int (*map_mr_sg)(struct ib_mr *mr,
|
||||
struct scatterlist *sg,
|
||||
int sg_nents);
|
||||
int sg_nents,
|
||||
unsigned sg_offset);
|
||||
struct ib_mw * (*alloc_mw)(struct ib_pd *pd,
|
||||
enum ib_mw_type type,
|
||||
struct ib_udata *udata);
|
||||
@@ -3111,29 +3112,23 @@ struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u8 port,
|
||||
u16 pkey, const union ib_gid *gid,
|
||||
const struct sockaddr *addr);
|
||||
|
||||
int ib_map_mr_sg(struct ib_mr *mr,
|
||||
struct scatterlist *sg,
|
||||
int sg_nents,
|
||||
unsigned int page_size);
|
||||
int ib_map_mr_sg(struct ib_mr *mr, struct scatterlist *sg, int sg_nents,
|
||||
unsigned int sg_offset, unsigned int page_size);
|
||||
|
||||
static inline int
|
||||
ib_map_mr_sg_zbva(struct ib_mr *mr,
|
||||
struct scatterlist *sg,
|
||||
int sg_nents,
|
||||
unsigned int page_size)
|
||||
ib_map_mr_sg_zbva(struct ib_mr *mr, struct scatterlist *sg, int sg_nents,
|
||||
unsigned int sg_offset, unsigned int page_size)
|
||||
{
|
||||
int n;
|
||||
|
||||
n = ib_map_mr_sg(mr, sg, sg_nents, page_size);
|
||||
n = ib_map_mr_sg(mr, sg, sg_nents, sg_offset, page_size);
|
||||
mr->iova = 0;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
int ib_sg_to_pages(struct ib_mr *mr,
|
||||
struct scatterlist *sgl,
|
||||
int sg_nents,
|
||||
int (*set_page)(struct ib_mr *, u64));
|
||||
int ib_sg_to_pages(struct ib_mr *mr, struct scatterlist *sgl, int sg_nents,
|
||||
unsigned int sg_offset, int (*set_page)(struct ib_mr *, u64));
|
||||
|
||||
void ib_drain_rq(struct ib_qp *qp);
|
||||
void ib_drain_sq(struct ib_qp *qp);
|
||||
|
Reference in New Issue
Block a user