2 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
\r
3 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
\r
4 * Portions Copyright (c) 2008 Microsoft Corporation. All rights reserved.
\r
6 * This software is available to you under the OpenIB.org BSD license
\r
9 * Redistribution and use in source and binary forms, with or
\r
10 * without modification, are permitted provided that the following
\r
11 * conditions are met:
\r
13 * - Redistributions of source code must retain the above
\r
14 * copyright notice, this list of conditions and the following
\r
17 * - Redistributions in binary form must reproduce the above
\r
18 * copyright notice, this list of conditions and the following
\r
19 * disclaimer in the documentation and/or other materials
\r
20 * provided with the distribution.
\r
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
25 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
26 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
27 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
28 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
35 #if !defined(__IB_AL_H__)
\r
38 #include <iba/ib_types.h>
\r
39 #include <complib/cl_waitobj.h>
\r
40 #include <complib/cl_qlist.h>
\r
45 #endif /* __cplusplus */
\r
47 /****h* IB Access Layer API/Access Layer
\r
49 * InfiniBand Access Layer
\r
51 * Copyright (c) 2003 Intel Corporation - All Rights Reserved.
\r
53 * The access layer provides transport level access to an InfiniBand fabric.
\r
54 * It supplies a foundation upon which a channel driver may be built. The
\r
55 * access layer exposes the capabilities of the InfiniBand architecture and
\r
56 * adds support for higher-level functionality required by most users of an
\r
57 * InfiniBand fabric. Users define the protocols and policies used by the
\r
58 * access layer, and the access layer implements them under the direction
\r
62 typedef struct _ib_al* ib_al_handle_t;
\r
63 typedef struct _al_pnp* ib_pnp_handle_t;
\r
64 typedef struct _al_reg_svc* ib_reg_svc_handle_t;
\r
65 typedef struct _al_mad_send* ib_mad_send_handle_t;
\r
66 typedef struct _al_mad_svc* ib_mad_svc_handle_t;
\r
67 typedef struct _al_query* ib_query_handle_t;
\r
68 typedef struct _al_sub* ib_sub_handle_t;
\r
69 typedef struct _al_listen* ib_listen_handle_t;
\r
70 typedef struct _al_ioc* ib_ioc_handle_t;
\r
71 typedef struct _al_svc_entry* ib_svc_handle_t;
\r
72 typedef struct _al_pool_key* ib_pool_key_t;
\r
73 typedef struct _al_pool* ib_pool_handle_t;
\r
74 typedef struct _mlnx_fmr_pool_element* mlnx_fmr_pool_el_t;
\r
77 typedef struct _ib_cm_handle
\r
79 ib_al_handle_t h_al;
\r
80 ib_qp_handle_t h_qp;
\r
86 /****s* Access Layer/ib_shmid_t
\r
91 * Shared Memory Identifier, used to uniquely identify a shared memory region.
\r
95 typedef uint8_t ib_shmid_t[64];
\r
102 /****d* Access Layer/ATS
\r
104 * DAPL Address Translation Service
\r
107 * ATS service ID, service name, and IPv4 offset for DAPL-compliant
\r
108 * ATS service records.
\r
110 #define ATS_SERVICE_ID CL_NTOH64( 0x10000CE100415453 )
\r
111 #define ATS_NAME "DAPL Address Translation Service"
\r
112 #define ATS_IPV4_OFFSET 12
\r
116 /****s* Access Layer/ib_mad_element_t
\r
121 * Information used to submit a work request to a management datagram (MAD)
\r
126 typedef struct _ib_mad_element
\r
128 TO_LONG_PTR(struct _ib_mad_element*, p_next);
\r
129 TO_LONG_PTR(const void*, context1);
\r
130 TO_LONG_PTR(const void*, context2);
\r
132 /* Request/completion data. */
\r
133 TO_LONG_PTR(ib_mad_t*, p_mad_buf);
\r
135 uint32_t immediate_data;
\r
136 ib_net32_t remote_qp;
\r
138 /* Send request information. */
\r
139 TO_LONG_PTR(ib_av_handle_t, h_av);
\r
140 ib_send_opt_t send_opt;
\r
141 ib_net32_t remote_qkey;
\r
142 boolean_t resp_expected;
\r
143 uint32_t timeout_ms;
\r
144 uint32_t retry_cnt;
\r
145 uint8_t rmpp_version;
\r
147 /* Completion information. */
\r
148 ib_wc_status_t status;
\r
149 boolean_t grh_valid;
\r
150 TO_LONG_PTR(ib_grh_t*, p_grh);
\r
152 /* Completed receive data or send request information if h_av is NULL. */
\r
154 ib_net16_t remote_lid;
\r
156 uint16_t pkey_index;
\r
159 /* Transaction completion data. */
\r
160 TO_LONG_PTR(void*, send_context1);
\r
161 TO_LONG_PTR(void*, send_context2);
\r
163 } ib_mad_element_t;
\r
167 * A pointer used to chain MAD elements together. This value is
\r
168 * set to NULL to mark the end of the chain.
\r
171 * User-defined context information associated with the datagram.
\r
174 * User-defined context information associated with the datagram.
\r
177 * The local data buffer contain the MAD.
\r
180 * The size of the MAD referenced by p_buffer.
\r
183 * 32-bit field sent or received as part of a datagram message.
\r
184 * This field is valid for send operations if the send_opt
\r
185 * IB_SEND_OPT_IMMEDIATE flag has been set. This field is valid
\r
186 * on received datagram completions if the recv_opt
\r
187 * IB_RECV_OPT_IMMEDIATE flag is set.
\r
190 * Identifies the destination queue pair of a datagram send operation or
\r
191 * the source queue pair of a received datagram.
\r
194 * An address vector that specifies the path information used to route
\r
195 * the outbound datagram to the destination queue pair. This handle may
\r
196 * be NULL when sending a directed route SMP or if the access layer
\r
197 * should create the address vector for the user.
\r
200 * Optional send control parameters. The following options are valid:
\r
201 * IB_SEND_OPT_IMMEDIATE and IB_SEND_OPT_SOLICITED. IB_SEND_OPT_FENCE
\r
202 * is only valid on MAD QPs.
\r
205 * The qkey for the destination queue pair.
\r
208 * This field is used to indicate that the submitted operation expects
\r
209 * a response. When set, the access layer will retry this send operation
\r
210 * until the corresponding response is successfully received, or the
\r
211 * request times out. Send operations for which a response is expected
\r
212 * will always be completed by the access layer before the corresponding
\r
213 * received response.
\r
216 * Specifies the number of milliseconds to wait for a response to
\r
217 * a request until retrying or timing out the request. This field is
\r
218 * ignored if resp_expected is set to FALSE.
\r
221 * Specifies the number of times that the request will be retried
\r
222 * before failing the request. This field is ignored if resp_expected
\r
226 * Indicates the version of the RMPP protocol to use when sending this
\r
227 * MAD. For MADs posted to MAD services of type IB_MAD_SVC_DEFAULT,
\r
228 * setting this field to 0 disables RMPP on user-defined management
\r
229 * classes or invokes the default RMPP version for well-defined management
\r
230 * classes, if appropriate. For MADs posted to MAD services of type
\r
231 * IB_MAD_SVC_RMPP, setting this field to 0 disables RMPP on the sent
\r
232 * MAD. Note that if the RMPP header exists, but the RMPP protocol is
\r
233 * not activated for this MAD, the user must ensure that the RMPP header
\r
234 * has been zeroed. This field is intended to help support backwards
\r
238 * The result of the MAD work request.
\r
241 * A flag indicating whether the p_grh reference is valid.
\r
244 * A reference to the global route header information.
\r
247 * Indicates optional fields valid as part of a work request that
\r
248 * completed on an unreliable datagram queue pair.
\r
251 * The source LID of the received datagram.
\r
254 * The service level used by the source of the received datagram.
\r
257 * This is valid only for IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types.
\r
258 * For received datagrams, this field contains the pkey index for
\r
259 * the source queue pair. For send operations, this field contains
\r
260 * the pkey index to use when posting the send work request.
\r
263 * The portion of the remote_lid that may be changed to vary the path
\r
264 * through the subnet to the remote port.
\r
267 * If this datagram was received as a response to a sent datagram, this
\r
268 * field contains the context1 value of the send operation. If this is
\r
269 * an unsolicited receive, this field will be 0.
\r
272 * If this datagram was received as a response to a sent datagram, this
\r
273 * field contains the context2 value of the send operation. If this is
\r
274 * an unsolicited receive, this field will be 0.
\r
277 * Identifies the source queue pair of a received datagram.
\r
280 * The format of data sent over the fabric is expected to be in the form
\r
281 * of a MAD. MADs are expected to match the format defined by the
\r
282 * Infiniband specification and must be in network-byte order when posted
\r
283 * to a MAD service.
\r
285 * This structure is received to notify a user that a datagram has been
\r
286 * received for a registered management class. Information of the source
\r
287 * of the data is provided, along with the data buffer.
\r
289 * The MAD element structure is defined such that a received MAD element
\r
290 * may be re-used as a sent response. In such cases, the h_av field may be
\r
291 * NULL. The address vector will be created and destroyed by the access
\r
295 * ib_get_mad, ib_put_mad, ib_send_mad, ib_local_ds_t, ib_send_opt_t,
\r
296 * ib_pfn_mad_recv_cb_t, ib_get_mad_buf
\r
300 /****f* Access Layer/ib_get_mad_buf
\r
305 * Returns a pointer to the MAD buffer associated with a MAD element.
\r
309 #pragma warning(push)
\r
310 #pragma warning(disable: 4244 )
\r
311 AL_INLINE void* AL_API
\r
313 IN const ib_mad_element_t* const p_mad_element )
\r
315 CL_ASSERT( p_mad_element );
\r
316 return( p_mad_element->p_mad_buf );
\r
318 #pragma warning (pop)
\r
322 * [in] A pointer to a MAD element.
\r
325 * Returns a pointer to the MAD buffer associated with a MAD element.
\r
332 /****f* Access Layer/ib_pfn_comp_cb_t
\r
337 * Completion callback provided by a client.
\r
342 (AL_API *ib_pfn_comp_cb_t)(
\r
343 IN const ib_cq_handle_t h_cq,
\r
344 IN void *cq_context );
\r
348 * [in] Handle for the completion queue on which the completion occurred.
\r
351 * [in] User-specified context for the completion queue on which the
\r
352 * completion occurred.
\r
355 * This function is invoked upon completion of a work request on a queue pair
\r
356 * associated with the completion queue. The context associated with the
\r
357 * completion queue on which the completion occurred is return to the client
\r
358 * through the callback.
\r
360 * In the kernel, this callback is usually invoked using a tasklet, dependent
\r
361 * on the implementation of the underlying verbs provider driver.
\r
365 /****d* Access Layer/ib_al_flags_t
\r
370 * Access layer flags used to direct the operation of various calls.
\r
374 typedef uint32_t ib_al_flags_t;
\r
375 #define IB_FLAGS_SYNC 0x00000001
\r
379 * Indicates that the given operation should be performed synchronously.
\r
380 * The call will block until it completes. Callbacks will still be
\r
384 * ib_cm_req_t, ib_cm_rep_t, ib_cm_dreq_t, ib_cm_lap_t,
\r
385 * ib_reg_svc_req_t, ib_mcast_req_t, ib_query_req_t, ib_sub_req_t
\r
389 /****f* Access Layer/ib_pfn_destroy_cb_t
\r
391 * ib_pfn_destroy_cb_t
\r
394 * Asynchronous callback invoked after a resource has been successfully
\r
400 (AL_API *ib_pfn_destroy_cb_t)(
\r
401 IN void *context );
\r
405 * [in] User-specified context associated with the resource being
\r
406 * destroyed. The context for the resource is usually set during the
\r
407 * object's creation.
\r
410 * This callback notifies a client that a resource has been successfully
\r
411 * destroyed. It is used to indicate that all pending callbacks associated
\r
412 * with the resource have completed, and no additional events will be
\r
413 * generated for that resource.
\r
415 * This callback is invoked within a system thread context in the kernel.
\r
417 * If the user specifies ib_sync_destroy as the asynchronous callback, then
\r
418 * the object being destroyed will be destroyed synchronously. This may
\r
419 * result in the calling thread blocking while outstanding callbacks complete.
\r
427 /****f* Access Layer/ib_sync_destroy
\r
432 * Access layer routine used to indicate synchronous destruction of an
\r
437 static const ib_pfn_destroy_cb_t ib_sync_destroy = (ib_pfn_destroy_cb_t)(LONG_PTR)-1;
\r
443 * Users specify ib_sync_destroy as the ib_pfn_destroy_cb_t callback in order
\r
444 * to force synchronous object destruction. This may result in the calling
\r
445 * thread blocking while outstanding callbacks complete.
\r
448 * ib_pfn_destroy_cb_t
\r
452 /****s* Access Layer/ib_async_event_rec_t
\r
454 * ib_async_event_rec_t
\r
457 * Information returned when an asynchronous event occurs on an allocated
\r
462 typedef struct _ib_async_event_rec
\r
464 ib_async_event_t code;
\r
465 uint64_t vendor_specific;
\r
467 TO_LONG_PTR(void*, context);
\r
470 TO_LONG_PTR(ib_ca_handle_t, h_ca);
\r
471 TO_LONG_PTR(ib_cq_handle_t, h_cq);
\r
472 TO_LONG_PTR(ib_qp_handle_t, h_qp);
\r
473 TO_LONG_PTR(struct _ib_srq*, h_srq);
\r
477 uint8_t port_number;
\r
479 } ib_async_event_rec_t;
\r
483 * A code that identifies the type of event being reported.
\r
486 * A field containing optional vendor specific information.
\r
489 * User-defined context information associated with the resource on
\r
490 * which the error occurred.
\r
493 * A handle to the resource for which this event record was generated.
\r
494 * This handle will match the handle returned during the creation of
\r
495 * resource. It is provided in case an event occurs before a client's
\r
496 * call to create a resource can return.
\r
499 * ib_async_event_t, ib_pfn_event_cb_t
\r
503 /****f* Access Layer/ib_pfn_event_cb_t
\r
505 * ib_pfn_event_cb_t
\r
508 * A user-specified callback that is invoked after an asynchronous event
\r
509 * has occurred on an allocated resource.
\r
514 (AL_API *ib_pfn_event_cb_t)(
\r
515 IN ib_async_event_rec_t *p_event_rec );
\r
519 * [in] Information returned to the user, indicating the type of
\r
520 * event and the associated user context.
\r
523 * This callback is invoked within a system thread context in the kernel.
\r
526 * ib_async_event_rec_t
\r
530 /****f* Access Layer/ib_open_ca
\r
535 * Opens a channel adapter for additional access. A channel adapter must
\r
536 * be opened before consuming resources on that adapter.
\r
540 AL_EXPORT ib_api_status_t AL_API
\r
542 IN const ib_al_handle_t h_al,
\r
543 IN const ib_net64_t ca_guid,
\r
544 IN const ib_pfn_event_cb_t pfn_ca_event_cb OPTIONAL,
\r
545 IN const void* const ca_context,
\r
546 OUT ib_ca_handle_t* const ph_ca );
\r
550 * [in] The handle to an open instance of AL.
\r
553 * [in] The GUID of the channel adapter to open.
\r
556 * [in] A user-specified callback that is invoked after an
\r
557 * asynchronous event has occurred on the channel adapter.
\r
560 * [in] A client-specified context to associate with this opened instance
\r
561 * of the channel adapter. This context is returned to the user when
\r
562 * invoking asynchronous callbacks referencing this channel adapter.
\r
565 * [out] Upon successful completion of this call, this references a
\r
566 * handle to the opened channel adapter.
\r
570 * The operation was successful.
\r
572 * IB_INVALID_AL_HANDLE
\r
573 * The access layer handle was invalid.
\r
576 * No channel adapter in the system was found for the specified ca_guid.
\r
578 * IB_INVALID_PARAMETER
\r
579 * A reference to the CA handle was not provided.
\r
581 * IB_INSUFFICIENT_MEMORY
\r
582 * There was insufficient memory to open the channel adapter.
\r
585 * When successful, this routine returns a handle to an open instance of a CA.
\r
588 * ib_query_ca, ib_modify_ca, ib_close_ca, ib_pfn_event_cb_t
\r
592 /****f* Access Layer/ib_query_ca
\r
597 * Queries the attributes of an opened channel adapter.
\r
601 AL_EXPORT ib_api_status_t AL_API
\r
603 IN const ib_ca_handle_t h_ca,
\r
604 OUT ib_ca_attr_t* const p_ca_attr OPTIONAL,
\r
605 IN OUT uint32_t* const p_size );
\r
609 * [in] The handle to an open channel adapter.
\r
612 * [out] A reference to a buffer where the channel adapter attributes,
\r
613 * including port attribute information will be copied. If this parameter
\r
614 * is NULL, then the required buffer size needed to return all of the CA
\r
615 * attribute information is returned through the p_size parameter. The
\r
616 * ib_ca_attr_t structure for the specified channel adapter is stored
\r
617 * at the top of the buffer.
\r
620 * [in/out] On input, this references the size of the data buffer
\r
621 * referenced by the p_ca_attr parameter.
\r
623 * On output, the number of bytes used or needed to copy all CA
\r
624 * attribute information.
\r
628 * The attributes were returned successfully.
\r
630 * IB_INVALID_CA_HANDLE
\r
631 * The channel adapter handle was invalid.
\r
633 * IB_INSUFFICIENT_MEMORY
\r
634 * The size of the p_ca_attr buffer, specified through p_size, is
\r
635 * insufficient to store all of the CA attribute information.
\r
637 * IB_INVALID_PARAMETER
\r
638 * A reference to the size was not provided.
\r
641 * This routine returns information about the specified channel adapter,
\r
642 * including port attributes. The amount of information returned through
\r
643 * this call is variable sized. Users may obtain the size of the data
\r
644 * buffer required to obtain the CA attributes by calling this function
\r
645 * with p_ca_attr set to NULL. The access layer will then return the
\r
646 * necessary size in the variable referenced by the p_size parameter.
\r
649 * ib_open_ca, ib_query_ca_by_guid, ib_modify_ca, ib_close_ca, ib_ca_attr_t
\r
653 /****f* Access Layer/ib_query_ca_by_guid
\r
655 * ib_query_ca_by_guid
\r
658 * Queries the attributes of an opened channel adapter.
\r
662 AL_EXPORT ib_api_status_t AL_API
\r
663 ib_query_ca_by_guid(
\r
664 IN const ib_al_handle_t h_al,
\r
665 IN const ib_net64_t ca_guid,
\r
666 OUT ib_ca_attr_t* const p_ca_attr OPTIONAL,
\r
667 IN OUT uint32_t* const p_size );
\r
671 * [in] The handle to an open instance of AL.
\r
674 * [in] The GUID of the channel adapter to query.
\r
677 * [out] A reference to a buffer where the channel adapter attributes,
\r
678 * including port attribute information will be copied. If this parameter
\r
679 * is NULL, then the required buffer size needed to return all of the CA
\r
680 * attribute information is returned through the p_size parameter. The
\r
681 * ib_ca_attr_t structure for the specified channel adapter is stored
\r
682 * at the top of the buffer.
\r
685 * [in/out] On input, this references the size of the data buffer
\r
686 * referenced by the p_ca_attr parameter.
\r
688 * On output, the number of bytes used or needed to copy all CA
\r
689 * attribute information.
\r
693 * The attributes were returned successfully.
\r
695 * IB_INVALID_AL_HANDLE
\r
696 * The access layer handle was invalid.
\r
699 * No channel adapter in the system was found for the specified ca_guid.
\r
701 * IB_INSUFFICIENT_MEMORY
\r
702 * The size of the p_ca_attr buffer, specified through p_size, is
\r
703 * insufficient to store all of the CA attribute information.
\r
705 * IB_INVALID_PARAMETER
\r
706 * A reference to the size was not provided.
\r
709 * This routine returns information about the specified channel adapter,
\r
710 * including port attributes. The amount of information returned through
\r
711 * this call is variable sized. Users may obtain the size of the data
\r
712 * buffer required to obtain the CA attributes by calling this function
\r
713 * with p_ca_attr set to NULL. The access layer will then return the
\r
714 * necessary size in the variable referenced by the p_size parameter.
\r
717 * ib_open_ca, ib_query_ca, ib_modify_ca, ib_close_ca, ib_ca_attr_t
\r
721 /****f* Access Layer/ib_modify_ca
\r
726 * Modifies the attributes and violation counters associated with a port.
\r
730 AL_EXPORT ib_api_status_t AL_API
\r
732 IN const ib_ca_handle_t h_ca,
\r
733 IN const uint8_t port_num,
\r
734 IN const ib_ca_mod_t ca_mod,
\r
735 IN const ib_port_attr_mod_t* const p_port_attr_mod );
\r
739 * [in] A handle to an opened channel adapter.
\r
742 * [in] An index to the port that is being modified. The port_num matches
\r
743 * the index of the port as returned through the ib_query_ca call.
\r
746 * [in] A mask of the attributes and counters to modify.
\r
749 * [in] A list of the specific port attribute information to modify. For
\r
750 * the access layer to modify an attribute, its corresponding bit must be
\r
751 * set in the ca_mod parameter.
\r
755 * The attributes were successfully modified.
\r
757 * IB_INVALID_CA_HANDLE
\r
758 * The channel adapter handle was invalid.
\r
761 * The port number supplied was invalid for the given channel adapter.
\r
763 * IB_INVALID_PARAMETER
\r
764 * The supplied ca_mod mask is invalid or a reference to the port
\r
765 * attribute information was not provided.
\r
768 * The optional qkey and pkey violation counters are not supported by
\r
769 * this channel adapter, but an attempt was made to modify them.
\r
772 * This call sets the attributes for a port in its associated PORT_INFO
\r
773 * structure. It will also reset pkey and qkey violation counters.
\r
776 * ib_open_ca, ib_query_ca, ib_close_ca, ib_ca_mod_t, ib_port_attr_mod_t
\r
780 /****f* Access Layer/ib_close_ca
\r
785 * Closes an opened channel adapter. Once closed, no further access to this
\r
786 * channel adapter is possible.
\r
790 AL_EXPORT ib_api_status_t AL_API
\r
792 IN const ib_ca_handle_t h_ca,
\r
793 IN const ib_pfn_destroy_cb_t pfn_destroy_cb OPTIONAL );
\r
797 * [in] A handle to an opened channel adapter.
\r
800 * [in] A user-specified callback that is invoked after the channel
\r
801 * adapter has been successfully destroyed.
\r
805 * The close request was registered.
\r
807 * IB_INVALID_CA_HANDLE
\r
808 * The channel adapter handle was invalid.
\r
811 * This call closes the opened channel adapter and frees all associated
\r
812 * resources, such as queue pairs, protection domains, and completion
\r
813 * queues. Since callbacks may be outstanding against the channel adapter
\r
814 * or one of its resources at the time the close operation is invoked, this
\r
815 * call operates asynchronously. The user will be notified through a callback
\r
816 * once the close operation completes, indicating that no additional callbacks
\r
817 * will be invoked for the specified channel adapter or a related resource.
\r
824 /****f* Access Layer/ib_alloc_pd
\r
829 * Allocates a protection domain on the specified channel adapter.
\r
833 AL_EXPORT ib_api_status_t AL_API
\r
835 IN const ib_ca_handle_t h_ca,
\r
836 IN const ib_pd_type_t pd_type,
\r
837 IN const void* const pd_context,
\r
838 OUT ib_pd_handle_t* const ph_pd );
\r
842 * [in] A handle to an opened channel adapter.
\r
845 * [in] Indicates the type of protection domain being created.
\r
848 * [in] A client-specified context to associate with this allocated
\r
849 * protection domain. This context is returned to the user when
\r
850 * invoking asynchronous callbacks referencing this protection domain.
\r
853 * [out] Upon successful completion of this call, this references a
\r
854 * handle to the allocated protection domain.
\r
858 * The operation was successful.
\r
860 * IB_INVALID_CA_HANDLE
\r
861 * The channel adapter handle was invalid.
\r
863 * IB_INVALID_PARAMETER
\r
864 * The supplied pd_type value is invalid or a reference to the protection
\r
865 * domain handle was not provided.
\r
867 * IB_INSUFFICIENT_MEMORY
\r
868 * There was insufficient memory to allocate the protection domain.
\r
870 * IB_INSUFFICIENT_RESOURCES
\r
871 * There were insufficient resources currently available on the channel
\r
872 * adapter to create the protection domain.
\r
875 * When successful, this routine returns a handle to a newly allocated
\r
876 * protection domain.
\r
879 * ib_dealloc_pd, ib_pd_type_t
\r
883 /****f* Access Layer/ib_dealloc_pd
\r
888 * Deallocates a protection domain.
\r
892 AL_EXPORT ib_api_status_t AL_API
\r
894 IN const ib_pd_handle_t h_pd,
\r
895 IN const ib_pfn_destroy_cb_t pfn_destroy_cb OPTIONAL );
\r
899 * [in] A handle to an allocated protection domain.
\r
902 * [in] A user-specified callback that is invoked after the protection
\r
903 * domain has been successfully destroyed.
\r
907 * The operation was successful.
\r
909 * IB_INVALID_PD_HANDLE
\r
910 * The protection domain handle was invalid.
\r
913 * This call deallocates a protection domain and releases all associated
\r
914 * resources, including queue pairs and registered memory regions. Since
\r
915 * callbacks may be outstanding against one of protection domain's related
\r
916 * resources at the time the deallocation call is invoked, this call operates
\r
917 * asynchronously. The user will be notified through a callback once the
\r
918 * deallocation call completes, indicating that no additional callbacks
\r
919 * will be invoked for a related resource.
\r
926 /****f* Access Layer/ib_create_av
\r
931 * Creates an address vector.
\r
935 AL_EXPORT ib_api_status_t AL_API
\r
937 IN const ib_pd_handle_t h_pd,
\r
938 IN const ib_av_attr_t* const p_av_attr,
\r
939 OUT ib_av_handle_t* const ph_av );
\r
943 * [in] A handle to an allocated protection domain that the address
\r
944 * vector will be associated with.
\r
947 * [in] Attributes for the newly created address vector.
\r
950 * [out] Upon successful completion of this call, this references a
\r
951 * handle to the newly created address vector.
\r
955 * The operation was successful.
\r
957 * IB_INVALID_PD_HANDLE
\r
958 * The protection domain handle was invalid.
\r
960 * IB_INVALID_PARAMETER
\r
961 * A reference to the address vector attributes or handle was not
\r
964 * IB_INSUFFICIENT_MEMORY
\r
965 * There was insufficient memory to create the address vector.
\r
968 * The port number supplied, through the address vector attributes,
\r
969 * was invalid for the given channel adapter.
\r
971 * IB_INSUFFICIENT_RESOURCES
\r
972 * There were insufficient resources currently available on the channel
\r
973 * adapter to create the address vector.
\r
976 * This routine creates an address vector. Clients specify the attributes
\r
977 * of the address vector through the p_av_attr parameter.
\r
980 * ib_query_av, ib_modify_av, ib_destroy_av
\r
984 /****f* Access Layer/ib_query_av
\r
989 * Returns the attributes of an address vector.
\r
993 AL_EXPORT ib_api_status_t AL_API
\r
995 IN const ib_av_handle_t h_av,
\r
996 OUT ib_av_attr_t* const p_av_attr,
\r
997 OUT ib_pd_handle_t* const ph_pd );
\r
1001 * [in] A handle to an existing address vector.
\r
1004 * [out] Upon successful completion, the structure referenced by this
\r
1005 * parameter contains the attributes of the specified address vector.
\r
1008 * [out] Upon successful completion, this references a handle to the
\r
1009 * protection domain associated with the address vector.
\r
1013 * The attributes were returned successfully.
\r
1015 * IB_INVALID_AV_HANDLE
\r
1016 * The address vector handle was invalid.
\r
1018 * IB_INVALID_PARAMETER
\r
1019 * A reference to the address vector attributes structure or protection
\r
1020 * domain handle was not provided.
\r
1023 * ib_create_av, ib_modify_av, ib_destroy_av, ib_av_attr_t
\r
1027 /****f* Access Layer/ib_modify_av
\r
1032 * Modifies the attributes of an existing address vector.
\r
1036 AL_EXPORT ib_api_status_t AL_API
\r
1038 IN const ib_av_handle_t h_av,
\r
1039 IN const ib_av_attr_t* const p_av_attr );
\r
1043 * [in] A handle to an existing address vector.
\r
1046 * [in] The new attributes to use when modifying the address vector.
\r
1050 * The address vector was successfully modified.
\r
1052 * IB_INVALID_AV_HANDLE
\r
1053 * The address vector handle was invalid.
\r
1055 * IB_INVALID_PARAMETER
\r
1056 * A reference to the address vector attributes structure was not
\r
1060 * The port number supplied, through the address vector attributes,
\r
1061 * was invalid for the given channel adapter.
\r
1064 * This routine modifies the attributes of an existing address vector.
\r
1065 * The new attributes are specified through the p_av_attr parameter.
\r
1068 * ib_create_av, ib_destroy_av
\r
1072 /****f* Access Layer/ib_destroy_av
\r
1077 * Destroys an existing address vector.
\r
1081 AL_EXPORT ib_api_status_t AL_API
\r
1083 IN const ib_av_handle_t h_av );
\r
1087 * [in] A handle to an existing address vector.
\r
1091 * The address vector was successfully destroyed.
\r
1093 * IB_INVALID_AV_HANDLE
\r
1094 * The address vector handle was invalid.
\r
1097 * This routine destroys an existing address vector.
\r
1104 /****f* Access Layer/ib_create_srq
\r
1109 * Creates a shared receive queue and returns its handle to the user.
\r
1113 AL_EXPORT ib_api_status_t AL_API
\r
1115 IN const ib_pd_handle_t h_pd,
\r
1116 IN const ib_srq_attr_t* const p_srq_attr,
\r
1117 IN const void* const srq_context,
\r
1118 IN const ib_pfn_event_cb_t pfn_srq_event_cb OPTIONAL,
\r
1119 OUT ib_srq_handle_t* const ph_srq );
\r
1123 * [in] This is a handle to a protection domain associated with the shared queue
\r
1127 * [in] Attributes necessary to allocate and initialize a shared receive queue.
\r
1130 * [in] A user-specified context information associated with the shared
\r
1134 * [in] User-specified error callback routine invoked after an
\r
1135 * asynchronous event has occurred on the shared receive queue.
\r
1138 * [out] Upon successful completion of this call, this references a
\r
1139 * handle to the newly created shared receive queue.
\r
1143 * The receive queue was successfully created.
\r
1145 * IB_INVALID_PD_HANDLE
\r
1146 * The protection domain to associate with the shared receive queue was invalid.
\r
1148 * IB_INVALID_PARAMETER
\r
1149 * A reference to the shared receive queue attributes or handle was not provided.
\r
1151 * IB_INSUFFICIENT_MEMORY
\r
1152 * There was insufficient memory to create the shared receive queue.
\r
1154 * IB_INSUFFICIENT_RESOURCES
\r
1155 * There were insufficient resources currently available on the channel
\r
1156 * adapter to create the shared receive queue.
\r
1158 * IB_INVALID_SETTING
\r
1159 * The specified shared receive queue creation attributes are invalid.
\r
1161 * IB_INVALID_MAX_WRS
\r
1162 * The requested maximum send or receive work request depth could not be
\r
1165 * IB_INVALID_MAX_SGE
\r
1166 * The requested maximum number of scatter-gather entries for the send or
\r
1167 * receive queue could not be supported.
\r
1170 * This routine allocates a shared receive queue with the specified attributes. If
\r
1171 * the shared receive queue cannot be allocated, an error is returned. When creating
\r
1172 * the shared receive queue, users associate a context with the shared receive queue. This
\r
1173 * context is returned to the user through the asynchronous event callback
\r
1174 * if an event occurs.
\r
1176 * This routine is used to create receive queues, which work with QPs of type:
\r
1178 * IB_QPT_RELIABLE_CONN
\r
1179 * IB_QPT_UNRELIABLE_CONN
\r
1180 * IB_QPT_UNRELIABLE_DGRM
\r
1183 * ib_query_srq, ib_modify_srq, ib_destroy_srq, ib_srq_attr_t,
\r
1184 * ib_srq_attr_mask_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1188 /****f* Access Layer/ib_query_srq
\r
1193 * Query the current attributes of the shared receive queue.
\r
1197 AL_EXPORT ib_api_status_t AL_API
\r
1199 IN const ib_srq_handle_t h_srq,
\r
1200 OUT ib_srq_attr_t* const p_srq_attr );
\r
1204 * [in] A handle to an existing shared receive queue.
\r
1207 * [out] Upon successful completion of this call, the structure
\r
1208 * referenced by this parameter contains the attributes of the specified
\r
1213 * The shared receive queue attributes were returned successfully.
\r
1215 * IB_INVALID_SRQ_HANDLE
\r
1216 * The shared receive queue handle was invalid.
\r
1218 * IB_INVALID_PARAMETER
\r
1219 * A reference to the shared receive queue attributes structure was not provided.
\r
1222 * This routine returns information about the specified shared receive queue.
\r
1225 * ib_query_srq, ib_modify_srq, ib_destroy_srq, ib_srq_attr_t,
\r
1226 * ib_srq_attr_mask_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1230 /****f* Access Layer/ib_modify_srq
\r
1235 * Modifies the attributes of an existing shared receive queue.
\r
1239 AL_EXPORT ib_api_status_t AL_API
\r
1241 IN const ib_srq_handle_t h_srq,
\r
1242 IN const ib_srq_attr_t* const p_srq_attr,
\r
1243 IN const ib_srq_attr_mask_t srq_attr_mask );
\r
1247 * [in] A handle to an existing shared receive queue.
\r
1250 * [in] Attributes necessary to allocate and initialize a shared receive queue.
\r
1253 * [in] Flags, indicating which fields in the previous structure are valid.
\r
1257 * The shared receive queue was successfully modified.
\r
1259 * IB_INVALID_SRQ_HANDLE
\r
1260 * The shared receive queue handle was invalid.
\r
1262 * IB_INVALID_PARAMETER
\r
1263 * A reference to the shared receive queue attributes was not provided.
\r
1265 * IB_INVALID_SETTING
\r
1266 * The specified shared receive queue attributes were invalid.
\r
1269 * The required action is not supported yet.
\r
1271 * IB_INSUFFICIENT_RESOURCES
\r
1272 * There were insufficient resources currently available on the channel
\r
1273 * adapter to register the modify the shared receive queue.
\r
1276 * This routine modifies the attributes of an existing shared receive queue and
\r
1277 * transitions it to a new state. The new state and attributes are
\r
1278 * specified through the p_qp_mod parameter. Upon successful completion,
\r
1279 * the shared receive queue is in the requested state.
\r
1282 * ib_query_srq, ib_modify_srq, ib_destroy_srq, ib_srq_attr_t,
\r
1283 * ib_srq_attr_mask_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1287 /****f* Access Layer/ib_destroy_srq
\r
1292 * Release a shared receive queue. Once destroyed, no further access to this
\r
1293 * shared receive queue is possible.
\r
1297 AL_EXPORT ib_api_status_t AL_API
\r
1299 IN const ib_srq_handle_t h_srq,
\r
1300 IN const ib_pfn_destroy_cb_t pfn_destroy_cb OPTIONAL );
\r
1304 * [in] A handle to an existing shared shared receive queue.
\r
1307 * [in] A user-specified callback that is invoked after the shared receive queue
\r
1308 * has been successfully destroyed.
\r
1312 * The destroy request was registered.
\r
1314 * IB_INVALID_SRQ_HANDLE
\r
1315 * The shared receive queue handle was invalid.
\r
1317 * IB_RESOURCE_BUSY
\r
1318 * There are QPs, bound to the shared receive queue
\r
1321 * This call destroys an existing shared receive queue. Since callbacks may be
\r
1322 * outstanding against the shared receive queue at the time the destroy operation is
\r
1323 * invoked, then this call operates asynchronously. The user will be notified
\r
1324 * through a callback once the destroy operation completes, indicating that
\r
1325 * no additional callbacks will be invoked for the specified shared receive queue.
\r
1328 * ib_query_srq, ib_modify_srq, ib_destroy_srq, ib_srq_attr_t,
\r
1329 * ib_srq_attr_mask_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1333 /****f* Access Layer/ib_post_srq_recv
\r
1335 * ib_post_srq_recv
\r
1338 * This routine posts a work request to the shared receive queue of a shared receive queue.
\r
1342 AL_EXPORT ib_api_status_t AL_API
\r
1344 IN const ib_srq_handle_t h_srq,
\r
1345 IN ib_recv_wr_t* const p_recv_wr,
\r
1346 OUT ib_recv_wr_t **pp_recv_failure OPTIONAL );
\r
1350 * [in] The shared receive queue to which this work request is being submitted.
\r
1353 * [in] A reference to the head of the work request list.
\r
1356 * [out] If the post receive operation failed, this references the work
\r
1357 * request in the p_recv_wr list where the first failure occurred.
\r
1358 * This parameter may be NULL if only a single work request is being
\r
1359 * posted to the QP.
\r
1363 * All work requests were successfully posted.
\r
1365 * IB_INVALID_QP_HANDLE
\r
1366 * The shared receive queue handle was invalid.
\r
1368 * IB_INVALID_PARAMETER
\r
1369 * A reference to the receive work request list was not provided.
\r
1371 * IB_INSUFFICIENT_RESOURCES
\r
1372 * The number of posted work requests exceed the current depth available
\r
1373 * on the receive queue.
\r
1375 * IB_INVALID_WR_TYPE
\r
1376 * The work request type was invalid.
\r
1378 * IB_INVALID_QP_STATE
\r
1379 * The current shared receive queue state does not allow posting receives.
\r
1382 * This routine posts a work request to the shared receive queue.
\r
1383 * The type of work to perform is defined by the p_recv_wr parameter. This
\r
1384 * call is used to post data buffers to receive incoming message sends.
\r
1391 /****f* Access Layer/ib_create_qp
\r
1396 * Creates a queue pair and returns its handle to the user.
\r
1400 AL_EXPORT ib_api_status_t AL_API
\r
1402 IN const ib_pd_handle_t h_pd,
\r
1403 IN const ib_qp_create_t* const p_qp_create,
\r
1404 IN const void* const qp_context,
\r
1405 IN const ib_pfn_event_cb_t pfn_qp_event_cb OPTIONAL,
\r
1406 OUT ib_qp_handle_t* const ph_qp );
\r
1410 * [in] This is a handle to a protection domain associated with the queue
\r
1414 * [in] Attributes necessary to allocate and initialize the queue pair.
\r
1417 * [in] A user-specified context information associated with the
\r
1421 * [in] User-specified error callback routine invoked after an
\r
1422 * asynchronous event has occurred on the queue pair.
\r
1425 * [out] Upon successful completion of this call, this references a
\r
1426 * handle to the newly created queue pair.
\r
1430 * The queue pair was successfully created.
\r
1432 * IB_INVALID_PD_HANDLE
\r
1433 * The protection domain to associate with the queue pair was invalid.
\r
1435 * IB_INVALID_PARAMETER
\r
1436 * A reference to the queue pair attributes or handle was not provided.
\r
1438 * IB_INSUFFICIENT_MEMORY
\r
1439 * There was insufficient memory to create the queue pair.
\r
1441 * IB_INSUFFICIENT_RESOURCES
\r
1442 * There were insufficient resources currently available on the channel
\r
1443 * adapter to create the queue pair.
\r
1445 * IB_INVALID_CQ_HANDLE
\r
1446 * The send or receive completion queue to associate with the queue pair
\r
1449 * IB_INVALID_SRQ_HANDLE
\r
1450 * The shared receive queue to be associated with the queue pair
\r
1453 * IB_INVALID_SETTING
\r
1454 * The specified queue pair creation attributes are invalid.
\r
1457 * The specified queue pair type was not supported by the channel adapter.
\r
1459 * IB_INVALID_MAX_WRS
\r
1460 * The requested maximum send or receive work request depth could not be
\r
1463 * IB_INVALID_MAX_SGE
\r
1464 * The requested maximum number of scatter-gather entries for the send or
\r
1465 * receive queue could not be supported.
\r
1468 * 1. This routine allocates a queue pair with the specified attributes. If
\r
1469 * the queue pair cannot be allocated, an error is returned. When creating
\r
1470 * the queue pair, users associate a context with the queue pair. This
\r
1471 * context is returned to the user through the asynchronous event callback
\r
1472 * if an event occurs.
\r
1474 * 2. For QPs that are associated with an SRQ, the Consumer should take
\r
1475 * the QP through the Error State before invoking a Destroy QP or a Modify
\r
1476 * QP to the Reset State. The Consumer may invoke the Destroy QP without
\r
1477 * first performing a Modify QP to the Error State and waiting for the Affiliated
\r
1478 * Asynchronous Last WQE Reached Event. However, if the Consumer
\r
1479 * does not wait for the Affiliated Asynchronous Last WQE Reached Event,
\r
1480 * then WQE and Data Segment leakage may occur.
\r
1482 * 3. This routine is used to create queue pairs of type:
\r
1483 * IB_QPT_RELIABLE_CONN
\r
1484 * IB_QPT_UNRELIABLE_CONN
\r
1485 * IB_QPT_UNRELIABLE_DGRM
\r
1488 * 4. Callers of ib_create_qp should call ib_init_dgrm_svc if the queue pair
\r
1489 * is of type IB_QPT_UNRELIABLE_DGRM or IB_QPT_MAD before sending or
\r
1490 * receiving data. IB_QPT_RELIABLE_CONN, IB_QPT_UNRELIABLE_CONN type
\r
1491 * queue pairs should be used by the connection establishment process
\r
1492 * before data may be sent or received on the QP.
\r
1494 * This call does not return the QP attributes as MAD QPs do not support
\r
1495 * such an operation. This is a minor specification deviation.
\r
1498 * ib_query_qp, ib_modify_qp, ib_destroy_qp, ib_cm_req, ib_cm_rep, ib_cm_rtu
\r
1499 * ib_init_dgrm_svc, ib_qp_create_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1503 /****f* Access Layer/ib_get_spl_qp
\r
1508 * Create a special QP or QP alias. This call provides access to queue
\r
1509 * pairs 0 and 1, and the raw queue pair types.
\r
1513 AL_EXPORT ib_api_status_t AL_API
\r
1515 IN const ib_pd_handle_t h_pd,
\r
1516 IN const ib_net64_t port_guid,
\r
1517 IN const ib_qp_create_t* const p_qp_create,
\r
1518 IN const void* const qp_context,
\r
1519 IN const ib_pfn_event_cb_t pfn_qp_event_cb OPTIONAL,
\r
1520 OUT ib_pool_key_t* const p_pool_key OPTIONAL,
\r
1521 OUT ib_qp_handle_t* const ph_qp );
\r
1525 * [in] This is a handle to a protection domain associated with the queue
\r
1526 * pair. This must be a protection domain alias for aliased QP types.
\r
1529 * [in] The port GUID that the special QP will be associated with.
\r
1532 * [in] Attributes necessary to allocate and initialize the queue pair.
\r
1535 * [in] A user-specified context information associated with the
\r
1538 * pfn_qp_ervent_cb
\r
1539 * [in] User-specified error callback routine invoked after an
\r
1540 * asynchronous event has occurred on the queue pair.
\r
1543 * [in] A key to a pool of MAD elements that are used to send MADs.
\r
1544 * This key is only valid for aliased QP types.
\r
1547 * [out] Upon successful completion of this call, this references a
\r
1548 * handle to the newly created queue pair.
\r
1552 * The queue pair was successfully created.
\r
1554 * IB_INVALID_PD_HANDLE
\r
1555 * The protection domain to associate with the queue pair was invalid.
\r
1558 * The port number supplied was invalid for the given channel adapter.
\r
1560 * IB_INVALID_PARAMETER
\r
1561 * A reference to the queue pair attributes or handle was not provided.
\r
1563 * IB_INVALID_PERMISSION
\r
1564 * The calling process does not have sufficient privilege to create the
\r
1565 * requested queue pair type.
\r
1567 * IB_INSUFFICIENT_MEMORY
\r
1568 * There was insufficient memory to create the queue pair.
\r
1570 * IB_INSUFFICIENT_RESOURCES
\r
1571 * There were insufficient resources currently available on the channel
\r
1572 * adapter to create the queue pair.
\r
1574 * IB_INVALID_CQ_HANDLE
\r
1575 * The send or receive completion queue to associate with the queue pair
\r
1578 * IB_INVALID_SETTING
\r
1579 * The specified queue pair type was invalid.
\r
1582 * The specified queue pair type was not supported by the channel adapter.
\r
1584 * IB_INVALID_MAX_WRS
\r
1585 * The requested maximum send or receive work request depth could not be
\r
1588 * IB_INVALID_MAX_SGE
\r
1589 * The requested maximum number of scatter-gather entries for the send or
\r
1590 * receive queue could not be supported.
\r
1593 * This routine allocates a queue pair with the specified attributes. If
\r
1594 * the queue pair cannot be allocated, an error is returned. When creating
\r
1595 * the queue pair, users associate a context with the queue pair. This
\r
1596 * context is returned to the user through the asynchronous event callback
\r
1597 * if an event occurs.
\r
1599 * This routine is used to create queue pairs of type:
\r
1604 * IB_QPT_RAW_ETHER
\r
1605 * IB_QPT_QP0_ALIAS
\r
1606 * IB_QPT_QP1_ALIAS
\r
1608 * Callers of ib_get_spl_qp should call ib_init_dgrm_svc if the queue pair is
\r
1609 * of type IB_QPT_QP0, IB_QPT_QP1, IB_QPT_RAW_IPV6, IB_QPT_RAW_ETHER before
\r
1610 * sending or receiving data. MADs may be sent on aliased QPs on the
\r
1611 * successful return of this routine.
\r
1614 * ib_query_qp, ib_modify_qp, ib_destroy_qp, ib_get_mad
\r
1615 * ib_init_dgrm_svc, ib_qp_create_t, ib_pfn_event_cb_t, ib_qp_attr_t
\r
1619 /****f* Access Layer/ib_query_qp
\r
1624 * Query the current attributes of the queue pair.
\r
1628 AL_EXPORT ib_api_status_t AL_API
\r
1630 IN const ib_qp_handle_t h_qp,
\r
1631 OUT ib_qp_attr_t* const p_qp_attr );
\r
1635 * [in] A handle to an existing queue pair.
\r
1638 * [out] Upon successful completion of this call, the structure
\r
1639 * referenced by this parameter contains the attributes of the specified
\r
1644 * The queue pair attributes were returned successfully.
\r
1646 * IB_INVALID_QP_HANDLE
\r
1647 * The queue pair handle was invalid.
\r
1649 * IB_INVALID_PARAMETER
\r
1650 * A reference to the queue pair attributes structure was not provided.
\r
1653 * This routine returns information about the specified queue pair.
\r
1656 * ib_create_qp, ib_modify_qp, ib_qp_attr_t
\r
1660 /****f* Access Layer/ib_modify_qp
\r
1665 * Modifies the attributes of an existing queue pair.
\r
1669 AL_EXPORT ib_api_status_t AL_API
\r
1671 IN const ib_qp_handle_t h_qp,
\r
1672 IN const ib_qp_mod_t* const p_qp_mod );
\r
1676 * [in] A handle to an existing queue pair.
\r
1679 * [in] The new attributes to use when modifying the queue pair.
\r
1683 * The queue pair was successfully modified.
\r
1685 * IB_INVALID_QP_HANDLE
\r
1686 * The queue pair handle was invalid.
\r
1688 * IB_INVALID_PARAMETER
\r
1689 * A reference to the queue pair attributes was not provided.
\r
1691 * IB_INVALID_SETTING
\r
1692 * The specified queue pair attributes were invalid.
\r
1694 * IB_INSUFFICIENT_RESOURCES
\r
1695 * There were insufficient resources currently available on the channel
\r
1696 * adapter to register the modify the queue pair.
\r
1699 * The requested modification was not supported.
\r
1701 * IB_INVALID_QP_STATE
\r
1702 * The queue pair was in an invalid state for the requested operation.
\r
1705 * The specified pkey was not valid.
\r
1707 * IB_INVALID_APM_STATE
\r
1708 * The specified automatic path migration state was not valid.
\r
1711 * This routine modifies the attributes of an existing queue pair and
\r
1712 * transitions it to a new state. The new state and attributes are
\r
1713 * specified through the p_qp_mod parameter. Upon successful completion,
\r
1714 * the queue pair is in the requested state.
\r
1717 * ib_create_qp, ib_destroy_qp, ib_qp_mod_t
\r
1721 /****f* Access Layer/ib_destroy_qp
\r
1726 * Release a queue pair. Once destroyed, no further access to this
\r
1727 * queue pair is possible.
\r
1731 AL_EXPORT ib_api_status_t AL_API
\r
1733 IN const ib_qp_handle_t h_qp,
\r
1734 IN const ib_pfn_destroy_cb_t pfn_destroy_cb OPTIONAL );
\r
1738 * [in] A handle to an existing queue pair.
\r
1741 * [in] A user-specified callback that is invoked after the queue pair
\r
1742 * has been successfully destroyed.
\r
1746 * The destroy request was registered.
\r
1748 * IB_INVALID_QP_HANDLE
\r
1749 * The queue pair handle was invalid.
\r
1752 * This call destroys an existing queue pair. Since callbacks may be
\r
1753 * outstanding against the queue pair at the time the destroy operation is
\r
1754 * invoked, the this call operates asynchronously. The user will be notified
\r
1755 * through a callback once the destroy operation completes, indicating that
\r
1756 * no additional callbacks will be invoked for the specified queue pair.
\r
1763 /****s* Access Layer/ib_cq_create_t
\r
1768 * Attributes used to initialize a completion queue at creation time.
\r
1772 typedef struct _ib_cq_create
\r
1775 ib_pfn_comp_cb_t pfn_comp_cb;
\r
1776 cl_waitobj_handle_t h_wait_obj;
\r
1782 * Specifies the maximum number of work completions that may be on the
\r
1783 * completion queue. If the creation call is successful, the actual
\r
1784 * size of the completion queue will be returned. The actual size of
\r
1785 * the CQ will be greater than or equal to the requested size.
\r
1788 * A callback that is invoked whenever a signaled completion occurs on
\r
1789 * the completion queue. This field is mutually exclusive with the
\r
1793 * A wait object that is triggered whenever a signaled completion occurs
\r
1794 * on the completion queue. This field is mutually exclusive with the
\r
1795 * pfn_comp_cb field and is only valid for user-mode clients. The wait
\r
1796 * object must be ready for use when the call to ib_create_cq is invoked.
\r
1799 * Clients must specify either an event or a callback when creating a
\r
1800 * completion queue. When a signaled completion occurs on the completion
\r
1801 * queue, the client will be notified through the callback or by
\r
1802 * signaling the specified event.
\r
1805 * ib_create_cq, ib_pfn_comp_cb_t
\r
1809 /****f* Access Layer/ib_create_cq
\r
1814 * Creates a completion queue and returns its handle to the user.
\r
1818 AL_EXPORT ib_api_status_t AL_API
\r
1820 IN const ib_ca_handle_t h_ca,
\r
1821 IN OUT ib_cq_create_t* const p_cq_create,
\r
1822 IN const void* const cq_context,
\r
1823 IN const ib_pfn_event_cb_t pfn_cq_event_cb OPTIONAL,
\r
1824 OUT ib_cq_handle_t* const ph_cq );
\r
1828 * [in] A handle to an open channel adapter.
\r
1831 * [in] Attributes necessary to allocate and initialize the
\r
1832 * completion queue.
\r
1835 * [in] A user-specified context associated with the completion queue.
\r
1838 * [in] User-specified error callback routine invoked after an
\r
1839 * asynchronous event has occurred on the completion queue.
\r
1842 * [out] Upon successful completion of this call, this references a
\r
1843 * handle to the newly created completion queue.
\r
1847 * The completion queue was successfully created.
\r
1849 * IB_INVALID_CA_HANDLE
\r
1850 * The channel adapter handle was invalid.
\r
1852 * IB_INVALID_PARAMETER
\r
1853 * A reference to the completion queue attributes or handle was not
\r
1856 * IB_INVALID_SETTING
\r
1857 * The specified attributes that should be used to create the completion
\r
1858 * queue are invalid. Both completion callback and wait object
\r
1859 * information were supplied or are missing.
\r
1861 * IB_INSUFFICIENT_MEMORY
\r
1862 * There was insufficient memory to create the completion queue.
\r
1864 * IB_INSUFFICIENT_RESOURCES
\r
1865 * There were insufficient resources currently available on the channel
\r
1866 * adapter to create the completion queue.
\r
1868 * IB_INVALID_CQ_SIZE
\r
1869 * The requested size of the completion queue was larger than the
\r
1870 * maximum supported by the associated channel adapter.
\r
1873 * This routine allocates a completion queue on the specified channel
\r
1874 * adapter. If the completion queue cannot be allocated, an error is
\r
1875 * returned. When creating the completion queue, users associate a context
\r
1876 * with the completion queue. This context is returned to the user through
\r
1877 * the completion and asynchronous event callbacks.
\r
1880 * ib_query_cq, ib_modify_cq, ib_destroy_cq, ib_cq_create_t, ib_pfn_event_cb_t
\r
1884 /****f* Access Layer/ib_modify_cq
\r
1889 * Modifies the attributes associated with a completion queue, allowing the
\r
1890 * completion queue to be resized.
\r
1894 AL_EXPORT ib_api_status_t AL_API
\r
1896 IN const ib_cq_handle_t h_cq,
\r
1897 IN OUT uint32_t* const p_size );
\r
1901 * [in] A handle to an existing completion queue.
\r
1904 * [in/out] Specifies the new size of the completion queue. If the
\r
1905 * modify call is successful, the actual size of the completion queue
\r
1906 * will be returned. The actual size of the CQ will be greater than or
\r
1907 * equal to the requested size.
\r
1911 * The completion queue was successfully modified.
\r
1913 * IB_INVALID_CQ_HANDLE
\r
1914 * The completion queue handle was invalid.
\r
1916 * IB_INVALID_PARAMETER
\r
1917 * A reference to the completion queue size was not provided.
\r
1919 * IB_INVALID_CQ_SIZE
\r
1920 * The requested size of the completion queue was larger than the
\r
1921 * maximum supported by the associated channel adapter.
\r
1924 * The specified size of the completion queue is smaller than the number
\r
1925 * of work completions currently on the completion queue.
\r
1927 * IB_INSUFFICIENT_MEMORY
\r
1928 * There was insufficient memory to modify the completion queue.
\r
1931 * This routine allows a client to modify the size of a completion queue.
\r
1932 * If the new size is larger than what the associated channel adapter can
\r
1933 * support, an error is returned. If the completion queue has valid
\r
1934 * completion entries on it and the requested size is smaller than the
\r
1935 * number of entries, an overflow error is returned and the modify
\r
1936 * operation is aborted.
\r
1943 /****f* Access Layer/ib_query_cq
\r
1948 * Returns information about the specified completion queue.
\r
1952 AL_EXPORT ib_api_status_t AL_API
\r
1954 IN const ib_cq_handle_t h_cq,
\r
1955 OUT uint32_t* const p_size );
\r
1959 * [in] A handle to an existing completion queue.
\r
1962 * [out] Upon successful completion of this call, contains the actual
\r
1963 * size of the completion queue.
\r
1967 * The completion queue was successfully queried.
\r
1969 * IB_INVALID_CQ_HANDLE
\r
1970 * The completion queue handle was invalid.
\r
1972 * IB_INVALID_PARAMETER
\r
1973 * A reference to the completion queue size was not provided.
\r
1980 /****f* Access Layer/ib_destroy_cq
\r
1985 * Destroys a completion queue. Once destroyed, no further access to the
\r
1986 * completion queue is possible.
\r
1990 AL_EXPORT ib_api_status_t AL_API
\r
1992 IN const ib_cq_handle_t h_cq,
\r
1993 IN const ib_pfn_destroy_cb_t pfn_destroy_cb OPTIONAL );
\r
1997 * [in] A handle to an existing completion queue.
\r
2000 * [in] A user-provided callback that is invoked after the
\r
2001 * completion queue has been successfully destroyed.
\r
2005 * The destroy request was registered.
\r
2007 * IB_INVALID_CQ_HANDLE
\r
2008 * The completion queue handle was invalid.
\r
2011 * This call destroys an existing completion queue. Since callbacks may be
\r
2012 * outstanding against the completion queue at the time the destroy operation
\r
2013 * is invoked, the this call operates asynchronously. The user will be
\r
2014 * notified through a callback once the destroy operation completes,
\r
2015 * indicating that no additional callbacks will be invoked for the specified
\r
2016 * completion queue.
\r
2018 * If there are still queue pairs associated with the completion queue when
\r
2019 * this function is invoked, the destroy operation will fail with status
\r
2020 * IB_RESOURCE_BUSY.
\r
2023 * ib_create_cq, ib_pfn_destroy_cb_t
\r
2027 /****f* Access Layer/ib_reg_mem
\r
2032 * Registers a virtual memory region with a channel adapter.
\r
2036 AL_EXPORT ib_api_status_t AL_API
\r
2038 IN const ib_pd_handle_t h_pd,
\r
2039 IN const ib_mr_create_t* const p_mr_create,
\r
2040 OUT net32_t* const p_lkey,
\r
2041 OUT net32_t* const p_rkey,
\r
2042 OUT ib_mr_handle_t* const ph_mr );
\r
2046 * [in] A handle to an existing protection domain that the memory
\r
2047 * should be registered with.
\r
2050 * [in] Information describing the memory region to register.
\r
2053 * [out] The local access key associated with this registered memory
\r
2057 * [out] A key that may be used by a remote end-point when performing
\r
2058 * RDMA or atomic operations to this registered memory region.
\r
2061 * [out] Upon successful completion of this call, this references a
\r
2062 * handle to the registered memory region. This handle is used when
\r
2063 * performing data transfers and to deregister the memory.
\r
2067 * The memory region was successfully registered.
\r
2069 * IB_INVALID_PD_HANDLE
\r
2070 * The protection domain to associate with the memory region was invalid.
\r
2072 * IB_INVALID_PARAMETER
\r
2073 * A reference to the memory region information, lkey, rkey, or handle
\r
2074 * was not provided.
\r
2076 * IB_INSUFFICIENT_MEMORY
\r
2077 * There was insufficient memory to register the memory region.
\r
2079 * IB_INSUFFICIENT_RESOURCES
\r
2080 * There were insufficient resources currently available on the channel
\r
2081 * adapter to register the memory region.
\r
2084 * The requested access rights are not supported by the channel adapter.
\r
2086 * IB_INVALID_PERMISSION
\r
2087 * The requested access rights are invalid.
\r
2090 * This routine registers a virtual memory region with a channel adapter.
\r
2091 * Memory must be registered before being used in a data transfer operation.
\r
2094 * ib_dereg_mr, ib_reg_phys, ib_reg_shared, ib_mr_create_t
\r
2098 /****f* Access Layer/ib_reg_phys
\r
2103 * Registers a physical memory region with a channel adapter.
\r
2107 AL_EXPORT ib_api_status_t AL_API
\r
2109 IN const ib_pd_handle_t h_pd,
\r
2110 IN const ib_phys_create_t* const p_phys_create,
\r
2111 IN OUT uint64_t* const p_vaddr,
\r
2112 OUT net32_t* const p_lkey,
\r
2113 OUT net32_t* const p_rkey,
\r
2114 OUT ib_mr_handle_t* const ph_mr );
\r
2118 * [in] A handle to an existing protection domain that the memory
\r
2119 * should be registered with.
\r
2122 * [in] Information describing the memory region to register.
\r
2125 * [in/out] On input, references the requested virtual address for the
\r
2126 * start of the physical region. On output, references the actual
\r
2127 * virtual address assigned to the registered region.
\r
2130 * [out] The local access key associated with this registered memory
\r
2134 * [out] A key that may be used by a remote end-point when performing
\r
2135 * RDMA or atomic operations to this registered memory region.
\r
2138 * [out] Upon successful completion of this call, this references a
\r
2139 * handle to the registered memory region. This handle is used when
\r
2140 * performing data transfers and to deregister the memory.
\r
2144 * The physical memory region was successfully registered.
\r
2146 * IB_INVALID_PD_HANDLE
\r
2147 * The protection domain to associate with the physical memory region
\r
2150 * IB_INVALID_PARAMETER
\r
2151 * A reference to the physical memory region information, virtual address,
\r
2152 * lkey, rkey, or handle was not provided.
\r
2154 * IB_INSUFFICIENT_MEMORY
\r
2155 * There was insufficient memory to register the physical memory region.
\r
2157 * IB_INSUFFICIENT_RESOURCES
\r
2158 * There were insufficient resources currently available on the channel
\r
2159 * adapter to register the physical memory region.
\r
2162 * The requested access rights are not supported by the channel adapter.
\r
2164 * IB_INVALID_PERMISSION
\r
2165 * The requested access rights are invalid.
\r
2168 * This routine registers an array of physical pages as a single virtually
\r
2169 * contiguous region with a channel adapter. Memory must be registered
\r
2170 * before being used in a data transfer operation.
\r
2173 * ib_dereg_mr, ib_reg_mem, ib_reg_shared, ib_phys_create_t
\r
2177 /****f* Access Layer/ib_query_mr
\r
2182 * Query the current attributes of a memory region.
\r
2186 AL_EXPORT ib_api_status_t AL_API
\r
2188 IN const ib_mr_handle_t h_mr,
\r
2189 OUT ib_mr_attr_t* const p_mr_attr );
\r
2193 * [in] A handle to a registered memory region.
\r
2196 * [out] A reference to a structure where the registered memory attributes
\r
2201 * The memory region attributes were returned successfully.
\r
2203 * IB_INVALID_MR_HANDLE
\r
2204 * The memory region handle was invalid.
\r
2206 * IB_INVALID_PARAMETER
\r
2207 * A reference to the memory region attributes was not provided.
\r
2210 * This routine returns information about the specified registered memory
\r
2214 * ib_dereg_mr, ib_reg_mem, ib_reg_shared, ib_mr_attr_t
\r
2218 /****f* Access Layer/ib_rereg_mem
\r
2223 * Modifies the attributes of an existing memory region.
\r
2227 AL_EXPORT ib_api_status_t AL_API
\r
2229 IN const ib_mr_handle_t h_mr,
\r
2230 IN const ib_mr_mod_t mr_mod_mask,
\r
2231 IN const ib_mr_create_t* const p_mr_create OPTIONAL,
\r
2232 OUT net32_t* const p_lkey,
\r
2233 OUT net32_t* const p_rkey,
\r
2234 IN const ib_pd_handle_t h_pd OPTIONAL );
\r
2238 * [in] A handle to the registered memory region being modified.
\r
2241 * [in] A mask used to specify which attributes of the memory region are
\r
2245 * [in] This references information needed to perform the modification on
\r
2246 * the registered memory region. This parameter may be NULL if only the
\r
2247 * protection domain will be modified.
\r
2250 * [out] The local access key associated with this registered memory
\r
2254 * [out] A key that may be used by a remote end-point when performing RDMA
\r
2255 * or atomic operations to this registered memory region.
\r
2258 * [in] An optionally provided parameter used to modify the protection
\r
2259 * domain of a registered region.
\r
2263 * The memory region attributes were modified successfully.
\r
2265 * IB_INVALID_MR_HANDLE
\r
2266 * The memory region handle was invalid.
\r
2268 * IB_INVALID_PARAMETER
\r
2269 * A reference to the lkey or rkey was not provided or the specified
\r
2270 * modify mask is invalid.
\r
2272 * IB_INVALID_SETTING
\r
2273 * The specified memory region attributes are invalid.
\r
2275 * IB_INVALID_PD_HANDLE
\r
2276 * The protection domain handle was invalid.
\r
2278 * IB_INSUFFICIENT_RESOURCES
\r
2279 * There were insufficient resources currently available on the channel
\r
2280 * adapter to modify the memory region.
\r
2283 * The requested access rights are not supported by the channel adapter.
\r
2285 * IB_INVALID_PERMISSION
\r
2286 * The requested access rights are invalid.
\r
2288 * IB_RESOURCE_BUSY
\r
2289 * The memory region has windows bound to it.
\r
2292 * This routine modifies the attributes of the specified memory region.
\r
2293 * The memory being modified may have been registered using either virtual
\r
2294 * or physical registration. Conceptually, this routine is equivalent to
\r
2295 * to calling ib_dereg_mr, followed by ib_reg_mem, but may be higher
\r
2299 * ib_reg_mem, ib_reg_phys, ib_dereg_mr, ib_mr_mod_t, ib_mr_create_t
\r
2303 /****f* Access Layer/ib_rereg_phys
\r
2308 * Modifies the attributes of an existing memory region.
\r
2312 AL_EXPORT ib_api_status_t AL_API
\r
2314 IN const ib_mr_handle_t h_mr,
\r
2315 IN const ib_mr_mod_t mr_mod_mask,
\r
2316 IN const ib_phys_create_t* const p_phys_create OPTIONAL,
\r
2317 IN OUT uint64_t* const p_vaddr,
\r
2318 OUT net32_t* const p_lkey,
\r
2319 OUT net32_t* const p_rkey,
\r
2320 IN const ib_pd_handle_t h_pd OPTIONAL );
\r
2324 * [in] A handle to the registered memory region being modified.
\r
2327 * [in] A mask used to specify which attributes of the memory region are
\r
2331 * [in] This references information needed to perform the modification on
\r
2332 * the registered memory region. This parameter may be NULL if
\r
2333 * only the protection domain will be modified.
\r
2336 * [in/out] On input, this specifies the requested virtual address for the
\r
2337 * start of the physical region. On output, this references the actual
\r
2338 * virtual address assigned to the registered region.
\r
2341 * [out] The local access key associated with this registered memory
\r
2345 * [out] A key that may be used by a remote end-point when performing RDMA
\r
2346 * or atomic operations to this registered memory region.
\r
2349 * [in] An optionally provided parameter used to modify the protection
\r
2350 * domain of a registered region.
\r
2354 * The memory region attributes were modified successfully.
\r
2356 * IB_INVALID_MR_HANDLE
\r
2357 * The memory region handle was invalid.
\r
2359 * IB_INVALID_PARAMETER
\r
2360 * A reference to the virtual address, lkey, rkey was not provided or
\r
2361 * the specified modify mask is invalid.
\r
2363 * IB_INVALID_SETTING
\r
2364 * The specified memory region attributes are invalid.
\r
2366 * IB_INVALID_PD_HANDLE
\r
2367 * The protection domain handle was invalid.
\r
2369 * IB_INSUFFICIENT_RESOURCES
\r
2370 * There were insufficient resources currently available on the channel
\r
2371 * adapter to modify the memory region.
\r
2374 * The requested access rights are not supported by the channel adapter.
\r
2376 * IB_INVALID_PERMISSION
\r
2377 * The requested access rights are invalid.
\r
2379 * IB_RESOURCE_BUSY
\r
2380 * The memory region has windows bound to it.
\r
2383 * This routine modifies the attributes of the specified memory region.
\r
2384 * The memory being modified may have been registered using either virtual
\r
2385 * or physical registration. Conceptually, this routine is equivalent to
\r
2386 * to calling ib_dereg_mr, followed by ib_reg_phys, but may be higher
\r
2390 * ib_reg_mem, ib_reg_phys, ib_dereg_mr, ib_mr_mod_t, ib_mr_create_t
\r
2394 /****f* Access Layer/ib_reg_shared
\r
2399 * Registers a memory region that has the same physical pages as an
\r
2400 * existing registered memory region.
\r
2404 AL_EXPORT ib_api_status_t AL_API
\r
2406 IN const ib_mr_handle_t h_mr,
\r
2407 IN const ib_pd_handle_t h_pd,
\r
2408 IN const ib_access_t access_ctrl,
\r
2409 IN OUT uint64_t* const p_vaddr,
\r
2410 OUT net32_t* const p_lkey,
\r
2411 OUT net32_t* const p_rkey,
\r
2412 OUT ib_mr_handle_t* const ph_mr );
\r
2416 * [in] A handle to an existing registered memory region that this
\r
2417 * registration should share physical pages with.
\r
2420 * [in] Handle to the PD on which memory is being registered
\r
2423 * [in] Access rights of the registered region.
\r
2426 * [in/out] On input, this specifies the requested virtual address for the
\r
2427 * start of the physical region. On output, this references the actual
\r
2428 * virtual address assigned to the registered region. This is always a
\r
2429 * 64-bit quantity to support registering more than 4GB of memory on
\r
2430 * 32-bit systems with PAE.
\r
2433 * [out] The local access key associated with this registered memory
\r
2437 * [out] A key that may be used by a remote end-point when performing RDMA
\r
2438 * or atomic operations to this registered memory region.
\r
2441 * [out] Upon successful completion of this call, this references a handle
\r
2442 * to the registered memory region. This handle is used when performing
\r
2443 * data transfers and to deregister the memory.
\r
2447 * The shared memory region was successfully registered.
\r
2449 * IB_INVALID_MR_HANDLE
\r
2450 * The memory region handle was invalid.
\r
2452 * IB_INVALID_PD_HANDLE
\r
2453 * The protection domain handle was invalid.
\r
2455 * IB_INVALID_PARAMETER
\r
2456 * A reference to the virtual address, lkey, rkey, or handle was not
\r
2459 * IB_INSUFFICIENT_MEMORY
\r
2460 * There was insufficient memory to register the shared memory region.
\r
2462 * IB_INSUFFICIENT_RESOURCES
\r
2463 * There were insufficient resources currently available on the channel
\r
2464 * adapter to register the shared memory region.
\r
2467 * The requested access rights are not supported by the channel adapter.
\r
2469 * IB_INVALID_PERMISSION
\r
2470 * The requested access rights are invalid.
\r
2473 * This routine registers a memory region that shares the same set of
\r
2474 * physical pages associated with an existing registered memory region.
\r
2477 * ib_dereg_mr, ib_reg_mem, ib_reg_phys, ib_reg_shared, ib_mr_create_t
\r
2481 /****f* Access Layer/ib_reg_shmid
\r
2486 * Registers a memory region to be shared across multiple processes.
\r
2487 * The memory is referenced by a shared memory identifier.
\r
2491 AL_EXPORT ib_api_status_t AL_API
\r
2493 IN const ib_pd_handle_t h_pd,
\r
2494 IN const ib_shmid_t shmid,
\r
2495 IN const ib_mr_create_t* const p_mr_create,
\r
2496 OUT uint64_t* const p_vaddr,
\r
2497 OUT net32_t* const p_lkey,
\r
2498 OUT net32_t* const p_rkey,
\r
2499 OUT ib_mr_handle_t* const ph_mr );
\r
2503 * [in] A handle to an existing protection domain that the memory
\r
2504 * should be registered with.
\r
2507 * [in] An identifier for the shared memory region.
\r
2510 * [in] Information describing the attributes of the memory region to
\r
2514 * [out] The HCA assigned, HCA relative virtual address for the
\r
2518 * [out] The local access key associated with this registered memory
\r
2522 * [out] A key that may be used by a remote end-point when performing RDMA
\r
2523 * or atomic operations to this registered memory region.
\r
2526 * [out] Upon successful completion of this call, this references a handle
\r
2527 * to the registered memory region. This handle is used when performing
\r
2528 * data transfers and to deregister the memory.
\r
2532 * The shared memory region was successfully registered.
\r
2534 * IB_INVALID_PD_HANDLE
\r
2535 * The protection domain handle was invalid.
\r
2537 * IB_INVALID_PARAMETER
\r
2538 * A reference to the memory region information, lkey, rkey, or handle
\r
2539 * was not provided.
\r
2541 * IB_INVALID_SETTING
\r
2542 * The length and page mapping for the memory region do not match those
\r
2543 * of the region identified by the provided SHMID.
\r
2545 * IB_INSUFFICIENT_MEMORY
\r
2546 * There was insufficient memory to register the shared memory region.
\r
2548 * IB_INSUFFICIENT_RESOURCES
\r
2549 * There were insufficient resources currently available on the channel
\r
2550 * adapter to register the shared memory region.
\r
2553 * The requested access rights are not supported by the channel adapter.
\r
2555 * IB_INVALID_PERMISSION
\r
2556 * The requested access rights are invalid.
\r
2559 * This routine registers a memory region that is shared between processes.
\r
2560 * The region being registered is identified through a shared memory
\r
2561 * identifier. The registered region shares hardware resources as much
\r
2565 * ib_dereg_mr, ib_reg_mem, ib_reg_shared, ib_mr_create_t
\r
2569 /****f* Access Layer/ib_dereg_mr
\r
2574 * Deregisters a registered memory region.
\r
2578 AL_EXPORT ib_api_status_t AL_API
\r
2580 IN const ib_mr_handle_t h_mr );
\r
2584 * [in] A handle to a registered memory region that will be unregistered.
\r
2588 * The memory region was successfully deregistered.
\r
2590 * IB_INVALID_MR_HANDLE
\r
2591 * The memory region handle was invalid.
\r
2593 * IB_RESOURCE_BUSY
\r
2594 * The memory region has memory windows bound to it.
\r
2597 * This routine deregisters a memory region with a channel adapter. The
\r
2598 * region may be deregistered only if there are no memory windows or
\r
2599 * existing shared memory regions currently bound to the region. Work
\r
2600 * requests referencing this region when it is deregistered will fail
\r
2601 * with a WRS_LOCAL_PROTECTION_ERR error.
\r
2604 * ib_reg_mem, ib_reg_phys, ib_reg_shared
\r
2610 /****f* Access Layer/mlnx_create_fmr
\r
2615 * Creates a Mellanox fast memory region.
\r
2619 AL_EXPORT ib_api_status_t AL_API
\r
2621 IN const ib_pd_handle_t h_pd,
\r
2622 IN const mlnx_fmr_create_t* const p_fmr_create,
\r
2623 OUT mlnx_fmr_handle_t* const ph_fmr );
\r
2627 * [in] An optionally provided parameter used to modify the protection
\r
2628 * domain of a registered region.
\r
2630 * [in] This references information needed to perform the modification on
\r
2631 * the registered memory region. This parameter may be NULL if only the
\r
2632 * protection domain will be modified.
\r
2634 * [out] A handle to the registered memory region being modified.
\r
2638 * The memory region attributes were modified successfully.
\r
2640 * IB_INVALID_MR_HANDLE
\r
2641 * The memory region handle was invalid.
\r
2643 * IB_INVALID_PARAMETER
\r
2644 * A reference to the lkey or rkey was not provided or the specified
\r
2645 * modify mask is invalid.
\r
2647 * IB_INVALID_SETTING
\r
2648 * The specified memory region attributes are invalid.
\r
2650 * IB_INVALID_PD_HANDLE
\r
2651 * The protection domain handle was invalid.
\r
2653 * IB_INSUFFICIENT_RESOURCES
\r
2654 * There were insufficient resources currently available on the channel
\r
2655 * adapter to modify the memory region.
\r
2658 * The requested access rights are not supported by the channel adapter.
\r
2660 * IB_INVALID_PERMISSION
\r
2661 * The requested access rights are invalid.
\r
2663 * IB_RESOURCE_BUSY
\r
2664 * The memory region has windows bound to it.
\r
2667 * This is a Mellanox specific extension to verbs.
\r
2670 * mlnx_destroy_fmr, mlnx_fmr_create_t
\r
2674 /****f* Access Layer/mlnx_map_fmr
\r
2683 AL_EXPORT ib_api_status_t AL_API
\r
2684 mlnx_map_phys_fmr(
\r
2685 IN const mlnx_fmr_handle_t h_fmr,
\r
2686 IN const uint64_t* const paddr_list,
\r
2687 IN const int list_len,
\r
2688 IN OUT uint64_t* const p_vaddr,
\r
2689 OUT net32_t* const p_lkey,
\r
2690 OUT net32_t* const p_rkey );
\r
2694 * [in] Handle to the fast memory region that these pages map to
\r
2696 * [in] array of phys address
\r
2698 * [in] number of pages in the list
\r
2700 * [in/out] On input, references the requested virtual address for the
\r
2701 * start of the FMR. On output, references the actual
\r
2702 * virtual address assigned to the FMR.
\r
2704 * [out] The local access key associated with this registered memory
\r
2707 * [out] A key that may be used by a remote end-point when performing
\r
2708 * RDMA or atomic operations to this registered memory region.
\r
2712 * The memory region attributes were modified successfully.
\r
2714 * IB_INVALID_MR_HANDLE
\r
2715 * The memory region handle was invalid.
\r
2717 * IB_INVALID_PARAMETER
\r
2718 * A reference to the lkey or rkey was not provided or the specified
\r
2719 * modify mask is invalid.
\r
2721 * IB_INVALID_SETTING
\r
2722 * The specified memory region attributes are invalid.
\r
2724 * IB_INVALID_PD_HANDLE
\r
2725 * The protection domain handle was invalid.
\r
2727 * IB_INSUFFICIENT_RESOURCES
\r
2728 * There were insufficient resources currently available on the channel
\r
2729 * adapter to modify the memory region.
\r
2732 * The requested access rights are not supported by the channel adapter.
\r
2734 * IB_INVALID_PERMISSION
\r
2735 * The requested access rights are invalid.
\r
2737 * IB_RESOURCE_BUSY
\r
2738 * The memory region has windows bound to it.
\r
2741 * This is a Mellanox specific extension to verbs.
\r
2744 * mlnx_destroy_fmr, mlnx_fmr_create_t
\r
2748 /****f* Access Layer/mlnx_unmap_fmr
\r
2757 AL_EXPORT ib_api_status_t AL_API
\r
2759 IN const mlnx_fmr_handle_t h_fmr );
\r
2766 * The memory region attributes were modified successfully.
\r
2768 * IB_INVALID_MR_HANDLE
\r
2769 * The memory region handle was invalid.
\r
2771 * IB_INVALID_PARAMETER
\r
2772 * A reference to the lkey or rkey was not provided or the specified
\r
2773 * modify mask is invalid.
\r
2775 * IB_INVALID_SETTING
\r
2776 * The specified memory region attributes are invalid.
\r
2778 * IB_INVALID_PD_HANDLE
\r
2779 * The protection domain handle was invalid.
\r
2781 * IB_INSUFFICIENT_RESOURCES
\r
2782 * There were insufficient resources currently available on the channel
\r
2783 * adapter to modify the memory region.
\r
2786 * The requested access rights are not supported by the channel adapter.
\r
2788 * IB_INVALID_PERMISSION
\r
2789 * The requested access rights are invalid.
\r
2791 * IB_RESOURCE_BUSY
\r
2792 * The memory region has windows bound to it.
\r
2795 * This is a Mellanox specific extension to verbs.
\r
2798 * mlnx_destroy_fmr, mlnx_fmr_create_t
\r
2802 /****f* Access Layer/mlnx_destroy_fmr
\r
2804 * mlnx_destroy_fmr
\r
2807 * Destroys an existing Mellanox fast memory region.
\r
2811 AL_EXPORT ib_api_status_t AL_API
\r
2813 IN const mlnx_fmr_handle_t h_fmr );
\r
2817 * [in] A handle to the registered memory region being modified.
\r
2821 * The memory region attributes were modified successfully.
\r
2823 * IB_INVALID_MR_HANDLE
\r
2824 * The memory region handle was invalid.
\r
2826 * IB_INVALID_PARAMETER
\r
2827 * A reference to the lkey or rkey was not provided or the specified
\r
2828 * modify mask is invalid.
\r
2830 * IB_INVALID_SETTING
\r
2831 * The specified memory region attributes are invalid.
\r
2833 * IB_INVALID_PD_HANDLE
\r
2834 * The protection domain handle was invalid.
\r
2836 * IB_INSUFFICIENT_RESOURCES
\r
2837 * There were insufficient resources currently available on the channel
\r
2838 * adapter to modify the memory region.
\r
2841 * The requested access rights are not supported by the channel adapter.
\r
2843 * IB_INVALID_PERMISSION
\r
2844 * The requested access rights are invalid.
\r
2846 * IB_RESOURCE_BUSY
\r
2847 * The memory region has windows bound to it.
\r
2850 * This is a Mellanox specific extension to verbs.
\r
2853 * mlnx_destroy_fmr, mlnx_fmr_create_t
\r
2857 /****f* Access Layer/ib_create_fmr_pool
\r
2859 * ib_create_fmr_pool
\r
2862 * Creates a pool of FMR elements for use
\r
2866 AL_EXPORT ib_api_status_t AL_API
\r
2867 mlnx_create_fmr_pool(
\r
2868 IN const ib_pd_handle_t h_pd,
\r
2869 IN const mlnx_fmr_pool_create_t *p_fmr_pool_attr,
\r
2870 OUT mlnx_fmr_pool_handle_t* const ph_pool );
\r
2886 /****f* Access Layer/ib_destroy_fmr_pool
\r
2888 * ib_destroy_fmr_pool
\r
2891 * Destroys a MAD pool and all associated resources.
\r
2895 AL_EXPORT ib_api_status_t AL_API
\r
2896 mlnx_destroy_fmr_pool(
\r
2897 IN const mlnx_fmr_pool_handle_t h_pool );
\r
2918 /****f* Access Layer/ib_fmr_pool_map_phys
\r
2920 * ib_destroy_fmr_pool
\r
2923 * Destroys a MAD pool and all associated resources.
\r
2927 AL_EXPORT ib_api_status_t AL_API
\r
2928 mlnx_map_phys_fmr_pool(
\r
2929 IN const mlnx_fmr_pool_handle_t h_pool ,
\r
2930 IN const uint64_t* const paddr_list,
\r
2931 IN const int list_len,
\r
2932 IN OUT uint64_t* const p_vaddr,
\r
2933 OUT net32_t* const p_lkey,
\r
2934 OUT net32_t* const p_rkey,
\r
2935 OUT mlnx_fmr_pool_el_t *pp_fmr_el);
\r
2954 /****f* Access Layer/ib_destroy_fmr_pool
\r
2956 * ib_destroy_fmr_pool
\r
2959 * Destroys a MAD pool and all associated resources.
\r
2963 AL_EXPORT ib_api_status_t AL_API
\r
2964 mlnx_unmap_fmr_pool(
\r
2965 IN mlnx_fmr_pool_el_t p_fmr_el );
\r
2981 /****f* Access Layer/ib_flush_fmr_pool
\r
2983 * ib_flush_fmr_pool
\r
2986 * Destroys a MAD pool and all associated resources.
\r
2991 mlnx_flush_fmr_pool(mlnx_fmr_pool_handle_t h_pool);
\r
3005 #endif /* CL_KERNEL */
\r
3007 /****f* Access Layer/ib_create_mw
\r
3012 * Creates a memory window associated with the specified protection domain.
\r
3013 * Newly created windows are not bound to any specific memory region.
\r
3017 AL_EXPORT ib_api_status_t AL_API
\r
3019 IN const ib_pd_handle_t h_pd,
\r
3020 OUT net32_t* const p_rkey,
\r
3021 OUT ib_mw_handle_t* const ph_mw );
\r
3025 * [in] A handle to an existing protection domain that the memory window
\r
3026 * should be created within.
\r
3029 * [out] The current rkey associated with the memory window. This key is
\r
3030 * used to bind the window to a registered memory region.
\r
3033 * [out] Upon successful completion of this call, this references a handle
\r
3034 * to the memory window. This handle is used to bind and destroy
\r
3039 * The memory window was successfully created.
\r
3041 * IB_INVALID_PD_HANDLE
\r
3042 * The protection domain handle was invalid.
\r
3044 * IB_INVALID_PARAMETER
\r
3045 * A reference to the memory window rkey or handle was not provided.
\r
3047 * IB_INSUFFICIENT_MEMORY
\r
3048 * There was insufficient memory to create the memory window.
\r
3050 * IB_INSUFFICIENT_RESOURCES
\r
3051 * There were insufficient resources currently available on the channel
\r
3052 * adapter to create the memory window.
\r
3055 * This routine creates an unbound memory window associated with a specified
\r
3056 * protection domain. The memory window cannot be used for data transfer
\r
3057 * operations until being bound to a registered memory region.
\r
3060 * ib_destroy_mw, ib_query_mw, ib_bind_mw
\r
3064 /****f* Access Layer/ib_query_mw
\r
3069 * Query the current attributes of a memory window.
\r
3073 AL_EXPORT ib_api_status_t AL_API
\r
3075 IN const ib_mw_handle_t h_mw,
\r
3076 OUT ib_pd_handle_t* const ph_pd,
\r
3077 OUT net32_t* const p_rkey );
\r
3081 * [in] A handle to an existing memory window.
\r
3084 * [out] Upon successful completion of this call, this will reference
\r
3085 * the protection domain associated with this memory window.
\r
3088 * [out] Upon successful completion of this call, this will reference
\r
3089 * the current rkey associated with this memory window.
\r
3093 * The memory window attributes were returned successfully.
\r
3095 * IB_INVALID_MW_HANDLE
\r
3096 * The memory window handle was invalid.
\r
3098 * IB_INVALID_PARAMETER
\r
3099 * A reference to the protection domain handle or rkey was not provided.
\r
3102 * This routine returns information about the specified memory window.
\r
3109 /****f* Access Layer/ib_bind_mw
\r
3114 * Binds a memory window to a registered memory region.
\r
3118 AL_EXPORT ib_api_status_t AL_API
\r
3120 IN const ib_mw_handle_t h_mw,
\r
3121 IN const ib_qp_handle_t h_qp,
\r
3122 IN ib_bind_wr_t* const p_mw_bind,
\r
3123 OUT net32_t* const p_rkey );
\r
3127 * [in] A handle to an existing memory window.
\r
3130 * [in] A handle to a queue pair that the bind request will be posted to.
\r
3133 * [in] Describes the memory window bind request.
\r
3136 * [out] The new rkey for the memory window that may be used by a remote
\r
3137 * end-point when performing RDMA or atomic operations to this memory
\r
3142 * The memory window bind operation was successfully posted.
\r
3144 * IB_INVALID_MW_HANDLE
\r
3145 * The memory window handle was invalid.
\r
3147 * IB_INVALID_QP_HANDLE
\r
3148 * The queue pair handle was invalid.
\r
3150 * IB_INVALID_PARAMETER
\r
3151 * A reference to the memory window bind work request or rkey was not
\r
3154 * IB_INVALID_SERVICE_TYPE
\r
3155 * The queue pair configuration does not support this type of service.
\r
3157 * IB_INVALID_MR_HANDLE
\r
3158 * The memory region handle was invalid.
\r
3161 * The rkey is invalid for the memory region being bound.
\r
3164 * The requested access rights are not supported by the channel adapter.
\r
3166 * IB_INVALID_PERMISSION
\r
3167 * The requested access rights are invalid.
\r
3169 * IB_INSUFFICIENT_RESOURCES
\r
3170 * There were insufficient resources currently available on the channel
\r
3171 * adapter to bind the memory window.
\r
3174 * This routine posts a request to bind a memory window to a registered
\r
3175 * memory region. The bind operation occurs on the specified queue pair,
\r
3176 * but the bound region is usable across all queue pairs within the same
\r
3177 * protection domain.
\r
3180 * ib_create_mw, ib_bind_wr_t
\r
3184 /****f* Access Layer/ib_destroy_mw
\r
3189 * Destroys a memory window.
\r
3193 AL_EXPORT ib_api_status_t AL_API
\r
3195 IN const ib_mw_handle_t h_mw );
\r
3199 * [in] A handle to an existing memory window.
\r
3203 * The memory window was successfully destroyed.
\r
3205 * IB_INVALID_MW_HANDLE
\r
3206 * The memory window handle was invalid.
\r
3209 * This routine deallocates a window entry created via a ib_create_mw.
\r
3210 * Once this operation is complete, future accesses to the window will fail.
\r
3217 /****f* Access Layer/ib_post_send
\r
3222 * This routine posts a work request to the send queue of a queue pair.
\r
3226 AL_EXPORT ib_api_status_t AL_API
\r
3228 IN const ib_qp_handle_t h_qp,
\r
3229 IN ib_send_wr_t* const p_send_wr,
\r
3230 OUT ib_send_wr_t **pp_send_failure OPTIONAL );
\r
3234 * [in] The queue pair to which this work request is being submitted.
\r
3237 * [in] A reference to the head of the work request list.
\r
3240 * [out] If the post send operation failed, this references the work
\r
3241 * request in the p_send_wr list where the first failure occurred.
\r
3242 * This parameter may be NULL if only a single work request is being
\r
3243 * posted to the QP.
\r
3247 * All work requests were successfully posted.
\r
3249 * IB_INVALID_QP_HANDLE
\r
3250 * The queue pair handle was invalid.
\r
3252 * IB_INVALID_PARAMETER
\r
3253 * A reference to the send work request list was not provided.
\r
3255 * IB_INSUFFICIENT_RESOURCES
\r
3256 * The number of posted work requests exceed the current depth available
\r
3257 * on the send queue.
\r
3259 * IB_INVALID_WR_TYPE
\r
3260 * The work request type was invalid.
\r
3262 * IB_INVALID_QP_STATE
\r
3263 * The current queue pair state does not allow posting sends.
\r
3265 * IB_INVALID_MAX_SGE
\r
3266 * The number of work request scatter gather elements exceed the queue
\r
3267 * pair configuration.
\r
3270 * The requested operation is not supported by the channel adapter.
\r
3273 * This routine posts a work request to the send queue of a queue pair.
\r
3274 * The type of work to perform is defined by the p_send_wr parameter.
\r
3281 /****f* Access Layer/ib_post_recv
\r
3286 * This routine posts a work request to the receive queue of a queue pair.
\r
3290 AL_EXPORT ib_api_status_t AL_API
\r
3292 IN const ib_qp_handle_t h_qp,
\r
3293 IN ib_recv_wr_t* const p_recv_wr,
\r
3294 OUT ib_recv_wr_t **pp_recv_failure OPTIONAL );
\r
3298 * [in] The queue pair to which this work request is being submitted.
\r
3301 * [in] A reference to the head of the work request list.
\r
3304 * [out] If the post receive operation failed, this references the work
\r
3305 * request in the p_recv_wr list where the first failure occurred.
\r
3306 * This parameter may be NULL if only a single work request is being
\r
3307 * posted to the QP.
\r
3311 * All work requests were successfully posted.
\r
3313 * IB_INVALID_QP_HANDLE
\r
3314 * The queue pair handle was invalid.
\r
3316 * IB_INVALID_PARAMETER
\r
3317 * A reference to the receive work request list was not provided.
\r
3319 * IB_INSUFFICIENT_RESOURCES
\r
3320 * The number of posted work requests exceed the current depth available
\r
3321 * on the receive queue.
\r
3323 * IB_INVALID_WR_TYPE
\r
3324 * The work request type was invalid.
\r
3326 * IB_INVALID_QP_STATE
\r
3327 * The current queue pair state does not allow posting receives.
\r
3330 * This routine posts a work request to the receive queue of a queue pair.
\r
3331 * The type of work to perform is defined by the p_recv_wr parameter. This
\r
3332 * call is used to post data buffers to receive incoming message sends.
\r
3339 /****f* Access Layer/ib_send_mad
\r
3344 * This routine posts a work request to the send queue of a queue pair.
\r
3348 AL_EXPORT ib_api_status_t AL_API
\r
3350 IN const ib_mad_svc_handle_t h_mad_svc,
\r
3351 IN ib_mad_element_t* const p_mad_element_list,
\r
3352 OUT ib_mad_element_t **pp_mad_failure OPTIONAL );
\r
3356 * [in] The MAD service to which this work request is being submitted.
\r
3358 * p_mad_element_list
\r
3359 * [in] A list of MAD elements that will be posted to the send queue.
\r
3362 * [out] If the send MAD operation failed, this references the MAD
\r
3363 * element in the p_mad_element_list where the first failure occurred.
\r
3364 * This parameter is optional if p_mad_element_list contains a single
\r
3369 * The MAD element list was successfully posted.
\r
3371 * IB_INVALID_HANDLE
\r
3372 * The MAD service handle was invalid.
\r
3374 * IB_INVALID_PARAMETER
\r
3375 * A reference to the MAD element list was not provided.
\r
3377 * IB_INSUFFICIENT_RESOURCES
\r
3378 * There were insufficient resources currently available to complete
\r
3381 * IB_INVALID_SETTING
\r
3382 * The MAD element RMPP version is not supported by the access layer.
\r
3384 * IB_INSUFFICIENT_MEMORY
\r
3385 * There was insufficient memory to complete the request.
\r
3388 * This routine posts a work request to send a MAD on a MAD service. All
\r
3389 * MAD elements successfully posted by this call are under the control of
\r
3390 * the access layer and should not be accessed until the send operation
\r
3393 * In order to guarantee that MADs sent by separate clients do not use the
\r
3394 * same transaction ID, the access layer reserves the upper 32-bits of the
\r
3395 * TID on all unsolicited MADs. MADs sent with the response bit set will
\r
3396 * not have their transaction ID's modified. Unsolicited MADs will have the
\r
3397 * upper 32-bits of their TID set to an access layer generated client ID.
\r
3400 * ib_mad_element_t, ib_cancel_mad
\r
3404 /****f* Access Layer/ib_cancel_mad
\r
3409 * This routine cancels a pending send transaction to a MAD service.
\r
3413 AL_EXPORT ib_api_status_t AL_API
\r
3415 IN const ib_mad_svc_handle_t h_mad_svc,
\r
3416 IN ib_mad_element_t* const p_mad_element );
\r
3420 * [in] The MAD service to which the send operation was directed.
\r
3423 * [in] A handle to a sent MAD element.
\r
3427 * The requested MAD transaction was located and canceled.
\r
3429 * IB_INVALID_PARAMETER
\r
3430 * A reference to the MAD element list was not provided.
\r
3433 * The requested transaction was not located or had already completed.
\r
3436 * This routine cancels a pending send transaction to a MAD service. If
\r
3437 * the request is successfully located and has not yet completed, it will
\r
3438 * be completed with its status set to IB_CANCELED. The canceled operation
\r
3439 * will be returned to the user through the normal MAD completion callback.
\r
3440 * If the send transaction has already completed, this call will return
\r
3448 /****f* Access Layer/ib_peek_cq
\r
3453 * Returns the number of entries currently on the completion queue.
\r
3457 AL_EXPORT ib_api_status_t AL_API
\r
3459 IN const ib_cq_handle_t h_cq,
\r
3460 OUT uint32_t* const p_n_cqes );
\r
3464 * [in] Handle to the completion queue to peek.
\r
3467 * [out] Upon successful completion of this call, contains the number
\r
3468 * of completion queue entries currently on the completion queue.
\r
3472 * The peek operation completed successfully.
\r
3474 * IB_INVALID_CQ_HANDLE
\r
3475 * The completion queue handle was invalid.
\r
3477 * IB_INVALID_PARAMETER
\r
3478 * A reference to the completion queue entry count was not provided.
\r
3481 * This operation is not supported by the channel adapter.
\r
3484 * The value returned is a snapshot of the number of compleiton queue
\r
3485 * entries curently on the completion queue. Support for this operation
\r
3486 * is optional by a channel adapter vendor.
\r
3489 * ib_create_cq, ib_poll_cq, ib_rearm_cq, ib_rearm_n_cq
\r
3493 /****f* Access Layer/ib_poll_cq
\r
3498 * Checks a completion queue for completed work requests.
\r
3502 AL_EXPORT ib_api_status_t AL_API
\r
3504 IN const ib_cq_handle_t h_cq,
\r
3505 IN OUT ib_wc_t** const pp_free_wclist,
\r
3506 OUT ib_wc_t** const pp_done_wclist );
\r
3510 * [in] A handle to a completion queue to check for completions on.
\r
3513 * [in/out] On input, a list of work completion structures provided by
\r
3514 * the client. These are used to report completed work requests through
\r
3515 * the pp_done_wclist.
\r
3517 * On output, this contains the list of work completions structures for
\r
3518 * which no work completion was found.
\r
3521 * [out] A list of work completions retrieved from the completion queue.
\r
3525 * The poll operation completed successfully. If the work completion
\r
3526 * structures referenced by the pp_free_wclist list is empty there are
\r
3527 * potentially more completions available to retrieve.
\r
3529 * IB_INVALID_PARAMETER
\r
3530 * A reference to the free or done work completion list was not provided.
\r
3532 * IB_INVALID_CQ_HANDLE
\r
3533 * The completion queue handle was invalid.
\r
3536 * No completed work requests were removed from the completion queue.
\r