aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed/include/rdma/ib_umem.h
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2013-10-01 15:42:38 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2013-10-01 15:42:38 +0000
commite18c176d9d716d26803af005ff09e1889d35beba (patch)
tree96f32f4a1c254cf5ffaf7a2f0d3f9738f963db15 /sys/ofed/include/rdma/ib_umem.h
parent92c6196caadbcb648cd757d5f4b4e0b6426097f9 (diff)
downloadsrc-e18c176d9d716d26803af005ff09e1889d35beba.tar.gz
src-e18c176d9d716d26803af005ff09e1889d35beba.zip
Enable ib_dev.mmap function
Removed the ifdef linux from this function. Added stub function for contiguous pages to avoid compilation errors. Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re
Notes
Notes: svn path=/head/; revision=255972
Diffstat (limited to 'sys/ofed/include/rdma/ib_umem.h')
-rw-r--r--sys/ofed/include/rdma/ib_umem.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/ofed/include/rdma/ib_umem.h b/sys/ofed/include/rdma/ib_umem.h
index afa09f9337f4..8cdaa5abbb67 100644
--- a/sys/ofed/include/rdma/ib_umem.h
+++ b/sys/ofed/include/rdma/ib_umem.h
@@ -57,6 +57,24 @@ struct ib_umem {
unsigned long diff;
};
+struct ib_cmem {
+
+ struct ib_ucontext *context;
+ size_t length;
+ /* Link list of contiguous blocks being part of that cmem */
+ struct list_head ib_cmem_block;
+
+ /* Order of cmem block, 2^ block_order will equal number
+ of physical pages per block
+ */
+ unsigned long block_order;
+ /* Refernce counter for that memory area
+ - When value became 0 pages will be returned to the kernel.
+ */
+ struct kref refcount;
+};
+
+
struct ib_umem_chunk {
struct list_head list;
int nents;
@@ -70,4 +88,14 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
void ib_umem_release(struct ib_umem *umem);
int ib_umem_page_count(struct ib_umem *umem);
+int ib_cmem_map_contiguous_pages_to_vma(struct ib_cmem *ib_cmem,
+ struct vm_area_struct *vma);
+struct ib_cmem *ib_cmem_alloc_contiguous_pages(struct ib_ucontext *context,
+ unsigned long total_size,
+ unsigned long page_size_order);
+void ib_cmem_release_contiguous_pages(struct ib_cmem *cmem);
+int ib_umem_map_to_vma(struct ib_umem *umem,
+ struct vm_area_struct *vma);
+
+
#endif /* IB_UMEM_H */