*/
static int rvt_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata)
{
+ struct rvt_dev_info *rdi = ib_to_rvt(uctx->device);
+
+ if (rdi->driver_f.alloc_ucontext)
+ return rdi->driver_f.alloc_ucontext(uctx, udata);
return 0;
}
*/
static void rvt_dealloc_ucontext(struct ib_ucontext *context)
{
+ struct rvt_dev_info *rdi = ib_to_rvt(context->device);
+
+ if (rdi->driver_f.dealloc_ucontext)
+ rdi->driver_f.dealloc_ucontext(context);
return;
}
/* User context */
struct rvt_ucontext {
struct ib_ucontext ibucontext;
+ void *priv;
};
/* Protection domain */
/* Get and return CPU to pin CQ processing thread */
int (*comp_vect_cpu_lookup)(struct rvt_dev_info *rdi, int comp_vect);
+
+ /* allocate a ucontext */
+ int (*alloc_ucontext)(struct ib_ucontext *uctx, struct ib_udata *udata);
+
+ /* deallocate a ucontext */
+ void (*dealloc_ucontext)(struct ib_ucontext *context);
};
struct rvt_dev_info {