mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
RDMA/rdmavt: Add ucontext alloc/dealloc passthrough
Add a private data pointer to the ucontext structure and add per-client pass-throughs. Signed-off-by: Dean Luick <dean.luick@cornelisnetworks.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com> Link: https://patch.msgid.link/177325008318.52243.7367786996925601681.stgit@awdrv-04.cornelisnetworks.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
786ee8ddf4
commit
679eb25de4
|
|
@ -244,6 +244,10 @@ static int rvt_query_gid(struct ib_device *ibdev, u32 port_num,
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -253,6 +257,10 @@ static int rvt_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata)
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ struct rvt_driver_params {
|
|||
/* User context */
|
||||
struct rvt_ucontext {
|
||||
struct ib_ucontext ibucontext;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
/* Protection domain */
|
||||
|
|
@ -359,6 +360,12 @@ struct rvt_driver_provided {
|
|||
|
||||
/* 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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user