Commit e564447
committed
bnxt_re/lib: Add uverbs object handle path for CQ/SRQ toggle page
The kernel driver supports two paths for the GET_TOGGLE_MEM ioctl:
- Legacy path (older kernels / older rdma-core): the caller sends
BNXT_RE_TOGGLE_MEM_TYPE (enum: CQ or SRQ) and BNXT_RE_TOGGLE_MEM_RES_ID
(the hardware queue ID). The kernel performs an XArray lookup per
ucontext to find the toggle page.
- New path (new kernel + new rdma-core): the caller sends a uverbs
object handle (BNXT_RE_TOGGLE_MEM_CQ_HANDLE or
BNXT_RE_TOGGLE_MEM_SRQ_HANDLE). The kernel resolves the uobject
directly, with built-in ownership verification and pinning.
During alloc_ucontext, lib now sets the new request bit
BNXT_RE_COMP_MASK_REQ_UCNTX_TOGGLE_MEM_UOBJ_SUPPORT to advertise
uobj-handle capability. If the kernel responds with
BNXT_RE_UCNTX_CMASK_TOGGLE_MEM_UOBJ_SUPPORT. Based on the negotiated
capability, new path will be selected.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>1 parent 5f4fe35 commit e564447
4 files changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| 641 | + | |
| 642 | + | |
640 | 643 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
136 | | - | |
137 | 146 | | |
138 | | - | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
| |||
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
392 | | - | |
393 | 400 | | |
394 | 401 | | |
395 | | - | |
| 402 | + | |
| 403 | + | |
396 | 404 | | |
397 | 405 | | |
398 | 406 | | |
| |||
2843 | 2851 | | |
2844 | 2852 | | |
2845 | 2853 | | |
2846 | | - | |
| 2854 | + | |
| 2855 | + | |
2847 | 2856 | | |
2848 | 2857 | | |
2849 | 2858 | | |
| |||
0 commit comments