2 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
\r
3 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
\r
5 * This software is available to you under the OpenIB.org BSD license
\r
8 * Redistribution and use in source and binary forms, with or
\r
9 * without modification, are permitted provided that the following
\r
10 * conditions are met:
\r
12 * - Redistributions of source code must retain the above
\r
13 * copyright notice, this list of conditions and the following
\r
16 * - Redistributions in binary form must reproduce the above
\r
17 * copyright notice, this list of conditions and the following
\r
18 * disclaimer in the documentation and/or other materials
\r
19 * provided with the distribution.
\r
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
25 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
26 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
33 #ifndef __IB_UAL_UVP_H__
\r
34 #define __IB_UAL_UVP_H__
\r
36 #include <complib/cl_types.h>
\r
37 #include <iba/ib_types.h>
\r
38 #include <iba/ib_ci.h>
\r
40 /****h* UAL_UVP_Interface/Overview user-mode Verbs
\r
42 * User-mode Verbs -- User-mode Verbs implements the HCA specific
\r
43 * user-mode functions to plug in to the Usermode Access Layer
\r
44 * Architecture (UAL)
\r
47 * Copyright© 2001 Intel Corporation - All Rights Reserved.
\r
49 * The user-mode Verbs Interface defines the mechanism for a HCA vendor
\r
50 * to plug into the User-mode Access Layer (UAL) architecture.
\r
51 * Access Layer API is what is exposed to the user-mode applications.
\r
52 * The interface described here is not Verbs API. In this interface model,
\r
53 * UAL provides a generic mechanism to exchange vendor specific info
\r
54 * in the implementation of verbs within the UAL architecture. UAL provides
\r
55 * the support for callback processing. For instance, AL provides a
\r
56 * QP error callback when a qp incurs error. Such asynchronous events are
\r
57 * handled with the support of UAL and not by the vendor interface described
\r
60 * For verbs related AL APIs, UAL packages the parameters in an IOCTL
\r
61 * and sends it to the kernel AL. In the UAL design, this is broken down
\r
65 * A vendor specified pre-ioctl function is called with relevant input
\r
66 * parameters including a private buffer template (ci_umv_buf_t)
\r
67 * for the vendor to communicate with the corresponding HCA driver.
\r
68 * For calls that does not go to the HCA driver (for e.g. ib_open_ca())
\r
69 * no private buffer will be passed.
\r
70 * b. Sending IOCTL to kernel AL
\r
71 * Following step (a), UAL prepares an IOCTL with the relevant parameters
\r
72 * including the vendor's private buffer. UAL/user-mode proxy does not
\r
73 * interpret the contents of the private buffer.
\r
74 * UAL sends the IOCTL to the user-mode proxy in kernel. The proxy
\r
75 * interfaces with kernel AL to act on behalf the user. AL passes the
\r
76 * parameters to the Verbs Provider Driver and the results are returned
\r
78 * c. Post-ioctl step.
\r
79 * Following the return from IOCTL in step (b), UAL calls a
\r
80 * vendor-specified post-ioctl function with relevant parameters.
\r
81 * UAL will call the post-ioctl function whether or not step (b)
\r
82 * succeeded. The ioctl itself could have successfully returned but
\r
83 * a vendor-specific status in ci_umv_buf_t may indicate a failure.
\r
84 * UAL also passes the ioctl status to the vendor library so that
\r
85 * the appropriate action can be taken in the post call.
\r
87 * Use of ci_umv_buf_t and pre/post return values
\r
89 * 1. ci_umv_buf is provided by UAL as a unique buffer template for
\r
90 * a given verbs call. Vendor could keep any info relevant to
\r
91 * the specific verbs call in this buffer. This buffer is sufficient
\r
92 * for uniquely identifying which call it is intended for. For instance,
\r
93 * the umv buffer set up by vendor in a uvp_pre_create_qp() could later
\r
94 * tell the uvp_post_create_qp_t() which QP it is intended for.
\r
96 * 2. The success of pre/post-ioctl step to UAL means IB_SUCCESS.
\r
97 * Any value other than IB_SUCCESS is treated as failure.
\r
99 * 3. The Vendor could exchange a status in ci_umv_buf_t. However, this
\r
100 * interface does not enumerate the status in ci_umv_buf_t.
\r
101 * However, the vendor could check the status in ci_umv_buf_t
\r
102 * returned from the pre-ioctl step and act accordingly.
\r
105 * Intel Corporation
\r
109 * 1. For user mode verbs that require a kernel transition, handles passed
\r
110 * to kernel are validated in the user-mode proxy running in kernel.
\r
111 * Those Verbs that are entirely done in user mode that would affect
\r
112 * speed path do not perform consistency checks. So invalid pointers
\r
113 * would lead to application crash with core dumps.
\r
125 * Vendor-specific handles
\r
129 /****f* user-mode Verbs/unsupported functions
\r
131 * 1. Register physical memory region with HCA (ci_register_pmr)
\r
132 * 2. Modify physical memory region with HCA (ci_modify_pmr)
\r
133 * 3. Create Special QP (ci_create_spl_qp)
\r
135 * For all these functions, the vendor does NOT provide support
\r
136 * and UAL will return IB_UNSUPPORTED to the caller of Access Layer.
\r
143 /****f* user-mode Verbs/uvp_pre_open_ca_t
\r
145 * uvp_pre_open_ca_t -- Pre-ioctl operation for user-mode ib_open_ca()
\r
150 typedef ib_api_status_t
\r
151 (AL_API *uvp_pre_open_ca_t) (
\r
152 IN const ib_net64_t ca_guid,
\r
153 IN OUT ci_umv_buf_t *p_umv_buf );
\r
157 * uvp_pre_open_ca_t() is implemented by vendor. It is the pre-ioctl routine
\r
158 * for the AL call ib_open_ca() in user-mode.
\r
163 * [in] The HCA adapter's EUI64 identifier. Clients would use other
\r
164 * enumeration API's to locate all available adapters and their
\r
165 * guids in a system, e.g. GetCaGuids(), maintained by the IB
\r
169 * [in out] On input, UAL provides this buffer template.
\r
170 * On return from this function, p_umv_buf contains any vendor-specific
\r
171 * record to be exchanged with the vendor's HCA driver.
\r
175 * The pre-ioctl function succeeded.
\r
176 * IB_INSUFFICIENT_RESOURCES
\r
177 * Insufficient resources to satisfy request.
\r
178 * IB_INVALID_PARAMETER
\r
185 * uvp_post_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t, uvp_pre_modify_ca,
\r
186 * uvp_post_modify_ca_t, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
192 /****f* user-mode Verbs/uvp_post_open_ca_t
\r
194 * uvp_post_open_ca_t -- Post-ioctl operation for user-mode ib_open_ca()
\r
199 typedef ib_api_status_t
\r
200 (AL_API *uvp_post_open_ca_t) (
\r
201 IN const ib_net64_t ca_guid,
\r
202 IN ib_api_status_t ioctl_status,
\r
203 OUT ib_ca_handle_t *ph_uvp_ca,
\r
204 IN ci_umv_buf_t *p_umv_buf );
\r
207 * uvp_post_open_ca_t() is implemented by vendor. It is the post-ioctl routine
\r
208 * for the AL call ib_open_ca() in user-mode.
\r
212 * [in] The HCA adapter's EUI64 identifier.
\r
214 * [in] The ioctl status of the AL API.
\r
216 * [out] Pointer to vendor's handle to the newly opened instance of
\r
219 * [in] This contains any vendor-specific private information
\r
220 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_open_ca).
\r
221 * Vendor is expected to check vendor-specific status in
\r
222 * umv_buf as appropriate.
\r
226 * The HCA is return handle is valid.
\r
227 * IB_INSUFFICIENT_RESOURCES
\r
228 * Insufficient resources to satisfy request.
\r
234 * uvp_pre_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t, uvp_pre_modify_ca,
\r
235 * uvp_post_modify_ca_t, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
241 /****f* user-mode Verbs/uvp_pre_query_ca
\r
243 * uvp_pre_query_ca -- Pre-ioctl operation for user-mode ib_query_ca()
\r
247 typedef ib_api_status_t
\r
248 (AL_API *uvp_pre_query_ca) (
\r
249 IN ib_ca_handle_t h_uvp_ca,
\r
250 IN ib_ca_attr_t *p_ca_attr,
\r
251 IN size_t byte_count,
\r
252 IN ci_umv_buf_t *p_umv_buf );
\r
255 * uvp_pre_query_ca() is implemented by vendor. It is the pre-ioctl routine
\r
256 * for the AL call ib_query_ca() in user-mode.
\r
260 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
262 * [in] Pointer to the user's CA attribute buffer.
\r
264 * [in] User-supplied size of the CA attribute buffer.
\r
266 * [in out] On input, UAL provides this buffer template.
\r
267 * On return from this function, p_umv_buf contains any vendor-specific
\r
268 * record to be exchanged with the vendor's HCA driver.
\r
272 * The pre-ioctl function succeeded.
\r
273 * IB_INVALID_CA_HANDLE
\r
274 * CA handle is invalid
\r
275 * IB_INSUFFICIENT_RESOURCES
\r
276 * Insufficient resources to satisfy request.
\r
282 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_post_query_ca_t, uvp_pre_modify_ca,
\r
283 * uvp_post_modify_ca_t, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
289 /****f* user-mode Verbs/uvp_post_query_ca_t
\r
291 * uvp_post_query_ca_t -- Post-ioctl operation for user-mode ib_query_ca()
\r
297 (AL_API *uvp_post_query_ca_t) (
\r
298 IN ib_ca_handle_t h_uvp_ca,
\r
299 IN ib_api_status_t ioctl_status,
\r
300 IN ib_ca_attr_t *p_ca_attr,
\r
301 IN size_t byte_count,
\r
302 IN ci_umv_buf_t *p_umv_buf );
\r
305 * uvp_post_query_ca_t() is implemented by vendor. It is the post-ioctl routine
\r
306 * for the AL call ib_query_ca() in user-mode. UAL provides the results
\r
307 * of querying the CA attributes to the vendor's post-ioctl routine.
\r
311 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
313 * [in] The ioctl status of the AL API.
\r
315 * [in] CA attribute of this Host Channel adapter (as returned by
\r
316 * from ioctl to kernel AL).
\r
318 * [in] Number of bytes in ca_attr buffer.
\r
320 * [in ] This contains any vendor-specific private information
\r
321 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_query_ca).
\r
322 * Vendor is expected to check vendor-specific status in
\r
323 * umv_buf as appropriate.
\r
326 * This function does not return a value.
\r
332 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_pre_query_ca, uvp_pre_modify_ca,
\r
333 * uvp_post_modify_ca_t, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
339 /****f* user-mode Verbs/uvp_pre_modify_ca
\r
341 * uvp_pre_modify_ca -- Pre-ioctl operation for user-mode ib_modify_ca()
\r
346 typedef ib_api_status_t
\r
347 (AL_API *uvp_pre_modify_ca) (
\r
348 IN ib_ca_handle_t h_uvp_ca,
\r
349 IN uint8_t port_num,
\r
350 IN ib_ca_mod_t ca_mod,
\r
351 IN const ib_port_attr_mod_t* const p_port_attr_mod );
\r
355 * uvp_pre_modify_ca() is implemented by vendor. It is the pre-ioctl routine
\r
356 * for the AL call ib_modify_ca() in user-mode.
\r
360 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
362 * [in] An index to the port that is being modified. The port_num matches
\r
363 * the index of the port as returned through the ib_query_ca call.
\r
365 * [in] A mask of the attributes and counters to modify.
\r
367 * [in] A list of the specific port attribute information to modify. For
\r
368 * the access layer to modify an attribute, its corresponding bit must be
\r
369 * set in the ca_mod parameter.
\r
373 * The pre-ioctl function succeeded.
\r
374 * IB_INVALID_CA_HANDLE
\r
375 * CA handle is invalid.
\r
376 * IB_INVALID_PARAMETER
\r
377 * One or more parameters is invalid.
\r
383 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t,
\r
384 * uvp_post_modify_ca_t, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
390 /****f* user-mode Verbs/uvp_post_modify_ca_t
\r
392 * uvp_post_modify_ca_t -- Post-ioctl operation for user-mode ib_modify_ca()
\r
398 (AL_API *uvp_post_modify_ca_t) (
\r
399 IN ib_ca_handle_t h_uvp_ca,
\r
400 IN ib_api_status_t ioctl_status );
\r
404 * uvp_post_modify_ca_t() is implemented by vendor. It is the post-ioctl routine
\r
405 * for the AL call ib_modify_ca() in user-mode.
\r
409 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
411 * [in] The ioctl status of the AL API.
\r
414 * This function does not return a value.
\r
420 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t,
\r
421 * uvp_pre_modify_ca, uvp_pre_close_ca_t, uvp_post_close_ca_t
\r
427 /****f* user-mode Verbs/uvp_pre_close_ca_t
\r
429 * uvp_pre_close_ca_t -- Pre-ioctl operation for user-mode ib_close_ca().
\r
434 typedef ib_api_status_t
\r
435 (AL_API *uvp_pre_close_ca_t) (
\r
436 IN ib_ca_handle_t h_uvp_ca );
\r
440 * uvp_pre_close_ca_t() is implemented by vendor. It is the pre-ioctl routine
\r
441 * for the AL call ib_close_ca() in user-mode.
\r
445 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
449 * Successfully completed the pre-ioctl.
\r
455 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t,
\r
456 * uvp_pre_modify_ca, uvp_post_modify_ca_t, uvp_post_close_ca_t
\r
462 /****f* user-mode Verbs/uvp_post_close_ca_t
\r
464 * uvp_post_close_ca_t -- Post-ioctl operation for user-mode ib_close_ca().
\r
469 typedef ib_api_status_t
\r
470 (AL_API *uvp_post_close_ca_t) (
\r
471 IN ib_ca_handle_t h_uvp_ca,
\r
472 IN ib_api_status_t ioctl_status );
\r
476 * uvp_post_close_ca_t() is implemented by vendor. It is the post-ioctl routine
\r
477 * for the AL call ib_close_ca().
\r
478 * UAL calls this function in the context of the asynchronous callback
\r
479 * from AL notifying the successful destruction of CA.
\r
483 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
487 * The post-ioctl for ib_close_ca() successfully completed.
\r
493 * uvp_pre_open_ca_t, uvp_post_open_ca_t, uvp_pre_query_ca, uvp_post_query_ca_t,
\r
494 * uvp_pre_modify_ca, uvp_post_modify_ca_t, uvp_pre_close_ca_t
\r
500 /****f* user-mode Verbs/uvp_pre_ci_call
\r
502 * uvp_pre_ci_call -- Pre-ioctl function to ib_ci_call
\r
507 typedef ib_api_status_t
\r
508 (AL_API *uvp_pre_ci_call) (
\r
509 IN const ib_ca_handle_t h_uvp_ca,
\r
510 IN const void* __ptr64 * const handle_array OPTIONAL,
\r
511 IN uint32_t num_handles,
\r
512 IN ib_ci_op_t* const p_ci_op,
\r
513 IN OUT ci_umv_buf_t *p_umv_buf);
\r
516 * uvp_pre_ci_call() is implemented by vendor. It is the pre-ioctl
\r
517 * routine for ib_ci_call().
\r
521 * [in] Vendor's user-mode library handle to the CA
\r
523 * [in] An array of uvp handles. For valid types, refer to ib_ci.h or
\r
524 * ib_al.h. This is an optional parameter.
\r
526 * [in] The number of handles in the array.
\r
528 * [in] The operation that is requested by the client. For more info,
\r
531 * [in out] On input, UAL provides this buffer template.
\r
532 * On return from this function, p_umv_buf contains
\r
533 * any vendor-specific record to be exchanged with the vendor's
\r
538 * The pre-ioctl is successful.
\r
539 * IB_INSUFFICIENT_RESOURCES
\r
540 * Insufficient resources in Vendor library to complete the call
\r
552 /****f* user-mode Verbs/uvp_post_ci_call
\r
554 * uvp_post_ci_call -- Post-ioctl function to ib_ci_call
\r
560 (AL_API *uvp_post_ci_call) (
\r
561 IN const ib_ca_handle_t h_uvp_ca,
\r
562 IN ib_api_status_t ioctl_status,
\r
563 IN const void* __ptr64 * const handle_array OPTIONAL,
\r
564 IN uint32_t num_handles,
\r
565 IN ib_ci_op_t* const p_ci_op,
\r
566 IN OUT ci_umv_buf_t *p_umv_buf);
\r
569 * uvp_post_ci_call() is implemented by vendor. It is the pre-ioctl
\r
570 * routine for ib_ci_call().
\r
574 * [in] Vendor's user-mode library handle to the CA
\r
576 * [in] The ioctl status of the AL API.
\r
578 * [in] An array of uvp handles. For valid types, refer to ib_ci.h or
\r
579 * ib_al.h. This is an optional parameter.
\r
581 * [in] The number of handles in the array.
\r
583 * [in] The operation that is requested by the client. For more info,
\r
586 * [in out] On input, UAL provides this buffer template.
\r
587 * On return from this function, p_umv_buf contains
\r
588 * any vendor-specific record to be exchanged with the vendor's
\r
592 * This function does not return a value.
\r
605 /****f* user-mode Verbs/uvp_pre_allocate_pd
\r
607 * uvp_pre_allocate_pd -- Pre-ioctl function to allocate PD
\r
612 typedef ib_api_status_t
\r
613 (AL_API *uvp_pre_allocate_pd) (
\r
614 IN ib_ca_handle_t h_uvp_ca,
\r
615 IN OUT ci_umv_buf_t *p_umv_buf );
\r
619 * uvp_pre_allocate_pd() is implemented by vendor. It is the pre-ioctl routine
\r
620 * for the AL call ib_alloc_pd() in user-mode.
\r
624 * [in] Vendor's user-mode library handle to the open instance of the CA
\r
626 * [in out] On input, UAL provides this buffer template.
\r
627 * On return from this function, p_umv_buf contains
\r
628 * any vendor-specific record to be exchanged with the vendor's
\r
633 * The pre-ioctl call is successful.
\r
634 * IB_INVALID_CA_HANDLE
\r
635 * CA handle is invalid.
\r
636 * IB_INSUFFICIENT_RESOURCES
\r
637 * Insufficient resources in Vendor library to complete the call
\r
643 * uvp_post_allocate_pd_t, uvp_pre_deallocate_pd, uvp_post_deallocate_pd_t
\r
649 /****f* user-mode Verbs/uvp_post_allocate_pd_t
\r
651 * uvp_post_allocate_pd_t -- Post-ioctl function to allocate PD
\r
657 (AL_API *uvp_post_allocate_pd_t) (
\r
658 IN ib_ca_handle_t h_uvp_ca,
\r
659 IN ib_api_status_t ioctl_status,
\r
660 OUT ib_pd_handle_t *ph_uvp_pd,
\r
661 IN ci_umv_buf_t *p_umv_buf );
\r
665 * uvp_post_allocate_pd_t() is implemented by vendor. It is the post-ioctl
\r
666 * routine for the AL call ib_alloc_pd().
\r
670 * [in] Vendor's user-mode library CA handle.
\r
672 * [in] The ioctl status of the AL API.
\r
674 * [out] The vendor library handle to the newly created protection domain.
\r
676 * [in] This contains any vendor-specific private information
\r
677 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_allocate_pd).
\r
678 * Vendor is expected to check vendor-specific status in
\r
679 * umv_buf as appropriate.
\r
682 * This function does not return a value.
\r
688 * uvp_pre_allocate_pd, uvp_pre_deallocate_pd, uvp_post_deallocate_pd_t
\r
694 /****f* user-mode Verbs/uvp_pre_deallocate_pd
\r
696 * uvp_pre_deallocate_pd -- Pre-ioctl function to deallocate PD
\r
701 typedef ib_api_status_t
\r
702 (AL_API *uvp_pre_deallocate_pd) (
\r
703 IN const ib_pd_handle_t h_uvp_pd );
\r
707 * uvp_pre_deallocate_pd() is implemented by vendor. It is the pre-ioctl
\r
708 * routine for the AL call ib_deallocate_pd().
\r
712 * [in] Vendor's user-mode library PD handle.
\r
716 * The pre-ioctl call is successful.
\r
722 * uvp_pre_allocate_pd, uvp_post_allocate_pd_t, uvp_post_deallocate_pd_t
\r
728 /****f* user-mode Verbs/uvp_post_deallocate_pd_t
\r
730 * uvp_post_deallocate_pd_t -- Post-ioctl function to deallocate PD
\r
736 (AL_API *uvp_post_deallocate_pd_t) (
\r
737 IN const ib_pd_handle_t h_uvp_pd,
\r
738 IN ib_api_status_t ioctl_status );
\r
742 * uvp_post_deallocate_pd_t() is implemented by the vendor. It is the
\r
743 * post-ioctl routine for the AL call ib_dealloc_pd().
\r
745 * When all the resouces associated with a PD are destroyed,
\r
746 * UAL invokes this post-ioctl routine to deallocate PD. Since the
\r
747 * completion of the resource deallocation (e.g QP/CQ) is asynchronous,
\r
748 * this function is called from a UAL asynchronous callback
\r
749 * processing thread.
\r
753 * [in] Vendor's user-mode library PD handle.
\r
756 * This function does not return a value.
\r
762 * uvp_pre_allocate_pd, uvp_post_allocate_pd_t, uvp_pre_deallocate_pd
\r
768 /****f* user-mode Verbs/uvp_pre_create_av
\r
770 * uvp_pre_create_av -- Pre-ioctl function to create AV
\r
775 typedef ib_api_status_t
\r
776 (AL_API *uvp_pre_create_av) (
\r
777 IN const ib_pd_handle_t h_uvp_pd,
\r
778 IN const ib_av_attr_t *p_addr_vector,
\r
779 IN OUT ci_umv_buf_t *p_umv_buf);
\r
782 * uvp_pre_create_av() is implemented by vendor. It is the pre-ioctl
\r
783 * routine for ib_create_av().
\r
787 * [in] Vendor's user-mode library handle to the Protection domain
\r
788 * to which this AV is associated.
\r
790 * [in] Parameters to create the address vector.
\r
792 * [in out] On input, UAL provides this buffer template.
\r
793 * On return from this function, p_umv_buf contains
\r
794 * any vendor-specific record to be exchanged with the vendor's
\r
799 * The pre-ioctl is successful.
\r
800 * IB_INVALID_SETTING
\r
801 * Values in the vector is not valid
\r
802 * IB_INVALID_PD_HANDLE
\r
803 * The PD handle is invalid.
\r
804 * IB_INSUFFICIENT_RESOURCES
\r
805 * Insufficient resources in Vendor library to complete the call
\r
811 * uvp_post_create_av_t, uvp_pre_query_av, uvp_post_query_av_t, uvp_pre_modify_av,
\r
812 * uvp_post_modify_av_t, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
818 /****f* user-mode Verbs/uvp_post_create_av_t
\r
820 * uvp_post_create_av_t -- Post-ioctl function to create AV
\r
826 (AL_API *uvp_post_create_av_t) (
\r
827 IN const ib_pd_handle_t h_uvp_pd,
\r
828 IN ib_api_status_t ioctl_status,
\r
829 OUT ib_av_handle_t *ph_uvp_av,
\r
830 IN ci_umv_buf_t *p_umv_buf );
\r
833 * uvp_post_create_av_t() is implemented by vendor. It is the post-ioctl routine
\r
834 * for ib_create_av().
\r
838 * [in] Vendor's user-mode library handle to the Protection domain
\r
839 * to which this AV is associated
\r
841 * [in] The ioctl status of the AL API.
\r
843 * [out] Vendor's address vector handle.
\r
845 * [in] On input, it contains any vendor-specific private information
\r
846 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_create_av).
\r
847 * Vendor is expected to check vendor-specific status in
\r
848 * umv_buf as appropriate.
\r
851 * This function does not return a value.
\r
857 * uvp_pre_create_av, uvp_pre_query_av, uvp_post_query_av_t, uvp_pre_modify_av,
\r
858 * uvp_post_modify_av_t, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
864 /****f* user-mode Verbs/uvp_pre_query_av
\r
866 * uvp_pre_query_av -- Pre-ioctl operation for ib_query_ca()
\r
871 typedef ib_api_status_t
\r
872 (AL_API *uvp_pre_query_av) (
\r
873 IN const ib_av_handle_t h_uvp_av,
\r
874 IN OUT ci_umv_buf_t *p_umv_buf );
\r
878 * uvp_pre_query_av() is implemented by vendor. It is the pre-ioctl routine
\r
879 * for the AL call ib_query_av() in user-mode.
\r
883 * [in] Vendor's handle to the address vector in user-mode library
\r
885 * [in out] On input, UAL provides this buffer template.
\r
886 * On return from this function, p_umv_buf contains
\r
887 * any vendor-specific record to be exchanged with the vendor's
\r
892 * The pre-ioctl function succeeded.
\r
893 * IB_INVALID_AV_HANDLE
\r
894 * AV handle was invalid
\r
895 * IB_INSUFFICIENT_RESOURCES
\r
896 * Insufficient resources in Vendor library to complete the call.
\r
902 * uvp_pre_create_av, uvp_post_create_av_t, uvp_post_query_av_t, uvp_pre_modify_av,
\r
903 * uvp_post_modify_av_t, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
908 /****f* user-mode Verbs/uvp_post_query_av_t
\r
911 * Vendor-specific post-ioctl operation for user-mode ib_query_ca()
\r
916 (AL_API *uvp_post_query_av_t) (
\r
917 IN const ib_av_handle_t h_uvp_av,
\r
918 IN ib_api_status_t ioctl_status,
\r
919 IN OUT ib_av_attr_t *p_addr_vector,
\r
920 IN OUT ib_pd_handle_t *ph_pd,
\r
921 IN ci_umv_buf_t *p_umv_buf );
\r
925 * uvp_post_query_av_t() is implemented by vendor. It is the post-ioctl routine
\r
926 * for the AL call ib_query_av() in user-mode.
\r
927 * UAL provides the results of the query to the vendor library in this
\r
928 * post-ioctl routine.
\r
932 * [in] Vendor's handle to the address vector in user-mode library
\r
934 * [in] The ioctl status of the AL API.
\r
936 * [in out] AV attribute (as returned by the ioctl).
\r
938 * [out] The vendor library PD handle associated with this AV.
\r
941 * On input, it contains any vendor-specific private information
\r
942 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_query_av).
\r
943 * Vendor is expected to check vendor-specific status in
\r
944 * umv_buf as appropriate.
\r
947 * This function does not return a value.
\r
953 * uvp_pre_create_av, uvp_post_create_av_t, uvp_pre_query_av, uvp_pre_modify_av,
\r
954 * uvp_post_modify_av_t, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
960 /****f* user-mode Verbs/uvp_pre_modify_av
\r
962 * uvp_pre_modify_av -- Pre-ioctl function to modify AV
\r
966 typedef ib_api_status_t
\r
967 (AL_API *uvp_pre_modify_av) (
\r
968 IN const ib_av_handle_t h_uvp_av,
\r
969 IN const ib_av_attr_t *p_addr_vector,
\r
970 IN OUT ci_umv_buf_t *p_umv_buf );
\r
973 * uvp_pre_modify_av() is implemented by vendor. It is the pre-ioctl routine
\r
974 * for ib_modify_av().
\r
978 * [in] Vendor's AV handle in user-mode library.
\r
980 * [in] Parameters to modify the address vector handle
\r
982 * [in out] On input, UAL provides this buffer template.
\r
983 * On return from this function, p_umv_buf contains
\r
984 * any vendor-specific record to be exchanged with the vendor's
\r
989 * The pre-ioctl is successful.
\r
990 * IB_INVALID_SETTING
\r
991 * Values in the vector is not valid.
\r
992 * IB_INVALID_AV_HANDLE
\r
993 * The AV handle is invalid.
\r
994 * IB_INSUFFICIENT_RESOURCES
\r
995 * Insufficient resources in Vendor library to complete the call.
\r
1001 * uvp_pre_create_av, uvp_post_create_av_t, uvp_pre_query_av, uvp_post_query_av_t,
\r
1002 * uvp_post_modify_av_t, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
1008 /****f* user-mode Verbs/uvp_post_modify_av_t
\r
1010 * uvp_post_modify_av_t -- Post-ioctl function to modify AV
\r
1015 (AL_API *uvp_post_modify_av_t) (
\r
1016 IN const ib_av_handle_t h_uvp_av,
\r
1017 IN ib_api_status_t ioctl_status,
\r
1018 IN ci_umv_buf_t *p_umv_buf );
\r
1022 * uvp_post_modify_av_t() is implemented by vendor to modify the attributes
\r
1023 * of AV. It is the post-ioctl routine for ib_modify_av().
\r
1027 * [in] Vendor's av handle in user-mode library.
\r
1029 * [in] The ioctl status of the AL API.
\r
1031 * [in out] On input, it contains any vendor-specific private information
\r
1032 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_modify_av).
\r
1033 * Vendor is expected to check vendor-specific status in
\r
1034 * umv_buf as appropriate.
\r
1037 * This function does not return a value.
\r
1043 * uvp_pre_create_av, uvp_post_create_av_t, uvp_pre_query_av, uvp_post_query_av_t,
\r
1044 * uvp_pre_modify_av, uvp_pre_destroy_av, uvp_post_destroy_av_t
\r
1050 /****f* user-mode Verbs/uvp_pre_destroy_av
\r
1052 * uvp_pre_destroy_av -- Pre-ioctl function to destroy AV
\r
1057 typedef ib_api_status_t
\r
1058 (AL_API *uvp_pre_destroy_av) (
\r
1059 IN const ib_av_handle_t h_uvp_av );
\r
1063 * uvp_pre_destroy_av() is implemented by vendor to destroy the AV.
\r
1064 * It is the pre-ioctl routine for ib_destroy_av().
\r
1068 * [in] Vendor's AV handle in user-mode library.
\r
1072 * The pre-ioctl is successful.
\r
1078 * uvp_pre_create_av, uvp_post_create_av_t, uvp_pre_query_av, uvp_post_query_av_t,
\r
1079 * uvp_pre_modify_av, uvp_post_modify_av_t, uvp_post_destroy_av_t
\r
1085 /****f* user-mode Verbs/uvp_post_destroy_av_t
\r
1087 * uvp_post_destroy_av_t -- Post-ioctl function to destroy AV
\r
1093 (AL_API *uvp_post_destroy_av_t) (
\r
1094 IN const ib_av_handle_t h_uvp_av,
\r
1095 IN ib_api_status_t ioctl_status );
\r
1099 * uvp_post_destroy_av_t() is implemented by vendor. It is the post-ioctl
\r
1100 * routine for ib_destroy_av().
\r
1104 * [in] Vendor's AV handle in user-mode library.
\r
1107 * On input, it contains any vendor-specific private information
\r
1108 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_destroy_av).
\r
1109 * Vendor is expected to check vendor-specific status in
\r
1110 * umv_buf as appropriate.
\r
1113 * This function does not return a value.
\r
1119 * uvp_pre_create_av, uvp_post_create_av_t, uvp_pre_query_av, uvp_post_query_av_t,
\r
1120 * uvp_pre_modify_av, uvp_post_modify_av_t, uvp_pre_destroy_av
\r
1126 /****f* user-mode Verbs/uvp_pre_create_qp
\r
1128 * uvp_pre_create_qp -- Pre-ioctl function to Create a Queue Pair.
\r
1133 typedef ib_api_status_t
\r
1134 (AL_API *uvp_pre_create_qp) (
\r
1135 IN const ib_pd_handle_t h_uvp_pd,
\r
1136 IN const ib_qp_create_t *p_create_attr,
\r
1137 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1141 * uvp_pre_create_qp() is implemented by vendor. It is the pre-ioctl routine
\r
1142 * for ib_create_qp().
\r
1146 * [in] Vendor's Protection domain handle in user-mode library.
\r
1148 * [in] Initial attributes with which the qp must be created.
\r
1150 * [in out] On input, UAL provides this buffer template.
\r
1151 * On return from this function, p_umv_buf contains
\r
1152 * any vendor-specific record to be exchanged with the vendor's
\r
1157 * The pre-ioctl call is successful.
\r
1158 * IB_INVALID_PD_HANDLE
\r
1159 * The PD handle is invalid.
\r
1160 * IB_INVALID_CQ_HANDLE
\r
1161 * The send or receive completion queue to associate with the queue pair
\r
1164 * The specified queue pair type was not supported by the channel adapter.
\r
1165 * IB_INVALID_MAX_WRS
\r
1166 * The requested maximum send or receive work request depth could not be
\r
1168 * IB_INVALID_MAX_SGE
\r
1169 * The requested maximum number of scatter-gather entries for the send or
\r
1170 * receive queue could not be supported.
\r
1171 * IB_INSUFFICIENT_RESOURCES
\r
1172 * Insufficient resources in Vendor library to complete the call.
\r
1173 * IB_INVALID_PARAMETER
\r
1174 * At least one parameter is invalid.
\r
1180 * uvp_post_create_qp_t, uvp_pre_query_qp, uvp_post_query_qp_t, uvp_pre_modify_qp,
\r
1181 * uvp_post_modify_qp_t, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1187 /****f* user-mode Verbs/uvp_post_create_qp_t
\r
1189 * uvp_post_create_qp_t -- Post-ioctl function to Create a Queue Pair.
\r
1195 (AL_API *uvp_post_create_qp_t) (
\r
1196 IN const ib_pd_handle_t h_uvp_pd,
\r
1197 IN ib_api_status_t ioctl_status,
\r
1198 OUT ib_qp_handle_t *ph_uvp_qp,
\r
1199 IN ci_umv_buf_t *p_umv_buf );
\r
1203 * uvp_post_create_qp_t() is implemented by vendor. It is the post-ioctl routine
\r
1204 * for ib_create_qp().
\r
1208 * [in] Vendor's Protection domain handle in user-mode library.
\r
1210 * [in] The ioctl status of the AL API.
\r
1212 * [out] Vendor's QP handle for the newly created QP (in user-mode
\r
1215 * [in out] On input, it contains any vendor-specific private information
\r
1216 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_create_qp).
\r
1217 * Vendor is expected to check vendor-specific status in
\r
1218 * umv_buf as appropriate.
\r
1221 * This function does not return a value.
\r
1227 * uvp_pre_create_qp, uvp_pre_query_qp, uvp_post_query_qp_t, uvp_pre_modify_qp,
\r
1228 * uvp_post_modify_qp_t, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1234 /****f* user-mode Verbs/uvp_pre_modify_qp
\r
1236 * uvp_pre_modify_qp -- Pre-ioctl function to Modify attributes of the
\r
1243 typedef ib_api_status_t
\r
1244 (AL_API *uvp_pre_modify_qp) (
\r
1245 IN const ib_qp_handle_t h_uvp_qp,
\r
1246 IN const ib_qp_mod_t *p_modify_attr,
\r
1247 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1251 * uvp_pre_modify_qp() is implemented by vendor to modify the attributes of a
\r
1252 * QP. It is the pre-ioctl routine for ib_modify_qp().
\r
1256 * [in] Vendor's qp Handle to the queue pair (in user-mode library)
\r
1257 * whose state is to be modified.
\r
1259 * [in] Specifies what attributes need to be modified in the qp.
\r
1261 * [in out] On input, UAL provides this buffer template.
\r
1262 * On return from this function, p_umv_buf contains
\r
1263 * any vendor-specific record to be exchanged with the vendor's
\r
1268 * The pre-ioctl call is successful.
\r
1269 * IB_INSUFFICIENT_RESOURCES
\r
1270 * Insufficient resources to complete the requested operation.
\r
1271 * IB_INVALID_QP_HANDLE
\r
1272 * Invalid QP handle.
\r
1274 * Requested operation is not supported, for e.g. Atomic operations.
\r
1275 * IB_QP_INVALID_STATE
\r
1276 * Invalid state transition request. Current QP state not in allowable
\r
1279 * Pkey specified in modify request not valid entry in P_KEY table. Or
\r
1280 * index is out of range.
\r
1281 * IB_INVALID_PMIG_STATE
\r
1282 * Invalid path migration state specified in the request.
\r
1288 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_query_qp, uvp_post_query_qp_t,
\r
1289 * uvp_post_modify_qp_t, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1295 /****f* user-mode Verbs/uvp_post_modify_qp_t
\r
1297 * uvp_post_modify_qp_t -- Post-ioctl function to Modify attributes of
\r
1298 * the specified QP.
\r
1304 (AL_API *uvp_post_modify_qp_t) (
\r
1305 IN const ib_qp_handle_t h_uvp_qp,
\r
1306 IN ib_api_status_t ioctl_status,
\r
1307 IN ci_umv_buf_t *p_umv_buf );
\r
1311 * uvp_post_modify_qp_t() is implemented by vendor to modify the qp attributes.
\r
1312 * It is the post-ioctl routine for ib_modify_qp().
\r
1316 * [in] Vendor's qp Handle to the queue pair (in user-mode library)
\r
1317 * whose state is modified.
\r
1319 * [in] The ioctl status of the AL API.
\r
1321 * [in out] On input, it contains any vendor-specific private information
\r
1322 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_modify_qp).
\r
1323 * Vendor is expected to check vendor-specific status in
\r
1324 * umv_buf as appropriate.
\r
1327 * This function does not return a value.
\r
1333 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_query_qp, uvp_post_query_qp_t,
\r
1334 * uvp_pre_modify_qp, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1340 /****f* user-mode Verbs/uvp_pre_query_qp
\r
1342 * uvp_pre_query_qp -- Pre-ioctl function to Query the attributes of the QP
\r
1347 typedef ib_api_status_t
\r
1348 (AL_API *uvp_pre_query_qp) (
\r
1349 IN ib_qp_handle_t h_uvp_qp,
\r
1350 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1354 * uvp_pre_query_qp() is implemented by vendor. It is the pre-ioctl routine
\r
1355 * for the AL call ib_query_qp().
\r
1359 * [in] Vendor's handle to the QP (in user-mode library).
\r
1361 * [in out] On input, UAL provides this buffer template.
\r
1362 * On return from this function, p_umv_buf contains
\r
1363 * any vendor-specific record to be exchanged with the vendor's
\r
1367 * The pre-ioctl function succeeded.
\r
1368 * IB_INVALID_QP_HANDLE
\r
1369 * QP handle is invalid
\r
1370 * IB_INSUFFICIENT_RESOURCES
\r
1371 * Insufficient resources in Vendor library to complete the call.
\r
1377 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_post_query_qp_t, uvp_pre_modify_qp,
\r
1378 * uvp_post_modify_qp_t, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1384 /****f* user-mode Verbs/uvp_post_query_qp_t
\r
1386 * uvp_post_query_qp_t -- Post-ioctl operation for user-mode ib_query_qp()
\r
1392 (AL_API *uvp_post_query_qp_t) (
\r
1393 IN ib_qp_handle_t h_uvp_qp,
\r
1394 IN ib_api_status_t ioctl_status,
\r
1395 IN ib_qp_attr_t *p_query_attr,
\r
1396 IN ci_umv_buf_t *p_umv_buf );
\r
1400 * uvp_post_query_qp_t() is implemented by vendor. It is the post-ioctl routine
\r
1401 * for ib_query_qp().
\r
1402 * UAL provides the results of the query to the vendor library in this
\r
1403 * post-ioctl routine.
\r
1407 * [in] Vendor's handle to the QP (in user-mode library).
\r
1409 * [in] The ioctl status of the AL API.
\r
1411 * [in] QP attribute as returned by the ioctl.
\r
1413 * [in out] On input, it contains any vendor-specific private information
\r
1414 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_query_qp).
\r
1415 * Vendor is expected to check vendor-specific status in
\r
1416 * umv_buf as appropriate.
\r
1419 * This function does not return a value.
\r
1425 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_query_qp, uvp_pre_modify_qp,
\r
1426 * uvp_post_modify_qp_t, uvp_pre_destroy_qp, uvp_post_destroy_qp_t
\r
1432 /****f* user-mode Verbs/uvp_pre_destroy_qp
\r
1434 * uvp_pre_destroy_qp -- Pre-ioctl function to Destroy a Queue Pair.
\r
1438 typedef ib_api_status_t
\r
1439 (AL_API *uvp_pre_destroy_qp) (
\r
1440 IN const ib_qp_handle_t h_uvp_qp );
\r
1444 * uvp_pre_destroy_qp() is the pre-ioctl routine implemented by vendor
\r
1446 * UAL invokes this pre-ioctl routine to destroy QP.
\r
1447 * The vendor is expected to perform any preliminary steps in preparation
\r
1448 * for destroying the QP and perform any book-keeping.
\r
1452 * [in] Vendor's Handle to the qp (in user-mode library)
\r
1453 * that needs to be destroyed.
\r
1455 * [in out] On input, UAL provides this buffer template.
\r
1456 * On return from this function, p_umv_buf contains
\r
1457 * any vendor-specific record to be exchanged with the vendor's
\r
1462 * The pre-ioctl call is successful.
\r
1468 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_query_qp, uvp_post_query_qp_t,
\r
1469 * uvp_pre_modify_qp, uvp_post_modify_qp_t, uvp_post_destroy_qp_t
\r
1476 /****f* user-mode Verbs/uvp_post_destroy_qp_t
\r
1478 * uvp_post_destroy_qp_t -- Post-ioctl function to Destroy a Queue Pair.
\r
1484 (AL_API *uvp_post_destroy_qp_t) (
\r
1485 IN const ib_qp_handle_t h_uvp_qp,
\r
1486 IN ib_api_status_t ioctl_status );
\r
1490 * uvp_post_destroy_qp_t() is implemented by vendor. It is the post-ioctl
\r
1491 * routine for ib_destroy_qp().
\r
1492 * UAL invokes this post-ioctl routine to destroy QP when it receives
\r
1493 * asynchronous notification from the user-mode proxy in kernel.
\r
1497 * [in] Vendor's Handle to the qp (in user-mode library)
\r
1498 * that needs to be destroyed.
\r
1502 * The post-ioctl call is successful.
\r
1508 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_query_qp, uvp_post_query_qp_t,
\r
1509 * uvp_pre_modify_qp, uvp_post_modify_qp_t, uvp_pre_destroy_qp
\r
1515 /****f* user-mode Verbs/uvp_pre_create_cq
\r
1517 * uvp_pre_create_cq -- Pre-ioctl function to Create a completion queue (CQ)
\r
1522 typedef ib_api_status_t
\r
1523 (AL_API *uvp_pre_create_cq) (
\r
1524 IN const ib_ca_handle_t h_uvp_ca,
\r
1525 IN OUT uint32_t* const p_size,
\r
1526 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1529 * uvp_pre_create_cq() is implemented by vendor. It is the pre-ioctl routine
\r
1530 * for ib_create_cq().
\r
1534 * [in] Vendor's handle to an existing protection domain (in user-mode
\r
1537 * [in out] Points to a variable containing the number of CQ entries
\r
1538 * requested by the consumer.
\r
1539 * On return, points to the size of the CQ that was created
\r
1540 * by the provider.
\r
1542 * [in out] On input, UAL provides this buffer template.
\r
1543 * On return from this function, p_umv_buf contains
\r
1544 * any vendor-specific record to be exchanged with the vendor's
\r
1549 * The operation was successful.
\r
1550 * IB_INVALID_PD_HANDLE
\r
1551 * The h_uvp_pd passed is invalid.
\r
1552 * IB_INSUFFICIENT_RESOURCES
\r
1553 * Insufficient resources to complete request.
\r
1554 * IB_INVALID_CQ_SIZE
\r
1555 * Requested CQ Size is not supported.
\r
1561 * uvp_post_create_cq_t, uvp_pre_resize_cq, uvp_post_resize_cq_t,
\r
1562 * uvp_pre_query_cq, uvp_post_query_cq_t, uvp_pre_destroy_cq,
\r
1563 * uvp_post_destroy_cq_t
\r
1569 /****f* user-mode Verbs/uvp_post_create_cq_t
\r
1571 * uvp_post_create_cq_t -- Post-ioctl function to Create a completion queue (CQ)
\r
1577 (AL_API *uvp_post_create_cq_t) (
\r
1578 IN const ib_ca_handle_t h_uvp_ca,
\r
1579 IN ib_api_status_t ioctl_status,
\r
1580 IN const uint32_t size,
\r
1581 OUT ib_cq_handle_t *ph_uvp_cq,
\r
1582 IN ci_umv_buf_t *p_umv_buf );
\r
1586 * uvp_post_create_cq_t() is implemented by vendor to create CQ.
\r
1587 * It is the post-ioctl routine for ib_create_cq().
\r
1591 * [in] Vendor's handle to an existing protection domain (in user-mode
\r
1594 * [in] The ioctl status of the AL API.
\r
1596 * [in] size of the CQ that was created by the provider.
\r
1597 * If VPD created the CQ in kernel, this is the value as set by
\r
1598 * VPD. If UVP creates the CQ in user-mode, then uvp already knows
\r
1599 * the size of the CQ in the pre-ioctl.
\r
1601 * [out] Vendor's Handle to the newly created CQ (in user-mode library).
\r
1603 * [in out] On input, it contains any vendor-specific private information
\r
1604 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_create_cq).
\r
1605 * Vendor is expected to check vendor-specific status in
\r
1606 * umv_buf as appropriate.
\r
1609 * This function does not return a value.
\r
1615 * uvp_pre_create_cq, uvp_pre_resize_cq, uvp_post_resize_cq_t,
\r
1616 * uvp_pre_query_cq, uvp_post_query_cq_t, uvp_pre_destroy_cq,
\r
1617 * uvp_post_destroy_cq_t
\r
1623 /****f* user-mode Verbs/uvp_pre_resize_cq
\r
1625 * uvp_pre_resize_cq -- Pre-ioctl function to resize a CQ.
\r
1630 typedef ib_api_status_t
\r
1631 (AL_API *uvp_pre_resize_cq) (
\r
1632 IN const ib_cq_handle_t h_uvp_cq,
\r
1633 IN OUT uint32_t* const p_size,
\r
1634 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1638 * uvp_pre_resize_cq() is implemented by vendor to resize the CQ.
\r
1639 * It is the pre-ioctl routine for ib_resize_cq().
\r
1643 * [in] Vendor's Handle to the already created CQ (in user-mode library).
\r
1645 * [in out] On input, points to a variable containing the number
\r
1646 * of CQ entries requested by the consumer.
\r
1647 * On completion points to the size of the CQ that was resized by
\r
1650 * [in out] On input, UAL provides this buffer template.
\r
1651 * On return from this function, p_umv_buf contains
\r
1652 * any vendor-specific record to be exchanged with the vendor's
\r
1657 * The operation was successful.
\r
1658 * IB_INVALID_CQ_HANDLE
\r
1659 * The CQ handle is invalid.
\r
1660 * IB_INSUFFICIENT_RESOURCES
\r
1661 * Insufficient resources to complete request.
\r
1662 * IB_INVALID_CQ_SIZE
\r
1663 * Requested CQ Size is not supported.
\r
1665 * The CQ has more entries than the resize request. The CQ is not
\r
1666 * modified, and old entries still exist.
\r
1672 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_post_resize_cq_t,
\r
1673 * uvp_pre_query_cq, uvp_post_query_cq_t, uvp_pre_destroy_cq,
\r
1674 * uvp_post_destroy_cq_t
\r
1680 /****f* user-mode Verbs/uvp_post_resize_cq_t
\r
1682 * uvp_post_resize_cq_t -- Post-ioctl function to resize a CQ.
\r
1688 (AL_API *uvp_post_resize_cq_t) (
\r
1689 IN const ib_cq_handle_t h_uvp_cq,
\r
1690 IN ib_api_status_t ioctl_status,
\r
1691 IN const uint32_t size,
\r
1692 IN ci_umv_buf_t *p_umv_buf );
\r
1696 * uvp_post_resize_cq_t() is implemented by vendor to resize the CQ.
\r
1697 * It is the post-ioctl routine for ib_resize_cq().
\r
1701 * [in] Vendor's Handle to the already created CQ (in user-mode library).
\r
1703 * [in] The ioctl status of the AL API.
\r
1705 * [in] size of the CQ that was created by the provider.
\r
1706 * If VPD resized the CQ in kernel, this is the value as set by
\r
1707 * VPD. If UVP resizes the CQ in user-mode, then uvp already knows
\r
1708 * the size of the CQ in the pre-ioctl.
\r
1710 * [in out] On input, it contains any vendor-specific private information
\r
1711 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_resize_cq).
\r
1712 * Vendor is expected to check vendor-specific status in
\r
1713 * umv_buf as appropriate.
\r
1716 * This function does not return a value.
\r
1722 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_pre_resize_cq,
\r
1723 * uvp_pre_query_cq, uvp_post_query_cq_t, uvp_pre_destroy_cq,
\r
1724 * uvp_post_destroy_cq_t
\r
1730 /****f* user-mode Verbs/uvp_pre_query_cq
\r
1732 * uvp_pre_query_cq -- Pre-ioctl to Query the number of entries
\r
1733 * configured for the CQ.
\r
1738 typedef ib_api_status_t
\r
1739 (AL_API *uvp_pre_query_cq) (
\r
1740 IN const ib_cq_handle_t h_uvp_cq,
\r
1741 IN OUT uint32_t* const p_size,
\r
1742 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1746 * uvp_pre_query_cq() is implemented by vendor. It is the pre-ioctl routine
\r
1747 * for ib_query_cq().
\r
1748 * Can we always go to the kernel to query even if it is created
\r
1749 * in vendor library in user-mode?
\r
1753 * [in] Vendor's Handle to the already created CQ (in user-mode library).
\r
1756 * [out] Size of the CQ if processing ends in user-mode.
\r
1759 * [in out] On input, UAL provides this buffer template.
\r
1760 * On return from this function, p_umv_buf contains
\r
1761 * any vendor-specific record to be exchanged with the vendor's
\r
1766 * The operation was successful.
\r
1767 * IB_INVALID_CQ_HANDLE
\r
1768 * The CQ handle is invalid.
\r
1769 * IB_INSUFFICIENT_RESOURCES
\r
1770 * Insufficient resources in Vendor library to complete the call.
\r
1771 * IB_VERBS_PROCESSING_DONE
\r
1772 * The UVP fully processed the request. The post_query_cq handler
\r
1773 * will not be invoked.
\r
1778 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_pre_resize_cq,
\r
1779 * uvp_post_resize_cq_t, uvp_post_query_cq_t, uvp_pre_destroy_cq,
\r
1780 * uvp_post_destroy_cq_t
\r
1786 /****f* user-mode Verbs/uvp_post_query_cq_t
\r
1788 * uvp_post_query_cq_t -- Post-ioctl to Query the number of entries
\r
1789 * configured for the CQ.
\r
1795 (AL_API *uvp_post_query_cq_t) (
\r
1796 IN const ib_cq_handle_t h_uvp_cq,
\r
1797 IN ib_api_status_t ioctl_status,
\r
1798 IN const uint32_t size,
\r
1799 IN ci_umv_buf_t *p_umv_buf );
\r
1803 * uvp_post_query_cq_t() is implemented by vendor to query CQ.
\r
1804 * It is the post-ioctl routine for ib_query_cq().
\r
1808 * [in] Vendor's Handle to the already created CQ (in user-mode library).
\r
1810 * [in] The ioctl status of the AL API.
\r
1812 * [in] The size of the CQ retuned by the IOCTL.
\r
1814 * [in out] On input, it contains any vendor-specific private information
\r
1815 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_query_cq).
\r
1816 * Vendor is expected to check vendor-specific status in
\r
1817 * umv_buf as appropriate.
\r
1820 * This function does not return a value.
\r
1826 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_pre_resize_cq,
\r
1827 * uvp_post_resize_cq_t, uvp_pre_query_cq, uvp_pre_destroy_cq,
\r
1828 * uvp_post_destroy_cq_t
\r
1834 /****f* user-mode Verbs/uvp_pre_destroy_cq
\r
1836 * uvp_pre_destroy_cq -- Pre-ioctl function to Destroy a CQ.
\r
1841 typedef ib_api_status_t
\r
1842 (AL_API *uvp_pre_destroy_cq) (
\r
1843 IN const ib_cq_handle_t h_uvp_cq );
\r
1847 * uvp_pre_destroy_cq() is implemented by vendor to destroy CQ.
\r
1848 * It is the pre-ioctl routine for ib_destroy_cq().
\r
1852 * [in] Vendor's Handle to the cq (in user-mode library)
\r
1853 * that needs to be destroyed.
\r
1857 * The pre-ioctl call is successful.
\r
1863 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_pre_resize_cq,
\r
1864 * uvp_post_resize_cq_t, uvp_pre_query_cq, uvp_post_query_cq_t,
\r
1865 * uvp_post_destroy_cq_t
\r
1871 /****f* user-mode Verbs/uvp_post_destroy_cq_t
\r
1873 * uvp_post_destroy_cq_t -- Post-ioctl function to Destroy a CQ.
\r
1879 (AL_API *uvp_post_destroy_cq_t) (
\r
1880 IN const ib_cq_handle_t h_uvp_cq,
\r
1881 IN ib_api_status_t ioctl_status );
\r
1885 * uvp_post_destroy_cq_t() is implemented by vendor to destroy CQ.
\r
1886 * It is the post-ioctl routine for ib_destroy_cq().
\r
1887 * UAL invokes this post-ioctl routine to destroy CQ when it receives
\r
1888 * asynchronous notification from the user-mode proxy.
\r
1892 * [in] Vendor's Handle to the cq (in user-mode library)
\r
1893 * that needs to be destroyed.
\r
1895 * This function does not return a value.
\r
1901 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_pre_resize_cq,
\r
1902 * uvp_post_resize_cq_t, uvp_pre_query_cq, uvp_post_query_cq_t,
\r
1903 * uvp_pre_destroy_cq
\r
1909 /****f* user-mode Verbs/uvp_pre_create_mw
\r
1911 * uvp_pre_create_mw -- Pre-ioctl function to create a memory window
\r
1916 typedef ib_api_status_t
\r
1917 (AL_API *uvp_pre_create_mw) (
\r
1918 IN const ib_pd_handle_t h_uvp_pd,
\r
1919 IN OUT ci_umv_buf_t *p_umv_buf );
\r
1922 * uvp_pre_create_mw() is implemented by vendor. It is the pre-ioctl routine
\r
1923 * for ib_create_mw().
\r
1927 * [in] Vendor's Protection domain handle (in user-mode library)
\r
1928 * to use for this memory window
\r
1930 * [in out] On input, UAL provides this buffer template.
\r
1931 * On return from this function, p_umv_buf contains
\r
1932 * any vendor-specific record to be exchanged with the vendor's
\r
1937 * The memory window allocation completed successfully.
\r
1938 * IB_INSUFFICIENT_RESOURCES
\r
1939 * Not enough resources to complete the request.
\r
1940 * IB_INVALID_PD_HANDLE
\r
1941 * pd_handle supplied is invalid.
\r
1947 * uvp_post_create_mw_t, uvp_pre_query_mw, uvp_post_query_mw_t,
\r
1948 * uvp_bind_mw, uvp_pre_destroy_mw, uvp_post_destroy_mw_t
\r
1956 /****f* user-mode Verbs/uvp_post_create_mw_t
\r
1958 * uvp_post_create_mw_t -- Post-ioctl function to create a memory window
\r
1964 (AL_API *uvp_post_create_mw_t) (
\r
1965 IN const ib_pd_handle_t h_uvp_pd,
\r
1966 IN ib_api_status_t ioctl_status,
\r
1968 OUT ib_mw_handle_t *ph_uvp_mw,
\r
1969 IN ci_umv_buf_t *p_umv_buf );
\r
1972 * uvp_post_create_mw_t() is implemented by vendor. It is the post-ioctl routine
\r
1973 * for ib_create_mw().
\r
1977 * [in] Vendor's Protection domain handle (in user-mode library)
\r
1978 * to use for this memory window
\r
1980 * [in] The ioctl status of the AL API.
\r
1982 * [in] Remote access key that can be exchanged with a remote node to
\r
1983 * perform RDMA transactions on this memory window.
\r
1985 * [out] Vendor's Handle (in user-mode library) to the newly created
\r
1988 * [in out] On input, it contains any vendor-specific private information
\r
1989 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_create_mw).
\r
1990 * Vendor is expected to check vendor-specific status in
\r
1991 * umv_buf as appropriate.
\r
1994 * This function does not return an error.
\r
2000 * uvp_pre_create_mw, uvp_pre_query_mw, uvp_post_query_mw_t,
\r
2001 * uvp_bind_mw, uvp_pre_destroy_mw, uvp_post_destroy_mw_t
\r
2007 /****f* user-mode Verbs/uvp_pre_query_mw
\r
2009 * uvp_pre_query_mw -- Pre-ioctl to Query a memory window
\r
2014 typedef ib_api_status_t
\r
2015 (AL_API *uvp_pre_query_mw) (
\r
2016 IN const ib_mw_handle_t h_uvp_mw,
\r
2017 IN OUT ci_umv_buf_t *p_umv_buf );
\r
2021 * uvp_pre_query_mw is implemented by vendor. It is the pre-ioctl routine
\r
2022 * for ib_query_mw().
\r
2026 * [in] Vendor's Memory window handle (in user-mode library)
\r
2027 * whose attributes are being retrieved.
\r
2029 * [in out] On input, UAL provides this buffer template.
\r
2030 * On return from this function, p_umv_buf contains
\r
2031 * any vendor-specific record to be exchanged with the vendor's
\r
2035 * The pre-ioctl call completed successfully.
\r
2036 * IB_INVALID_MW_HANDLE
\r
2037 * mw_handle supplied is an invalid handle.
\r
2038 * IB_INSUFFICIENT_RESOURCES
\r
2039 * Not enough resources to complete the request.
\r
2045 * uvp_pre_create_mw, uvp_post_create_mw_t, uvp_post_query_mw_t,
\r
2046 * uvp_bind_mw, uvp_pre_destroy_mw, uvp_post_destroy_mw_t
\r
2052 /****f* user-mode Verbs/uvp_post_query_mw_t
\r
2054 * uvp_post_query_mw_t -- Post-ioctl to Query a memory window
\r
2060 (AL_API *uvp_post_query_mw_t) (
\r
2061 IN const ib_mw_handle_t h_uvp_mw,
\r
2062 IN ib_api_status_t ioctl_status,
\r
2064 OUT ib_pd_handle_t *ph_pd,
\r
2065 IN ci_umv_buf_t *p_umv_buf );
\r
2068 * uvp_post_query_mw_t is implemented by vendor. It is the post-ioctl routine
\r
2069 * for ib_query_mw().
\r
2073 * [in] Vendor's Memory window handle (in user-mode library)
\r
2074 * whose attributes are being retrieved.
\r
2076 * [in] The ioctl status of the AL API.
\r
2078 * [in] Current R_KEY associated with this mw_handle
\r
2080 * [in] Protection domain handle associated with this mw_handle
\r
2082 * [in out] On input, it contains any vendor-specific private information
\r
2083 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_query_mw).
\r
2084 * Vendor is expected to check vendor-specific status in
\r
2085 * umv_buf as appropriate.
\r
2089 * The query operation completed successfully.
\r
2095 * uvp_pre_create_mw, uvp_post_create_mw_t, uvp_pre_query_mw,
\r
2096 * uvp_bind_mw, uvp_pre_destroy_mw, uvp_post_destroy_mw_t
\r
2102 /****f* user-mode Verbs/uvp_bind_mw
\r
2104 * uvp_bind_mw -- Bind a memory window to a memory region.
\r
2109 typedef ib_api_status_t
\r
2110 (AL_API *uvp_bind_mw) (
\r
2111 IN const ib_mw_handle_t h_uvp_mw,
\r
2112 IN const ib_qp_handle_t h_uvp_qp,
\r
2113 IN ib_bind_wr_t *p_mw_bind,
\r
2114 OUT net32_t* const p_rkey );
\r
2117 * This routine posts a request to bind a memory window to a registered
\r
2118 * memory region. If the queue pair was created with selectable signaling,
\r
2119 * once the operation is completed successfully then a completion queue entry
\r
2120 * is generated indicating the bind operation has completed. The IB_POST_FENCE
\r
2121 * option could be specified to cause the requestor to wait until outstanding
\r
2122 * RDMA operations can be completed.
\r
2126 * [in] Vendor's Handle (in user-mode library) to memory window
\r
2127 * that needs to be bound to a memory region.
\r
2129 * [in] Vendor's QP Handle (in user-mode library) to which
\r
2130 * this bind request is to be posted.
\r
2132 * [in] Input parameters for this bind request, consisting of virtual
\r
2133 * addr range of bind request etc. On successful completion, the new R_KEY
\r
2136 * [out] Current R_KEY associated with this mw_handle
\r
2140 * The memory bind operation was posted successfully.
\r
2141 * IB_INSUFFICIENT_RESOURCES
\r
2142 * Insufficient resources to complete the request.
\r
2143 * No more WQE's to post this request
\r
2144 * No more free WQE's to post this request
\r
2145 * IB_INVALID_MW_HANDLE
\r
2146 * memw_handle supplied is an invalid memory window handle.
\r
2147 * IB_INVALID_PERMISSION
\r
2148 * Invalid access rights specified in request
\r
2149 * IB_INVALID_SERVICE_TYPE
\r
2150 * Invalid service type for this qp_handle.
\r
2151 * IB_INVALID_PARAMETER
\r
2152 * Address or length parameter specified is invalid.
\r
2154 * R_KEY specified is invalid for the memory region being bound.
\r
2160 * uvp_pre_create_mw, uvp_post_create_mw_t, uvp_pre_query_mw,
\r
2161 * uvp_post_query_mw_t, uvp_pre_destroy_mw, uvp_post_destroy_mw_t
\r
2167 /****f* user-mode Verbs/uvp_pre_destroy_mw
\r
2169 * uvp_pre_destroy_mw -- Pre-ioctl function to destroy a memory window
\r
2174 typedef ib_api_status_t
\r
2175 (AL_API *uvp_pre_destroy_mw) (
\r
2176 IN const ib_mw_handle_t h_uvp_mw );
\r
2180 * uvp_pre_destroy_mw() is implemented by vendor. It is the pre-ioctl routine
\r
2181 * for ib_destroy_mw().
\r
2186 * [in] Vendor's handle (in user-mode library) to the memory window
\r
2190 * Pre-ioctl succeeded.
\r
2196 * uvp_pre_create_mw, uvp_post_create_mw_t, uvp_pre_query_mw,
\r
2197 * uvp_post_query_mw_t, uvp_bind_mw, uvp_post_destroy_mw_t
\r
2203 /****f* user-mode Verbs/uvp_post_destroy_mw_t
\r
2205 * uvp_post_destroy_mw_t -- Post-ioctl function to destroy a memory window
\r
2211 (AL_API *uvp_post_destroy_mw_t) (
\r
2212 IN const ib_mw_handle_t h_uvp_mw,
\r
2213 IN ib_api_status_t ioctl_status );
\r
2216 * uvp_post_destroy_mw_t() is implemented by vendor. It is the post-ioctl
\r
2217 * routine to destroy a memory window.
\r
2222 * [in] Vendor's handle to the memory window
\r
2226 * Destroy operation successful.
\r
2232 * uvp_pre_create_mw, uvp_post_create_mw_t, uvp_pre_query_mw,
\r
2233 * uvp_post_query_mw_t, uvp_bind_mw, uvp_pre_destroy_mw
\r
2239 /****f* user-mode Verbs/uvp_post_send
\r
2241 * uvp_post_send -- Post a work request to the send side of a queue pair.
\r
2246 typedef ib_api_status_t
\r
2247 (AL_API *uvp_post_send) (
\r
2248 IN const void* __ptr64 h_qp,
\r
2249 IN ib_send_wr_t* const p_send_wr,
\r
2250 OUT ib_send_wr_t** pp_send_failure );
\r
2253 * This routine posts a work request to the send side of the queue pair.
\r
2254 * The different types of work request that can be posted are explained in
\r
2255 * the ib_wr_t structure. For exact details on ordering rules please consult
\r
2256 * the Volume 1, of the InfiniBand Specifications. If there is more
\r
2257 * outstanding requests posted that what the queue is configured for, an
\r
2258 * immediate error is returned.
\r
2262 * [in] Type-cast as appropriate for user/kernel mode, this is
\r
2263 * the Queue pair handle to which the receive work request is being
\r
2266 * [in] List of work requests that needs to be send.
\r
2268 * [out] The work requests that failed.
\r
2271 * Any unsuccessful status indicates the status of the first failed request.
\r
2274 * All the work requests are completed successfully
\r
2275 * IB_INVALID_QP_HANDLE
\r
2276 * The qp_handle supplied is invalid.
\r
2277 * IB_INSUFFICIENT_RESOURCES
\r
2278 * Insufficient resources to complete the request.
\r
2279 * There are no more work elements in the channel interface to
\r
2280 * process this request, and the total outstanding work request has
\r
2282 * IB_INVALID_WR_TYPE
\r
2283 * The work request type was not valid.
\r
2284 * IB_INVALID_QP_STATE
\r
2285 * The queue pair is either in Reset, Init, RTR or Error state.
\r
2286 * IB_INVALID_MAX_SGE
\r
2287 * The work request has too many scatter gather elements than what the
\r
2288 * QP is configured.
\r
2290 * Atomics or Reliable datagram request is not supported by this HCA.
\r
2291 * IB_INVALID_ADDR_HANDLE
\r
2292 * Address handle supplied in the work request is invalid.
\r
2295 * Kernel & User mode.
\r
2298 * Please refer to Table 81 and Table 82 for allowed operation types
\r
2299 * on different types of queue pairs, and the different modifiers
\r
2300 * acceptable for the work request for different QP service types.
\r
2303 * uvp_post_recv, uvp_poll_cq
\r
2309 /****f* user-mode Verbs/uvp_post_recv
\r
2311 * uvp_post_recv -- Post a work request to the receive queue of a queue pair.
\r
2316 typedef ib_api_status_t
\r
2317 (AL_API *uvp_post_recv) (
\r
2318 IN const void* __ptr64 h_qp,
\r
2319 IN ib_recv_wr_t* const p_recv_wr,
\r
2320 OUT ib_recv_wr_t** pp_recv_failure );
\r
2324 * This routine allows to queue a work request to the receive side of a
\r
2325 * queue pair. The work_req holds necessary data to satisfy an incoming
\r
2326 * receive message. If an attempt is made to queue more work requests than
\r
2327 * what is available, an error is returned.
\r
2331 * [in] Type-cast as appropriate for user/kernel mode, this is
\r
2332 * the Queue pair handle to which the receive work request is being
\r
2335 * [in] List of recv work requests that needs to be posted.
\r
2337 * [out] The work requests that failed.
\r
2340 * Any unsuccessful status indicates the status of the first failed request.
\r
2343 * The work request was successfully queued to the receive side of the QP.
\r
2344 * IB_INVALID_QP_HANDLE
\r
2345 * qp_handle supplied is not valid.
\r
2346 * IB_INSUFFICIENT_RESOURCES
\r
2347 * The qp has exceeded its receive queue depth than what is has been
\r
2349 * IB_INVALID_WR_TYPE
\r
2350 * Invalid work request type found in the request.
\r
2351 * IB_INVALID_QP_STATE
\r
2352 * QP was in reset or init state.
\r
2353 * (TBD: there may be an errata that allows posting in init state)
\r
2356 * Kernel & User mode.
\r
2359 * uvp_post_send, uvp_poll_cq
\r
2365 /****f* user-mode Verbs/uvp_peek_cq
\r
2370 * Returns the number of entries currently on the completion queue.
\r
2375 typedef ib_api_status_t
\r
2376 (AL_API *uvp_peek_cq) (
\r
2377 IN const void* __ptr64 h_cq,
\r
2378 OUT uint32_t* const p_n_cqes );
\r
2383 * [in] Type-cast as appropriate for user/kernel mode, this is the
\r
2384 * CQ handle for the completion queue being peeked.
\r
2387 * [out] Upon successful completion of this call, contains the number
\r
2388 * of completion queue entries currently on the completion queue.
\r
2392 * The peek operation completed successfully.
\r
2394 * IB_INVALID_CQ_HANDLE
\r
2395 * The completion queue handle was invalid.
\r
2397 * IB_INVALID_PARAMETER
\r
2398 * A reference to the completion queue entry count was not provided.
\r
2401 * Kernel and User mode
\r
2404 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_poll_cq, uvp_rearm_cq,
\r
2410 /****f* user-mode Verbs/uvp_poll_cq
\r
2412 * uvp_poll_cq -- Retrieve a work completion record from a completion queue
\r
2416 typedef ib_api_status_t
\r
2417 (AL_API *uvp_poll_cq) (
\r
2418 IN const void* __ptr64 h_cq,
\r
2419 IN OUT ib_wc_t** const pp_free_wclist,
\r
2420 OUT ib_wc_t** const pp_done_wclist );
\r
2424 * This routine retrieves a work completion entry from the specified
\r
2425 * completion queue. The contents of the data returned in a work completion
\r
2426 * is specified in ib_wc_t.
\r
2430 * [in] Type-cast as appropriate for user/kernel mode, this is
\r
2431 * the CQ handle for the completion queue being polled.
\r
2433 * [in out] A list of work request structures provided by the consumer
\r
2434 * for the channel interface to return completed Completion Queue
\r
2435 * entries. If not all the entries are consumed, this list holds the
\r
2436 * list of un-utilized completion entries provided back to the consumer.
\r
2438 * [out] A list of work completions retrieved from the completion queue
\r
2439 * and successfully processed.
\r
2443 * Poll completed successfully. If on completion the wc_free list is
\r
2444 * empty, then there are potentially more entries and the consumer must
\r
2445 * be ready to retrieve entries further.
\r
2446 * IB_INVALID_CQ_HANDLE
\r
2447 * The cq_handle supplied is not valid.
\r
2449 * There are no more entries found in the specified CQ.
\r
2452 * Kernel & User mode.
\r
2455 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_rearm_cq,
\r
2456 * uvp_rearm_n_cq, uvp_post_send, uvp_post_recv
\r
2462 /****f* user-mode Verbs/uvp_rearm_cq
\r
2464 * uvp_rearm_cq -- Invoke the Completion handler, on next entry added.
\r
2469 typedef ib_api_status_t
\r
2470 (AL_API *uvp_rearm_cq) (
\r
2471 IN const void* __ptr64 h_cq,
\r
2472 IN const boolean_t solicited );
\r
2476 * This routine instructs the channel interface to invoke the completion
\r
2477 * handler when the next completion queue entry is added to this CQ.
\r
2478 * Please refer to Volume 1, of the InfiniBand specification for a complete
\r
2483 * [in] Type-cast as appropriate for user/kernel mode, this is the
\r
2484 * CQ handle for the completion queue being armed.
\r
2486 * [in] A boolean flag indicating whether the request is to generate a
\r
2487 * notification on the next entry or on the next solicited entry
\r
2488 * being added to the completion queue.
\r
2492 * The notification request was registered successfully.
\r
2493 * IB_INVALID_CQ_HANDLE
\r
2494 * cq_handle supplied is not a valid handle.
\r
2497 * Kernel and User mode
\r
2500 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_peek_cq, uvp_poll_cq,
\r
2507 /****f* user-mode Verbs/uvp_rearm_n_cq
\r
2509 * uvp_rearm_n_cq -- Invoke the Completion handler, when next
\r
2510 * N completions have been added to this CQ.
\r
2515 typedef ib_api_status_t
\r
2516 (AL_API *uvp_rearm_n_cq) (
\r
2517 IN const void* __ptr64 h_cq,
\r
2518 IN const uint32_t n_cqes );
\r
2522 * This routine instructs the channel interface to invoke the completion
\r
2523 * handler when the next N completions are added to this CQ.
\r
2527 * [in] Type-cast as appropriate for user/kernel mode, this is the
\r
2528 * CQ handle for the completion queue being armed.
\r
2530 * [in] The number of completion queue entries to be added to the
\r
2531 * completion queue before notifying the client. This value must
\r
2532 * greater than or equal to one and less than or equal to the size
\r
2533 * of the completion queue.
\r
2537 * The notification request was registered successfully.
\r
2538 * IB_INVALID_CQ_HANDLE
\r
2539 * cq_handle supplied is not a valid handle.
\r
2540 * IB_INVALID_PARAMETER
\r
2541 * The requested number of completion queue entries was invalid.
\r
2544 * Kernel and User mode
\r
2547 * uvp_pre_create_cq, uvp_post_create_cq_t, uvp_peek_cq, uvp_poll_cq,
\r
2554 /****f* user-mode Verbs/uvp_pre_attach_mcast
\r
2556 * uvp_pre_attach_mcast -- Pre-ioctl function to Attach a queue pair
\r
2557 * to a multicast group
\r
2562 typedef ib_api_status_t
\r
2563 (AL_API *uvp_pre_attach_mcast) (
\r
2564 IN const ib_qp_handle_t h_uvp_qp,
\r
2565 IN const ib_gid_t *p_mcast_gid,
\r
2566 IN const uint16_t mcast_lid,
\r
2567 IN OUT ci_umv_buf_t *p_umv_buf );
\r
2571 * uvp_pre_attach_mcast() is the pre-ioctl routine implemented by vendor
\r
2572 * to attach a queue pair to a multicast group.
\r
2576 * [in] Vendor's Queue pair handle (in user-mode library)
\r
2577 * which needs to be added to the multicast group on the adapter.
\r
2579 * [in] The multicast group LID value.
\r
2581 * [in] IPv6 address associated with this multicast group.
\r
2583 * [in out] On input, UAL provides this buffer template.
\r
2584 * On return from this function, p_umv_buf contains
\r
2585 * any vendor-specific record to be exchanged with the vendor's
\r
2590 * The queue pair handle was successfully added to the multicast
\r
2592 * IB_INVALID_QP_HANDLE
\r
2593 * qp_handle supplied is invalid.
\r
2594 * IB_INVALID_SERVICE_TYPE
\r
2595 * Queue pair handle supplied is not of unreliable datagram type.
\r
2597 * The supplied addr is not a valid multicast ipv6 address.
\r
2598 * IB_INSUFFICIENT_RESOURCES
\r
2599 * Insufficient resources to complete the request.
\r
2605 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_post_attach_mcast_t,
\r
2606 * uvp_pre_detach_mcast, uvp_post_detach_mcast_t
\r
2612 /****f* user-mode Verbs/uvp_post_attach_mcast_t
\r
2614 * uvp_post_attach_mcast_t -- Post-ioctl function to Attach a queue pair
\r
2615 * to a multicast group
\r
2621 (AL_API *uvp_post_attach_mcast_t) (
\r
2622 IN const ib_qp_handle_t h_uvp_qp,
\r
2623 IN ib_api_status_t ioctl_status,
\r
2624 OUT ib_mcast_handle_t *ph_mcast,
\r
2625 IN ci_umv_buf_t *p_umv_buf );
\r
2629 * uvp_post_attach_mcast_t() is the post-ioctl routine implemented by vendor
\r
2630 * to attach a queue pair to a multicast group.
\r
2634 * [in] Vendor's Queue pair handle (in user-mode library)
\r
2635 * which needs to be added to
\r
2636 * the multicast group on the adapter.
\r
2638 * [in] The ioctl status of the AL API.
\r
2640 * [out] Vendor's Multicast handle (in user-mode library)
\r
2641 * holding the association of this queue pair to the multicast group.
\r
2643 * [in out] On input, it contains any vendor-specific private information
\r
2644 * exchanged with the vendor's Verbs Provider Driver (uvp_pre_attach_mcast)
\r
2645 * Vendor is expected to check vendor-specific status in
\r
2646 * umv_buf as appropriate.
\r
2649 * This function does not return a value.
\r
2652 * Kernel & User mode.
\r
2655 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_attach_mcast,
\r
2656 * uvp_pre_detach_mcast, uvp_post_detach_mcast_t
\r
2662 /****f* user-mode Verbs/uvp_pre_detach_mcast
\r
2664 * uvp_pre_detach_mcast -- Pre-ioctl function to detach a queue pair
\r
2665 * to a multicast group
\r
2670 typedef ib_api_status_t
\r
2671 (AL_API *uvp_pre_detach_mcast) (
\r
2672 IN ib_mcast_handle_t h_uvp_mcast );
\r
2676 * uvp_pre_attach_mcast() is the pre-ioctl routine implemented by vendor
\r
2677 * to attach a queue pair to a multicast group.
\r
2678 * Upon return from the pre-ioctl function, UAL packages up the UMV buffer
\r
2679 * in an IOCTL and passes it on to the user-mode proxy. UAL passes the
\r
2680 * info to the user-mode proxy stating that it no longer wishes to receive
\r
2681 * callback for mcast join for the caller. Note that UAL takes care of
\r
2682 * handling callbcak.
\r
2686 * [in] Vendor's Multicast handle (in user-mode library)
\r
2687 * holding the association of this queue pair to the multicast group.
\r
2691 * The queue pair handle was successfully added to the multicast
\r
2695 * Kernel & User mode.
\r
2698 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_attach_mcast,
\r
2699 * uvp_post_attach_mcast_t, uvp_post_detach_mcast_t
\r
2705 /****f* user-mode Verbs/uvp_post_detach_mcast_t
\r
2707 * uvp_post_detach_mcast_t -- Post-ioctl function to detach a queue pair
\r
2708 * from a multicast group
\r
2714 (AL_API *uvp_post_detach_mcast_t) (
\r
2715 IN ib_mcast_handle_t h_uvp_mcast,
\r
2716 IN ib_api_status_t ioctl_status );
\r
2720 * uvp_post_detach_mcast_t() is the post-ioctl routine implemented by vendor
\r
2721 * to attach a queue pair to a multicast group.
\r
2725 * [out] Vendor's Multicast handle holding the association of this
\r
2726 * queue pair to the multicast group.
\r
2728 * [in] The ioctl status of the AL API.
\r
2731 * This function does not return a value.
\r
2734 * Kernel & User mode.
\r
2737 * uvp_pre_create_qp, uvp_post_create_qp_t, uvp_pre_attach_mcast,
\r
2738 * uvp_post_attach_mcast_t, uvp_pre_detach_mcast
\r
2746 /****s* user-mode Verbs/uvp_interface_t
\r
2748 * uvp_interface_t -- Interface holding supported Vendor APIs
\r
2751 * The following structure is supplied by a Vendor library
\r
2752 * providing verbs functionality.
\r
2756 typedef struct _uvp_interface
\r
2760 * Version of the header file this interface export can handle
\r
2765 * HCA Access Verbs
\r
2767 uvp_pre_open_ca_t pre_open_ca;
\r
2768 uvp_post_open_ca_t post_open_ca;
\r
2770 uvp_pre_query_ca pre_query_ca;
\r
2771 uvp_post_query_ca_t post_query_ca;
\r
2773 uvp_pre_modify_ca pre_modify_ca;
\r
2774 uvp_post_modify_ca_t post_modify_ca;
\r
2776 uvp_pre_close_ca_t pre_close_ca;
\r
2777 uvp_post_close_ca_t post_close_ca;
\r
2779 uvp_pre_ci_call pre_ci_call;
\r
2780 uvp_post_ci_call post_ci_call;
\r
2784 * Protection Domain
\r
2786 uvp_pre_allocate_pd pre_allocate_pd;
\r
2787 uvp_post_allocate_pd_t post_allocate_pd;
\r
2788 uvp_pre_deallocate_pd pre_deallocate_pd;
\r
2789 uvp_post_deallocate_pd_t post_deallocate_pd;
\r
2792 * Address Vector Management Verbs
\r
2795 uvp_pre_create_av pre_create_av;
\r
2796 uvp_post_create_av_t post_create_av;
\r
2798 uvp_pre_query_av pre_query_av;
\r
2799 uvp_post_query_av_t post_query_av;
\r
2801 uvp_pre_modify_av pre_modify_av;
\r
2802 uvp_post_modify_av_t post_modify_av;
\r
2803 uvp_pre_destroy_av pre_destroy_av;
\r
2804 uvp_post_destroy_av_t post_destroy_av;
\r
2807 * QP Management Verbs
\r
2809 uvp_pre_create_qp pre_create_qp;
\r
2810 uvp_post_create_qp_t post_create_qp;
\r
2812 /* No support for create_spl_qp, UAL will return error */
\r
2814 uvp_pre_modify_qp pre_modify_qp;
\r
2815 uvp_post_modify_qp_t post_modify_qp;
\r
2817 uvp_pre_query_qp pre_query_qp;
\r
2818 uvp_post_query_qp_t post_query_qp;
\r
2820 uvp_pre_destroy_qp pre_destroy_qp;
\r
2821 uvp_post_destroy_qp_t post_destroy_qp;
\r
2824 * Completion Queue Management Verbs
\r
2826 uvp_pre_create_cq pre_create_cq;
\r
2827 uvp_post_create_cq_t post_create_cq;
\r
2829 uvp_pre_query_cq pre_query_cq;
\r
2830 uvp_post_query_cq_t post_query_cq;
\r
2832 uvp_pre_resize_cq pre_resize_cq;
\r
2833 uvp_post_resize_cq_t post_resize_cq;
\r
2835 uvp_pre_destroy_cq pre_destroy_cq;
\r
2836 uvp_post_destroy_cq_t post_destroy_cq;
\r
2839 * Memory Window Verbs
\r
2841 uvp_pre_create_mw pre_create_mw;
\r
2842 uvp_post_create_mw_t post_create_mw;
\r
2843 uvp_pre_query_mw pre_query_mw;
\r
2844 uvp_post_query_mw_t post_query_mw;
\r
2845 uvp_pre_destroy_mw pre_destroy_mw;
\r
2846 uvp_post_destroy_mw_t post_destroy_mw;
\r
2848 /* No pre/post functions for bind */
\r
2849 uvp_bind_mw bind_mw;
\r
2852 * Work Request Processing Verbs
\r
2853 * Should the types be same as Verbs?
\r
2855 uvp_post_send post_send;
\r
2856 uvp_post_recv post_recv;
\r
2859 * Completion Processing and
\r
2860 * Completion Notification Request Verbs.
\r
2861 * Should the types be same as Verbs?
\r
2863 uvp_peek_cq peek_cq;
\r
2864 uvp_poll_cq poll_cq;
\r
2865 uvp_rearm_cq rearm_cq;
\r
2866 uvp_rearm_n_cq rearm_n_cq;
\r
2869 * Multicast Support Verbs
\r
2871 uvp_pre_attach_mcast pre_attach_mcast;
\r
2872 uvp_post_attach_mcast_t post_attach_mcast;
\r
2873 uvp_pre_detach_mcast pre_detach_mcast;
\r
2874 uvp_post_detach_mcast_t post_detach_mcast;
\r
2876 } uvp_interface_t;
\r
2880 /****f* user-mode Verbs/uvp_get_interface
\r
2882 * uvp_get_interface -- Get the Vendor's supported Verbs calls
\r
2886 typedef ib_api_status_t
\r
2887 (AL_API *uvp_get_interface_t)(
\r
2888 IN OUT uvp_interface_t* const p_uvp );
\r
2891 * This routine is called by UAL to get the functions supported by
\r
2892 * a vendor's library. Upon discovering a new CA, UAL will look for
\r
2893 * the appropriate vendor library, load the library and query using
\r
2894 * this function to get the supported interfaces.
\r
2896 * If the vendor does not support an interface function, it should be
\r
2897 * set to NULL in the interface structure returned.
\r
2901 * [in out] Pointer to the uvp_interface_t structure that has the function
\r
2902 * vector to support verbs functionality.
\r
2906 * The registration is successful.
\r
2907 * IB_INSUFFICIENT_MEMORY
\r
2908 * Insufficient memory to satisfy request
\r
2920 #endif // __IB_UAL_UVP_H__
\r