aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2007-08-01 05:29:05 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:16 -0400
commit8ad11fb6b0739e704953e2b0aed453bf7d75d4f6 (patch)
tree671838bc9293987efba214f2d645d7e40befc5a8 /include/linux/mlx4
parentd7bb58fb1c0e7264a7261c7d0304121ef9402e94 (diff)
IB/mlx4: Implement FMRs
Implement FMRs for mlx4. This is an adaptation of code from mthca. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index a93520c76fde..222815d91c40 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -214,6 +214,17 @@ struct mlx4_mr {
214 int enabled; 214 int enabled;
215}; 215};
216 216
217struct mlx4_fmr {
218 struct mlx4_mr mr;
219 struct mlx4_mpt_entry *mpt;
220 __be64 *mtts;
221 dma_addr_t dma_handle;
222 int max_pages;
223 int max_maps;
224 int maps;
225 u8 page_shift;
226};
227
217struct mlx4_uar { 228struct mlx4_uar {
218 unsigned long pfn; 229 unsigned long pfn;
219 int index; 230 int index;
@@ -337,4 +348,14 @@ int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port);
337int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); 348int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
338int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); 349int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
339 350
351int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list,
352 int npages, u64 iova, u32 *lkey, u32 *rkey);
353int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages,
354 int max_maps, u8 page_shift, struct mlx4_fmr *fmr);
355int mlx4_fmr_enable(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
356void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
357 u32 *lkey, u32 *rkey);
358int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
359int mlx4_SYNC_TPT(struct mlx4_dev *dev);
360
340#endif /* MLX4_DEVICE_H */ 361#endif /* MLX4_DEVICE_H */