Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dean Luick and committed by
Leon Romanovsky
679eb25d 786ee8dd

+15
+8
drivers/infiniband/sw/rdmavt/vt.c
··· 244 244 */ 245 245 static int rvt_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata) 246 246 { 247 + struct rvt_dev_info *rdi = ib_to_rvt(uctx->device); 248 + 249 + if (rdi->driver_f.alloc_ucontext) 250 + return rdi->driver_f.alloc_ucontext(uctx, udata); 247 251 return 0; 248 252 } 249 253 ··· 257 253 */ 258 254 static void rvt_dealloc_ucontext(struct ib_ucontext *context) 259 255 { 256 + struct rvt_dev_info *rdi = ib_to_rvt(context->device); 257 + 258 + if (rdi->driver_f.dealloc_ucontext) 259 + rdi->driver_f.dealloc_ucontext(context); 260 260 return; 261 261 } 262 262
+7
include/rdma/rdma_vt.h
··· 149 149 /* User context */ 150 150 struct rvt_ucontext { 151 151 struct ib_ucontext ibucontext; 152 + void *priv; 152 153 }; 153 154 154 155 /* Protection domain */ ··· 360 359 361 360 /* Get and return CPU to pin CQ processing thread */ 362 361 int (*comp_vect_cpu_lookup)(struct rvt_dev_info *rdi, int comp_vect); 362 + 363 + /* allocate a ucontext */ 364 + int (*alloc_ucontext)(struct ib_ucontext *uctx, struct ib_udata *udata); 365 + 366 + /* deallocate a ucontext */ 367 + void (*dealloc_ucontext)(struct ib_ucontext *context); 363 368 }; 364 369 365 370 struct rvt_dev_info {