[openib-general] [PATCH] allow chaining ib_fmr structures in a list
Sean Hefty
mshefty at ichips.intel.com
Thu Sep 2 10:22:20 PDT 2004
This patch changes ib_unmap_fmr from taking an array to using a linked list.
- Sean
-- Index: ib_verbs.h
===================================================================
--- ib_verbs.h (revision 724)
+++ ib_verbs.h (working copy)
@@ -117,9 +117,9 @@
struct ib_fmr {
struct ib_device *device;
struct ib_pd *pd;
+ struct list_head list;
u32 lkey;
u32 rkey;
- atomic_t usecnt;
};
enum ib_device_cap_flags {
@@ -714,7 +714,7 @@
struct ib_phys_buf *phys_buf_array,
int num_phys_buf,
u64 *iova_start);
- int (*unmap_fmr)(struct ib_fmr **fmr_array, int fmr_cnt);
+ int (*unmap_fmr)(struct ib_fmr *fmr);
int (*dealloc_fmr)(struct ib_fmr *fmr);
int (*attach_mcast)(struct ib_qp *qp, union ib_gid *gid,
u16 lid);
@@ -888,11 +888,9 @@
iova_start);
}
-static inline int ib_unmap_fmr(struct ib_fmr **fmr_array,
- int fmr_cnt)
+static inline int ib_unmap_fmr(struct ib_fmr *fmr)
{
- /* Requires all FMRs to come from same device. */
- return fmr_array[0]->device->unmap_fmr(fmr_array, fmr_cnt);
+ return fmr->device->unmap_fmr(fmr);
}
int ib_dealloc_fmr(struct ib_fmr *fmr);
More information about the general
mailing list