NAME
Constants
DESCRIPTION
The following constants are used throughout the IBA code base. Definitions are from the InfiniBand Architecture Specification v1.2
NAME
Type Definitions
DESCRIPTION
Definitions are from the InfiniBand Architecture Specification v1.2
NAME
ib_access_t
DESCRIPTION
Indicates the type of access is permitted on resources such as QPs, memory regions and memory windows.
SYNOPSIS
typedef uint32_t ib_access_t; #define IB_AC_RDMA_READ 0x00000001 #define IB_AC_RDMA_WRITE 0x00000002 #define IB_AC_ATOMIC 0x00000004 #define IB_AC_LOCAL_WRITE 0x00000008 #define IB_AC_MW_BIND 0x00000010
NOTES
Users may combine access rights using a bit-wise or operation to specify additional access. For example: IB_AC_RDMA_READ | IB_AC_RDMA_WRITE grants RDMA read and write access.
NAME
ib_api_status_t
DESCRIPTION
Function return codes indicating the success or failure of an API call. Note that success is indicated by the return value IB_SUCCESS, which is always zero.
NOTES
IB_VERBS_PROCESSING_DONE is used by UVP library to terminate a verbs call in the pre-ioctl step itself.
SYNOPSIS
typedef enum _ib_api_status_t { IB_SUCCESS, IB_INSUFFICIENT_RESOURCES, IB_INSUFFICIENT_MEMORY, IB_INVALID_PARAMETER, IB_INVALID_SETTING, IB_NOT_FOUND, IB_TIMEOUT, IB_CANCELED, IB_INTERRUPTED, IB_INVALID_PERMISSION, IB_UNSUPPORTED, IB_OVERFLOW, IB_MAX_MCAST_QPS_REACHED, IB_INVALID_QP_STATE, IB_INVALID_APM_STATE, IB_INVALID_PORT_STATE, IB_INVALID_STATE, IB_RESOURCE_BUSY, IB_INVALID_PKEY, IB_INVALID_LKEY, IB_INVALID_RKEY, IB_INVALID_MAX_WRS, IB_INVALID_MAX_SGE, IB_INVALID_CQ_SIZE, IB_INVALID_SRQ_SIZE, IB_INVALID_SERVICE_TYPE, IB_INVALID_GID, IB_INVALID_LID, IB_INVALID_GUID, IB_INVALID_CA_HANDLE, IB_INVALID_AV_HANDLE, IB_INVALID_CQ_HANDLE, IB_INVALID_QP_HANDLE, IB_INVALID_SRQ_HANDLE, IB_INVALID_PD_HANDLE, IB_INVALID_MR_HANDLE, IB_INVALID_FMR_HANDLE, IB_INVALID_MW_HANDLE, IB_INVALID_MCAST_HANDLE, IB_INVALID_CALLBACK, IB_INVALID_AL_HANDLE, /* InfiniBand Access Layer */ IB_INVALID_HANDLE, /* InfiniBand Access Layer */ IB_ERROR, /* InfiniBand Access Layer */ IB_REMOTE_ERROR, /* Infiniband Access Layer */ IB_VERBS_PROCESSING_DONE, /* See Notes above */ IB_INVALID_WR_TYPE, IB_QP_IN_TIMEWAIT, IB_EE_IN_TIMEWAIT, IB_INVALID_PORT, IB_NOT_DONE, IB_INVALID_INDEX, IB_NO_MATCH, IB_PENDING, IB_UNKNOWN_ERROR /* ALWAYS LAST ENUM VALUE! */ } ib_api_status_t;
NAME
ib_apm_state_t
DESCRIPTION
The current automatic path migration state of a queue pair
SYNOPSIS
typedef enum _ib_apm_state { IB_APM_MIGRATED = 1, IB_APM_REARM, IB_APM_ARMED } ib_apm_state_t;
NAME
ib_apr_status_t
DESCRIPTION
Automatic path migration status information.
SYNOPSIS
typedef uint8_t ib_apr_status_t;
SEE ALSO
ib_cm_apr, ib_cm_apr_rec_t
SOURCE
#define IB_AP_SUCCESS 0 #define IB_AP_INVALID_COMM_ID 1 #define IB_AP_UNSUPPORTED 2 #define IB_AP_REJECT 3 #define IB_AP_REDIRECT 4 #define IB_AP_IS_CURRENT 5 #define IB_AP_INVALID_QPN 6 #define IB_AP_INVALID_LID 7 #define IB_AP_INVALID_GID 8 #define IB_AP_INVALID_FLOW_LBL 9 #define IB_AP_INVALID_TCLASS 10 #define IB_AP_INVALID_HOP_LIMIT 11 #define IB_AP_INVALID_PKT_RATE 12 #define IB_AP_INVALID_SL 13
NAME
ib_atomic_t
DESCRIPTION
Indicates atomicity levels supported by an adapter.
SYNOPSIS
typedef enum _ib_atomic_t { IB_ATOMIC_NONE, IB_ATOMIC_LOCAL, IB_ATOMIC_GLOBAL } ib_atomic_t;
VALUES
IB_ATOMIC_NONE Atomic operations not supported. IB_ATOMIC_LOCAL Atomic operations guaranteed between QPs of a single CA. IB_ATOMIC_GLOBAL Atomic operations are guaranteed between CA and any other entity in the system.
NAME
ib_av_attr_t
DESCRIPTION
IBA address vector.
SYNOPSIS
typedef _ib_av_attr { uint8_t port_num; uint8_t sl; ib_net16_t dlid; boolean_t grh_valid; ib_grh_t grh; uint8_t static_rate; uint8_t path_bits; struct _av_conn { uint8_t path_mtu; uint8_t local_ack_timeout; uint8_t seq_err_retry_cnt; uint8_t rnr_retry_cnt; } conn; } ib_av_attr_t;
SEE ALSO
ib_gid_t
NAME
ib_bind_wr_t
DESCRIPTION
Information used to submit a memory window bind work request to the send queue of a queue pair.
SYNOPSIS
typedef struct _ib_bind_wr { uint64_t wr_id; ib_send_opt_t send_opt; ib_mr_handle_t __ptr64 h_mr; ib_access_t access_ctrl; net32_t current_rkey; ib_local_ds_t local_ds; } ib_bind_wr_t;
FIELDS
wr_id A 64-bit work request identifier that is returned to the consumer as part of the work completion. send_opt Optional send control parameters. h_mr Handle to the memory region to which this window is being bound. access_ctrl Access rights for this memory window. current_rkey The current rkey assigned to this window for remote access. local_ds A reference to a local data segment used by the bind operation.
SEE ALSO
ib_send_opt_t, ib_access_t, ib_local_ds_t
NAME
ib_ca_attr_t
DESCRIPTION
Information about a channel adapter.
SYNOPSIS
typedef struct _ib_ca_attr { ib_net64_t ca_guid; uint32_t vend_id; uint16_t dev_id; uint16_t revision; uint64_t fw_ver; /* * Total size of the ca attributes in bytes */ uint32_t size; uint32_t max_qps; uint32_t max_wrs; uint32_t max_sges; uint32_t max_rd_sges; uint32_t max_cqs; uint32_t max_cqes; uint32_t max_pds; uint32_t init_regions; uint64_t init_region_size; uint32_t init_windows; uint32_t max_addr_handles; uint32_t max_partitions; ib_atomic_t atomicity; uint8_t max_qp_resp_res; uint8_t max_resp_res; uint8_t max_qp_init_depth; uint32_t max_ipv6_qps; uint32_t max_ether_qps; uint32_t max_mcast_grps; uint32_t max_mcast_qps; uint32_t max_qps_per_mcast_grp; uint32_t max_fmr; uint32_t max_map_per_fmr; uint32_t max_srq; uint32_t max_srq_wrs; uint32_t max_srq_sges; /* * local_ack_delay: * Specifies the maximum time interval between the local CA receiving * a message and the transmission of the associated ACK or NAK. * * timeout = 4.096 microseconds * 2^local_ack_delay */ uint8_t local_ack_delay; boolean_t bad_pkey_ctr_support; boolean_t bad_qkey_ctr_support; boolean_t raw_mcast_support; boolean_t apm_support; boolean_t av_port_check; boolean_t change_primary_port; boolean_t modify_wr_depth; boolean_t modify_srq_depth; boolean_t current_qp_state_support; boolean_t shutdown_port_capability; boolean_t init_type_support; boolean_t port_active_event_support; boolean_t system_image_guid_support; boolean_t hw_agents; ib_net64_t system_image_guid; uint32_t num_page_sizes; uint8_t num_ports; TO_LONG_PTR( uint32_t* , p_page_size) ; TO_LONG_PTR( ib_port_attr_t* , p_port_attr) ; } ib_ca_attr_t;
FIELDS
ca_guid GUID for this adapter. vend_id IEEE vendor ID for this adapter dev_id Device ID of this adapter. (typically from PCI device ID) revision Revision ID of this adapter fw_ver Device Firmware version. size Total size in bytes for the HCA attributes. This size includes total size required for all the variable members of the structure. If a vendor requires to pass vendor specific fields beyond this structure, the HCA vendor can choose to report a larger size. If a vendor is reporting extended vendor specific features, they should also provide appropriate access functions to aid with the required interpretation. max_qps Maximum number of QP's supported by this HCA. max_wrs Maximum number of work requests supported by this HCA. max_sges Maximum number of scatter gather elements supported per work request. max_rd_sges Maximum number of scatter gather elements supported for READ work requests for a Reliable Datagram QP. This value must be zero if RD service is not supported. max_cqs Maximum number of Completion Queues supported. max_cqes Maximum number of CQ elements supported per CQ. max_pds Maximum number of protection domains supported. init_regions Initial number of memory regions supported. These are only informative values. HCA vendors can extended and grow these limits on demand. init_region_size Initial limit on the size of the registered memory region. init_windows Initial number of window entries supported. max_addr_handles Maximum number of address handles supported. max_partitions Maximum number of partitions supported. atomicity Indicates level of atomic operations supported by this HCA. max_qp_resp_res Maximum limit on number of responder resources for incomming RDMA operations on QPs. max_fmr Maximum number of Fast Memory Regions supported. max_map_per_fmr Maximum number of mappings, supported by a Fast Memory Region. max_srq Maximum number of Shared Receive Queues supported. max_srq_wrs Maximum number of work requests supported by this SRQ. max_srq_sges Maximum number of scatter gather elements supported per work request on SRQ. max_resp_res Maximum number of responder resources per HCA, with this HCA used as the target. max_qp_init_depth Maximimum initiator depth per QP for initiating RDMA reads and atomic operations. max_ipv6_qps max_ether_qps Maximum number of IPV6 and raw ether QP's supported by this HCA. max_mcast_grps Maximum number of multicast groups supported. max_mcast_qps Maximum number of QP's that can support multicast operations. max_qps_per_mcast_grp Maximum number of multicast QP's per multicast group. local_ack_delay Specifies the maximum time interval between the local CA receiving a message and the transmission of the associated ACK or NAK. timeout = 4.096 microseconds * 2^local_ack_delay bad_pkey_ctr_support bad_qkey_ctr_support Indicates support for the bad pkey and qkey counters. raw_mcast_support Indicates support for raw packet multicast. apm_support Indicates support for Automatic Path Migration. av_port_check Indicates ability to check port number in address handles. change_primary_port Indicates ability to change primary port for a QP during a SQD->RTS transition. modify_wr_depth Indicates ability to modify QP depth during a modify QP operation. Check the verb specification for permitted states. modify_srq_depth Indicates ability to modify SRQ depth during a modify SRQ operation. Check the verb specification for permitted states. current_qp_state_support Indicates ability of the HCA to support the current QP state modifier during a modify QP operation. shutdown_port_capability Shutdown port capability support indicator. init_type_support Indicates init_type_reply and ability to set init_type is supported. port_active_event_support Port active event support indicator. system_image_guid_support System image GUID support indicator. hw_agents Indicates SMA is implemented in HW. system_image_guid Optional system image GUID. This field is valid only if the system_image_guid_support flag is set. num_page_sizes Indicates support for different page sizes supported by the HCA. The variable size array can be obtained from p_page_size. num_ports Number of physical ports supported on this HCA. p_page_size Array holding different page size supported. p_port_attr Array holding port attributes.
NOTES
This structure contains the attributes of a channel adapter. Users must call ib_copy_ca_attr to copy the contents of this structure to a new memory region.
SEE ALSO
ib_port_attr_t, ib_atomic_t, ib_copy_ca_attr
NAME
ib_ca_mod_t -- Modify port attributes and error counters
DESCRIPTION
Specifies modifications to the port attributes of a channel adapter.
SYNOPSIS
typedef uint32_t ib_ca_mod_t; #define IB_CA_MOD_IS_CM_SUPPORTED 0x00000001 #define IB_CA_MOD_IS_SNMP_SUPPORTED 0x00000002 #define IB_CA_MOD_IS_DEV_MGMT_SUPPORTED 0x00000004 #define IB_CA_MOD_IS_VEND_SUPPORTED 0x00000008 #define IB_CA_MOD_IS_SM 0x00000010 #define IB_CA_MOD_IS_SM_DISABLED 0x00000020 #define IB_CA_MOD_QKEY_CTR 0x00000040 #define IB_CA_MOD_PKEY_CTR 0x00000080 #define IB_CA_MOD_IS_NOTICE_SUPPORTED 0x00000100 #define IB_CA_MOD_IS_TRAP_SUPPORTED 0x00000200 #define IB_CA_MOD_IS_APM_SUPPORTED 0x00000400 #define IB_CA_MOD_IS_SLMAP_SUPPORTED 0x00000800 #define IB_CA_MOD_IS_PKEY_NVRAM_SUPPORTED 0x00001000 #define IB_CA_MOD_IS_MKEY_NVRAM_SUPPORTED 0x00002000 #define IB_CA_MOD_IS_SYSGUID_SUPPORTED 0x00004000 #define IB_CA_MOD_IS_DR_NOTICE_SUPPORTED 0x00008000 #define IB_CA_MOD_IS_BOOT_MGMT_SUPPORTED 0x00010000 #define IB_CA_MOD_IS_CAPM_NOTICE_SUPPORTED 0x00020000 #define IB_CA_MOD_IS_REINIT_SUPORTED 0x00040000 #define IB_CA_MOD_IS_LEDINFO_SUPPORTED 0x00080000 #define IB_CA_MOD_SHUTDOWN_PORT 0x00100000 #define IB_CA_MOD_INIT_TYPE_VALUE 0x00200000 #define IB_CA_MOD_SYSTEM_IMAGE_GUID 0x00400000 #define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED 0x00800000 #define IB_CA_MOD_RESERVED_MASK 0xFF000000
VALUES
IB_CA_MOD_IS_CM_SUPPORTED Indicates if there is a communication manager accessible through the port. IB_CA_MOD_IS_SNMP_SUPPORTED Indicates if there is an SNMP agent accessible through the port. IB_CA_MOD_IS_DEV_MGMT_SUPPORTED Indicates if there is a device management agent accessible through the port. IB_CA_MOD_IS_VEND_SUPPORTED Indicates if there is a vendor supported agent accessible through the port. IB_CA_MOD_IS_SM Indicates if there is a subnet manager accessible through the port. IB_CA_MOD_IS_SM_DISABLED Indicates if the port has been disabled for configuration by the subnet manager. IB_CA_MOD_QKEY_CTR Used to reset the qkey violation counter associated with the port. IB_CA_MOD_PKEY_CTR Used to reset the pkey violation counter associated with the port. IB_CA_MOD_IS_NOTICE_SUPPORTED Indicates that this CA supports ability to generate Notices for Port State changes. (only applicable to switches) IB_CA_MOD_IS_TRAP_SUPPORTED Indicates that this management port supports ability to generate trap messages. (only applicable to switches) IB_CA_MOD_IS_APM_SUPPORTED Indicates that this port is capable of performing Automatic Migration. IB_CA_MOD_IS_SLMAP_SUPPORTED Indicates this port supports SLMAP capability. IB_CA_MOD_IS_PKEY_NVRAM_SUPPORTED Indicates that PKEY is supported in NVRAM IB_CA_MOD_IS_MKEY_NVRAM_SUPPORTED Indicates that MKEY is supported in NVRAM IB_CA_MOD_IS_SYSGUID_SUPPORTED Indicates System Image GUID support. IB_CA_MOD_IS_DR_NOTICE_SUPPORTED Indicate support for generating Direct Routed Notices IB_CA_MOD_IS_BOOT_MGMT_SUPPORTED Indicates support for Boot Management IB_CA_MOD_IS_CAPM_NOTICE_SUPPORTED Indicates capability to generate notices for changes to CAPMASK IB_CA_MOD_IS_REINIT_SUPORTED Indicates type of node init supported. Refer to Chapter 14 for Initialization actions. IB_CA_MOD_IS_LEDINFO_SUPPORTED Indicates support for LED info. IB_CA_MOD_SHUTDOWN_PORT Used to modify the port active indicator. IB_CA_MOD_INIT_TYPE_VALUE Used to modify the init_type value for the port. IB_CA_MOD_SYSTEM_IMAGE_GUID Used to modify the system image GUID for the port. IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED Used to modify the system image GUID for the port. IB_CA_MOD_RESERVED_MASK Mask of all the reserved bits. If any of these bits are set ib_modify_ca will return IB_INVALID_PARAMETER.
NAME
ib_ci_op_t
DESCRIPTION
A structure used for vendor specific CA interface communication.
SYNOPSIS
typedef struct _ib_ci_op { IN uint32_t command; IN uint32_t buf_size; IN uint32_t buf_info; IN OUT int32_t status; OUT uint32_t num_bytes_ret; IN OUT void* FUNC_PTR64 p_buf OPTIONAL; } ib_ci_op_t;
FIELDS
command A command code that is understood by the verbs provider. status The completion status from the verbs provider. This field should be initialize to indicate an error to allow detection and cleanup in case a communication error occurs between user-mode and kernel-mode. buf_size The size of the buffer in bytes. buf_info Additional buffer information p_buf A reference to a buffer containing vendor specific data. The verbs provider must not access pointers in the p_buf between user-mode and kernel-mode. Any pointers embedded in the p_buf are invalidated by the user-mode/kernel-mode transition. num_bytes_ret The size in bytes of the vendor specific data returned in the buffer. This field is set by the verbs provider. The verbs provider should verify that the buffer size is sufficient to hold the data being returned.
NOTES
This structure is provided to allow the exchange of vendor specific data between the originator and the verbs provider. Users of this structure are expected to know the format of data in the p_buf based on the structure command field or the usage context.
NAME
ib_cm_cap_mask_t
DESCRIPTION
Capability mask values in ClassPortInfo.
SYNOPSIS
#define IB_CM_RELIABLE_CONN_CAPABLE CL_HTON16(9) #define IB_CM_RELIABLE_DGRM_CAPABLE CL_HTON16(10) #define IB_CM_RDGRM_CAPABLE CL_HTON16(11) #define IB_CM_UNRELIABLE_CONN_CAPABLE CL_HTON16(12) #define IB_CM_SIDR_CAPABLE CL_HTON16(13)
SEE ALSO
ib_cm_rep, ib_class_port_info_t
SOURCE
*
NAME
ib_copy_ca_attr
DESCRIPTION
Copies CA attributes.
SYNOPSIS
AL_EXPORT ib_ca_attr_t* AL_API ib_copy_ca_attr( IN ib_ca_attr_t* const p_dest, IN const ib_ca_attr_t* const p_src );
PARAMETERS
p_dest Pointer to the buffer that is the destination of the copy. p_src Pointer to the CA attributes to copy.
RETURN VALUE
Pointer to the copied CA attributes.
NOTES
The buffer pointed to by the p_dest parameter must be at least the size specified in the size field of the buffer pointed to by p_src.
SEE ALSO
ib_ca_attr_t, ib_dup_ca_attr, ib_free_ca_attr
NAME
ib_init_type_t
DESCRIPTION
If supported by the HCA, the type of initialization requested by this port before SM moves it to the active or armed state. If the SM implements reinitialization, it shall set these bits to indicate the type of initialization performed prior to activating the port. Otherwise, these bits shall be set to 0.
SYNOPSIS
typedef uint8_t ib_init_type_t; #define IB_INIT_TYPE_NO_LOAD 0x01 #define IB_INIT_TYPE_PRESERVE_CONTENT 0x02 #define IB_INIT_TYPE_PRESERVE_PRESENCE 0x04 #define IB_INIT_TYPE_DO_NOT_RESUSCITATE 0x08
NAME
ib_local_ds_t
DESCRIPTION
Local data segment information referenced by send and receive work requests. This is used to specify local data buffers used as part of a work request.
SYNOPSIS
typedef struct _ib_local_ds { uint64_t vaddr; uint32_t length; uint32_t lkey; } ib_local_ds_t;
NAME
ib_mr_attr_t
DESCRIPTION
Attributes of a registered memory region.
SYNOPSIS
typedef struct _ib_mr_attr { ib_pd_handle_t __ptr64 h_pd; uint64_t local_lb; uint64_t local_ub; uint64_t remote_lb; uint64_t remote_ub; ib_access_t access_ctrl; net32_t lkey; net32_t rkey; } ib_mr_attr_t;
DESCRIPTION
h_pd Handle to the protection domain for this memory region. local_lb The virtual address of the lower bound of protection for local memory access. This is always a 64-bit quantity to support registering more than 4GB of memory on 32-bit systems with PAE. local_ub The virtual address of the upper bound of protection for local memory access. This is always a 64-bit quantity to support registering more than 4GB of memory on 32-bit systems with PAE. remote_lb The virtual address of the lower bound of protection for remote memory access. This is always a 64-bit quantity to support registering more than 4GB of memory on 32-bit systems with PAE. remote_ub The virtual address of the upper bound of protection for remote memory access. This is always a 64-bit quantity to support registering more than 4GB of memory on 32-bit systems with PAE. access_ctrl Access rights for the specified memory region. lkey The lkey associated with this memory region. rkey The rkey associated with this memory region.
NOTES
The remote_lb, remote_ub, and rkey are only valid if remote memory access is enabled for this memory region.
SEE ALSO
ib_access_t
NAME
ib_mr_create_t
DESCRIPTION
Information required to create a registered memory region.
SYNOPSIS
typedef struct _ib_mr_create { TO_LONG_PTR( void* , vaddr) ; uint64_t length; ib_access_t access_ctrl; } ib_mr_create_t;
FIELDS
vaddr Starting virtual address of the region being registered. length Length of the buffer to register. access_ctrl Access rights of the registered region.
SEE ALSO
ib_access_t
NAME
ib_mr_mod_t
DESCRIPTION
Mask used to specify which attributes of a registered memory region are being modified.
SYNOPSIS
typedef uint32_t ib_mr_mod_t; #define IB_MR_MOD_ADDR 0x00000001 #define IB_MR_MOD_PD 0x00000002 #define IB_MR_MOD_ACCESS 0x00000004
PARAMETERS
IB_MEM_MOD_ADDR The address of the memory region is being modified. IB_MEM_MOD_PD The protection domain associated with the memory region is being modified. IB_MEM_MOD_ACCESS The access rights the memory region are being modified.
NAME
ib_pd_type_t
DESCRIPTION
Indicates the type of protection domain being allocated.
SYNOPSIS
typedef enum _ib_pd_type { IB_PDT_NORMAL, IB_PDT_ALIAS, IB_PDT_SQP, IB_PDT_UD } ib_pd_type_t;
VALUES
IB_PDT_NORMAL Protection domain for all non-aliased QPs. IB_PDT_ALIAS Protection domain for IB_QPT_QP0_ALIAS and IB_QPT_QP1_ALIAS QPs. IB_PDT_SQP Protection domain for special queue pair usage. IB_PDT_UD Protection domain for UD queue pair usage.
NAME
ib_phys_create_t
DESCRIPTION
Information required to create a physical memory region.
SYNOPSIS
typedef struct _ib_phys_create { uint64_t length; uint32_t num_ranges; TO_LONG_PTR( ib_phys_range_t* , range_array) ; uint32_t buf_offset; uint32_t hca_page_size; ib_access_t access_ctrl; } ib_phys_create_t;
FIELDS
length The length of the memory region in bytes. num_ranges Number of ib_phys_range structures listed in the specified range array. range_array An array of ib_phys_range structures to be registered as a single memory region. buf_offset The offset into the first physical memory range of the specified memory region on which to start the virtual address. hca_page_size The HCA page size to use to register the memory. access_ctrl Access rights of the registered region.
SEE ALSO
ib_access_t
NAME
ib_phys_range_t
DESCRIPTION
Information describing a physical memory range.
SYNOPSIS
typedef struct _ib_phys_range { uint64_t base_addr; uint64_t size; } ib_phys_range_t;
FIELDS
base_addr Physical address of the base of the memory range. size size, in bytes, of the memory range.
NOTES
The base address must be start and end on an HCA-supported page boundary.
SEE ALSO
ib_phys_create_t
NAME
ib_port_attr_mod_t
DESCRIPTION
Port attributes that may be modified.
SYNOPSIS
typedef struct _ib_port_attr_mod { ib_port_cap_t cap; uint16_t pkey_ctr; uint16_t qkey_ctr; ib_init_type_t init_type; ib_net64_t system_image_guid; } ib_port_attr_mod_t;
SEE ALSO
ib_port_cap_t
NAME
ib_port_attr_t
DESCRIPTION
Information about a port on a given channel adapter.
SYNOPSIS
typedef struct _ib_port_attr { ib_net64_t port_guid; uint8_t port_num; uint8_t mtu; uint64_t max_msg_size; ib_net16_t lid; uint8_t lmc; /* * LinkWidthSupported as defined in PortInfo. Required to calculate * inter-packet delay (a.k.a. static rate). */ uint8_t link_width_supported; uint16_t max_vls; ib_net16_t sm_lid; uint8_t sm_sl; uint8_t link_state; ib_init_type_t init_type_reply; /* Optional */ /* * subnet_timeout: * The maximum expected subnet propagation delay to reach any port on * the subnet. This value also determines the rate at which traps can * be generated from this node. * * timeout = 4.096 microseconds * 2^subnet_timeout */ uint8_t subnet_timeout; ib_port_cap_t cap; uint16_t pkey_ctr; uint16_t qkey_ctr; uint16_t num_gids; uint16_t num_pkeys; /* * Pointers at the end of the structure to allow doing a simple * memory comparison of contents up to the first pointer. */ TO_LONG_PTR( ib_gid_t* , p_gid_table) ; TO_LONG_PTR( ib_net16_t* , p_pkey_table) ; } ib_port_attr_t;
SEE ALSO
uint8_t, ib_port_cap_t, ib_link_states_t
NAME
ib_port_cap_t
DESCRIPTION
Indicates which management agents are currently available on the specified port.
SYNOPSIS
typedef struct _ib_port_cap { boolean_t cm; boolean_t snmp; boolean_t dev_mgmt; boolean_t vend; boolean_t sm; boolean_t sm_disable; boolean_t qkey_ctr; boolean_t pkey_ctr; boolean_t notice; boolean_t trap; boolean_t apm; boolean_t slmap; boolean_t pkey_nvram; boolean_t mkey_nvram; boolean_t sysguid; boolean_t dr_notice; boolean_t boot_mgmt; boolean_t capm_notice; boolean_t reinit; boolean_t ledinfo; boolean_t port_active; boolean_t ipd; boolean_t pkey_switch_ext_port; boolean_t bm; boolean_t link_rtl; boolean_t client_reregister; } ib_port_cap_t;
NAME
ib_qp_attr_t
DESCRIPTION
Queue pair attributes returned through ib_query_qp.
SYNOPSIS
typedef struct _ib_qp_attr { ib_pd_handle_t __ptr64 h_pd; ib_qp_type_t qp_type; ib_access_t access_ctrl; uint16_t pkey_index; uint32_t sq_max_inline; uint32_t sq_depth; uint32_t rq_depth; uint32_t sq_sge; uint32_t rq_sge; uint8_t init_depth; uint8_t resp_res; ib_cq_handle_t __ptr64 h_sq_cq; ib_cq_handle_t __ptr64 h_rq_cq; ib_srq_handle_t __ptr64 h_srq; boolean_t sq_signaled; ib_qp_state_t state; ib_net32_t num; ib_net32_t dest_num; ib_net32_t qkey; ib_net32_t sq_psn; ib_net32_t rq_psn; uint8_t primary_port; uint8_t alternate_port; ib_av_attr_t primary_av; ib_av_attr_t alternate_av; ib_apm_state_t apm_state; } ib_qp_attr_t;
FIELDS
h_pd This is a handle to a protection domain associated with the QP. sq_max_inline Maximum payload that can be inlined directly in a WQE, eliminating protection checks and additional DMA operations.
NOTES
Other fields are defined by the Infiniband specification.
SEE ALSO
ib_qp_type_t, ib_access_t, ib_qp_state_t, ib_av_attr_t, ib_apm_state_t
NAME
ib_qp_create_t
DESCRIPTION
Attributes used to initialize a queue pair at creation time.
SYNOPSIS
typedef struct _ib_qp_create { ib_qp_type_t qp_type; uint32_t sq_depth; uint32_t rq_depth; uint32_t sq_sge; uint32_t rq_sge; ib_cq_handle_t __ptr64 h_sq_cq; ib_cq_handle_t __ptr64 h_rq_cq; ib_srq_handle_t __ptr64 h_srq; boolean_t sq_signaled; } ib_qp_create_t;
FIELDS
type Specifies the type of queue pair to create. sq_depth Indicates the requested maximum number of work requests that may be outstanding on the queue pair's send queue. This value must be less than or equal to the maximum reported by the channel adapter associated with the queue pair. rq_depth Indicates the requested maximum number of work requests that may be outstanding on the queue pair's receive queue. This value must be less than or equal to the maximum reported by the channel adapter associated with the queue pair. sq_sge Indicates the maximum number scatter-gather elements that may be given in a send work request. This value must be less than or equal to the maximum reported by the channel adapter associated with the queue pair. rq_sge Indicates the maximum number scatter-gather elements that may be given in a receive work request. This value must be less than or equal to the maximum reported by the channel adapter associated with the queue pair. h_sq_cq A handle to the completion queue that will be used to report send work request completions. This handle must be NULL if the type is IB_QPT_MAD, IB_QPT_QP0_ALIAS, or IB_QPT_QP1_ALIAS. h_rq_cq A handle to the completion queue that will be used to report receive work request completions. This handle must be NULL if the type is IB_QPT_MAD, IB_QPT_QP0_ALIAS, or IB_QPT_QP1_ALIAS. h_srq A handle to an SRQ to get receive completions via. Must be coded NULL when QP is not associated with SRQ sq_signaled A flag that is used to indicate whether the queue pair will signal an event upon completion of a send work request. If set to TRUE, send work requests will always generate a completion event. If set to FALSE, a completion event will only be generated if the send_opt field of the send work request has the IB_SEND_OPT_SIGNALED flag set.
SEE ALSO
ib_qp_type_t, ib_qp_attr_t
NAME
ib_qp_mod_t
DESCRIPTION
Information needed to change the state of a queue pair through the ib_modify_qp call.
SYNOPSIS
typedef struct _ib_qp_mod { ib_qp_state_t req_state; union _qp_state { struct _qp_init { uint8_t primary_port; ib_net32_t qkey; uint16_t pkey_index; ib_access_t access_ctrl; } init; struct _qp_rtr { ib_net32_t rq_psn; ib_net32_t dest_qp; ib_av_attr_t primary_av; uint8_t resp_res; uint8_t rnr_nak_timeout; ib_qp_opts_t opts; ib_av_attr_t alternate_av; ib_net32_t qkey; uint16_t pkey_index; ib_access_t access_ctrl; uint32_t sq_depth; uint32_t rq_depth; } rtr; struct _qp_rts { ib_net32_t sq_psn; uint8_t retry_cnt; uint8_t rnr_retry_cnt; uint8_t local_ack_timeout; uint8_t init_depth; ib_qp_opts_t opts; uint8_t rnr_nak_timeout; ib_qp_state_t current_state; ib_net32_t qkey; ib_access_t access_ctrl; uint8_t resp_res; ib_av_attr_t primary_av; ib_av_attr_t alternate_av; uint32_t sq_depth; uint32_t rq_depth; ib_apm_state_t apm_state; uint8_t primary_port; uint16_t pkey_index; } rts; struct _qp_sqd { boolean_t sqd_event; } sqd; } state; } ib_qp_mod_t;
SEE ALSO
ib_qp_state_t, ib_access_t, ib_av_attr_t, ib_apm_state_t
NAME
ib_qp_opts_t
DESCRIPTION
Optional fields supplied in the modify QP operation.
SYNOPSIS
typedef uint32_t ib_qp_opts_t; #define IB_MOD_QP_ALTERNATE_AV 0x00000001 #define IB_MOD_QP_PKEY 0x00000002 #define IB_MOD_QP_APM_STATE 0x00000004 #define IB_MOD_QP_PRIMARY_AV 0x00000008 #define IB_MOD_QP_RNR_NAK_TIMEOUT 0x00000010 #define IB_MOD_QP_RESP_RES 0x00000020 #define IB_MOD_QP_INIT_DEPTH 0x00000040 #define IB_MOD_QP_PRIMARY_PORT 0x00000080 #define IB_MOD_QP_ACCESS_CTRL 0x00000100 #define IB_MOD_QP_QKEY 0x00000200 #define IB_MOD_QP_SQ_DEPTH 0x00000400 #define IB_MOD_QP_RQ_DEPTH 0x00000800 #define IB_MOD_QP_CURRENT_STATE 0x00001000 #define IB_MOD_QP_RETRY_CNT 0x00002000 #define IB_MOD_QP_LOCAL_ACK_TIMEOUT 0x00004000 #define IB_MOD_QP_RNR_RETRY_CNT 0x00008000
SEE ALSO
ib_qp_mod_t
NAME
ib_qp_state_t
DESCRIPTION
Indicates or sets the state of a queue pair. The current state of a queue pair is returned through the ib_qp_query call and set via the ib_qp_modify call.
SYNOPSIS
typedef uint32_t ib_qp_state_t; #define IB_QPS_RESET 0x00000001 #define IB_QPS_INIT 0x00000002 #define IB_QPS_RTR 0x00000004 #define IB_QPS_RTS 0x00000008 #define IB_QPS_SQD 0x00000010 #define IB_QPS_SQD_DRAINING 0x00000030 #define IB_QPS_SQD_DRAINED 0x00000050 #define IB_QPS_SQERR 0x00000080 #define IB_QPS_ERROR 0x00000100 #define IB_QPS_TIME_WAIT 0xDEAD0000 /* InfiniBand Access Layer */
NAME
ib_qp_type_t
DESCRIPTION
Indicates the type of queue pair being created.
SYNOPSIS
typedef enum _ib_qp_type { IB_QPT_RELIABLE_CONN = 0, /* Matches CM REQ transport type */ IB_QPT_UNRELIABLE_CONN = 1, /* Matches CM REQ transport type */ IB_QPT_UNRELIABLE_DGRM = 3, /* Purposefully skip RDD type. */ IB_QPT_QP0, IB_QPT_QP1, IB_QPT_RAW_IPV6, IB_QPT_RAW_ETHER, IB_QPT_MAD, /* InfiniBand Access Layer */ IB_QPT_QP0_ALIAS, /* InfiniBand Access Layer */ IB_QPT_QP1_ALIAS, /* InfiniBand Access Layer */ IB_QPT_UNKNOWN } ib_qp_type_t;
VALUES
IB_QPT_RELIABLE_CONN Reliable, connected queue pair. IB_QPT_UNRELIABLE_CONN Unreliable, connected queue pair. IB_QPT_UNRELIABLE_DGRM Unreliable, datagram queue pair. IB_QPT_QP0 Queue pair 0. IB_QPT_QP1 Queue pair 1. IB_QPT_RAW_DGRM Raw datagram queue pair. IB_QPT_RAW_IPV6 Raw IP version 6 queue pair. IB_QPT_RAW_ETHER Raw Ethernet queue pair. IB_QPT_MAD Unreliable, datagram queue pair that will send and receive management datagrams with assistance from the access layer. IB_QPT_QP0_ALIAS Alias to queue pair 0. Aliased QPs can only be created on an aliased protection domain. IB_QPT_QP1_ALIAS Alias to queue pair 1. Aliased QPs can only be created on an aliased protection domain.
NAME
ib_recv_opt_t
DESCRIPTION
Indicates optional fields valid in a receive work completion.
SYNOPSIS
typedef uint32_t ib_recv_opt_t; #define IB_RECV_OPT_IMMEDIATE 0x00000001 #define IB_RECV_OPT_FORWARD 0x00000002 #define IB_RECV_OPT_GRH_VALID 0x00000004 #define IB_RECV_OPT_VEND_MASK 0xFFFF0000
VALUES
IB_RECV_OPT_IMMEDIATE Indicates that immediate data is valid for this work completion. IB_RECV_OPT_FORWARD Indicates that the received trap should be forwarded to the SM. IB_RECV_OPT_GRH_VALID Indicates presence of the global route header. When set, the first 40 bytes received are the GRH. IB_RECV_OPT_VEND_MASK This mask indicates bits reserved in the receive options that may be used by the verbs provider to indicate vendor specific options. Bits set in this area of the receive options are ignored by the Access Layer, but may have specific meaning to the underlying VPD.
NAME
ib_recv_wr_t
DESCRIPTION
Information used to submit a work request to the receive queue of a queue pair.
SYNOPSIS
typedef struct _ib_recv_wr { TO_LONG_PTR( struct _ib_recv_wr* , p_next) ; uint64_t wr_id; uint32_t num_ds; TO_LONG_PTR( ib_local_ds_t* , ds_array) ; } ib_recv_wr_t;
FIELDS
p_next A pointer used to chain work requests together. This permits multiple work requests to be posted to a queue pair through a single function call. This value is set to NULL to mark the end of the chain. wr_id A 64-bit work request identifier that is returned to the consumer as part of the work completion. num_ds Number of local data segments specified by this work request. ds_array A reference to an array of local data segments used by the send operation.
SEE ALSO
ib_local_ds_t
NAME
ib_rej_status_t
DESCRIPTION
Rejection reasons.
SYNOPSIS
typedef ib_net16_t ib_rej_status_t;
SEE ALSO
ib_cm_rej, ib_cm_rej_rec_t
SOURCE
#define IB_REJ_INSUF_QP CL_HTON16(1) #define IB_REJ_INSUF_EEC CL_HTON16(2) #define IB_REJ_INSUF_RESOURCES CL_HTON16(3) #define IB_REJ_TIMEOUT CL_HTON16(4) #define IB_REJ_UNSUPPORTED CL_HTON16(5) #define IB_REJ_INVALID_COMM_ID CL_HTON16(6) #define IB_REJ_INVALID_COMM_INSTANCE CL_HTON16(7) #define IB_REJ_INVALID_SID CL_HTON16(8) #define IB_REJ_INVALID_XPORT CL_HTON16(9) #define IB_REJ_STALE_CONN CL_HTON16(10) #define IB_REJ_RDC_NOT_EXIST CL_HTON16(11) #define IB_REJ_INVALID_GID CL_HTON16(12) #define IB_REJ_INVALID_LID CL_HTON16(13) #define IB_REJ_INVALID_SL CL_HTON16(14) #define IB_REJ_INVALID_TRAFFIC_CLASS CL_HTON16(15) #define IB_REJ_INVALID_HOP_LIMIT CL_HTON16(16) #define IB_REJ_INVALID_PKT_RATE CL_HTON16(17) #define IB_REJ_INVALID_ALT_GID CL_HTON16(18) #define IB_REJ_INVALID_ALT_LID CL_HTON16(19) #define IB_REJ_INVALID_ALT_SL CL_HTON16(20) #define IB_REJ_INVALID_ALT_TRAFFIC_CLASS CL_HTON16(21) #define IB_REJ_INVALID_ALT_HOP_LIMIT CL_HTON16(22) #define IB_REJ_INVALID_ALT_PKT_RATE CL_HTON16(23) #define IB_REJ_PORT_REDIRECT CL_HTON16(24) #define IB_REJ_INVALID_MTU CL_HTON16(26) #define IB_REJ_INSUFFICIENT_RESP_RES CL_HTON16(27) #define IB_REJ_USER_DEFINED CL_HTON16(28) #define IB_REJ_INVALID_RNR_RETRY CL_HTON16(29) #define IB_REJ_DUPLICATE_LOCAL_COMM_ID CL_HTON16(30) #define IB_REJ_INVALID_CLASS_VER CL_HTON16(31) #define IB_REJ_INVALID_FLOW_LBL CL_HTON16(32) #define IB_REJ_INVALID_ALT_FLOW_LBL CL_HTON16(33)
NAME
ib_send_opt_t
DESCRIPTION
Optional flags used when posting send work requests. These flags indicate specific processing for the send operation.
SYNOPSIS
typedef uint32_t ib_send_opt_t; #define IB_SEND_OPT_IMMEDIATE 0x00000001 #define IB_SEND_OPT_FENCE 0x00000002 #define IB_SEND_OPT_SIGNALED 0x00000004 #define IB_SEND_OPT_SOLICITED 0x00000008 #define IB_SEND_OPT_INLINE 0x00000010 #define IB_SEND_OPT_LOCAL 0x00000020 #define IB_SEND_OPT_VEND_MASK 0xFFFF0000
VALUES
The following flags determine the behavior of a work request when posted to the send side. IB_SEND_OPT_IMMEDIATE Send immediate data with the given request. IB_SEND_OPT_FENCE The operation is fenced. Complete all pending send operations before processing this request. IB_SEND_OPT_SIGNALED If the queue pair is configured for signaled completion, then generate a completion queue entry when this request completes. IB_SEND_OPT_SOLICITED Set the solicited bit on the last packet of this request. IB_SEND_OPT_INLINE Indicates that the requested send data should be copied into a VPD owned data buffer. This flag permits the user to issue send operations without first needing to register the buffer(s) associated with the send operation. Verb providers that support this operation may place vendor specific restrictions on the size of send operation that may be performed as inline. IB_SEND_OPT_LOCAL Indicates that a sent MAD request should be given to the local VPD for processing. MADs sent using this option are not placed on the wire. This send option is only valid for MAD send operations. IB_SEND_OPT_VEND_MASK This mask indicates bits reserved in the send options that may be used by the verbs provider to indicate vendor specific options. Bits set in this area of the send options are ignored by the Access Layer, but may have specific meaning to the underlying VPD.
NAME
ib_send_wr_t
DESCRIPTION
Information used to submit a work request to the send queue of a queue pair.
SYNOPSIS
typedef struct _ib_send_wr { TO_LONG_PTR( struct _ib_send_wr* , p_next) ; uint64_t wr_id; ib_wr_type_t wr_type; ib_send_opt_t send_opt; uint32_t num_ds; TO_LONG_PTR( ib_local_ds_t* , ds_array) ; ib_net32_t immediate_data; union _send_dgrm { struct _send_ud { ib_net32_t remote_qp; ib_net32_t remote_qkey; ib_av_handle_t __ptr64 h_av; uint16_t pkey_index; TO_LONG_PTR( void* , rsvd) ; } ud; struct _send_raw_ether { ib_net16_t dest_lid; uint8_t path_bits; uint8_t sl; uint8_t max_static_rate; ib_net16_t ether_type; } raw_ether; struct _send_raw_ipv6 { ib_net16_t dest_lid; uint8_t path_bits; uint8_t sl; uint8_t max_static_rate; } raw_ipv6; } dgrm; struct _send_remote_ops { uint64_t vaddr; net32_t rkey; ib_net64_t atomic1; ib_net64_t atomic2; } remote_ops; } ib_send_wr_t;
FIELDS
p_next A pointer used to chain work requests together. This permits multiple work requests to be posted to a queue pair through a single function call. This value is set to NULL to mark the end of the chain. wr_id A 64-bit work request identifier that is returned to the consumer as part of the work completion. wr_type The type of work request being submitted to the send queue. send_opt Optional send control parameters. num_ds Number of local data segments specified by this work request. ds_array A reference to an array of local data segments used by the send operation. immediate_data 32-bit field sent as part of a message send or RDMA write operation. This field is only valid if the send_opt flag IB_SEND_OPT_IMMEDIATE has been set. dgrm.ud.remote_qp Identifies the destination queue pair of an unreliable datagram send operation. dgrm.ud.remote_qkey The qkey for the destination queue pair. dgrm.ud.h_av An address vector that specifies the path information used to route the outbound datagram to the destination queue pair. dgrm.ud.pkey_index The pkey index for this send work request. This is valid only for IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types. The work request is posted to using this pkey index build the GMP's BTH instead of the QP's pkey. dgrm.ud.rsvd Reserved for use by the Access Layer. dgrm.raw_ether.dest_lid The destination LID that will receive this raw ether send. dgrm.raw_ether.path_bits path bits... dgrm.raw_ether.sl service level... dgrm.raw_ether.max_static_rate static rate... dgrm.raw_ether.ether_type ether type... dgrm.raw_ipv6.dest_lid The destination LID that will receive this raw ether send. dgrm.raw_ipv6.path_bits path bits... dgrm.raw_ipv6.sl service level... dgrm.raw_ipv6.max_static_rate static rate... remote_ops.vaddr The registered virtual memory address of the remote memory to access with an RDMA or atomic operation. remote_ops.rkey The rkey associated with the specified remote vaddr. This data must be presented exactly as obtained from the remote node. No swapping of data must be performed. atomic1 The first operand for an atomic operation. atomic2 The second operand for an atomic operation.
NOTES
The format of data sent over the fabric is user-defined and is considered opaque to the access layer. The sole exception to this are MADs posted to a MAD QP service. MADs are expected to match the format defined by the Infiniband specification and must be in network-byte order when posted to the MAD QP service.
SEE ALSO
ib_wr_type_t, ib_local_ds_t, ib_send_opt_t
NAME
ib_srq_attr_mask_t
DESCRIPTION
Indicates valid fields in ib_srq_attr_t structure
SYNOPSIS
typedef enum _ib_srq_attr_mask { IB_SRQ_MAX_WR = 1 << 0, IB_SRQ_LIMIT = 1 << 1, } ib_srq_attr_mask_t;
NAME
ib_srq_attr_t
DESCRIPTION
Attributes used to initialize a shared queue pair at creation time.
SYNOPSIS
typedef struct _ib_srq_attr { uint32_t max_wr; uint32_t max_sge; uint32_t srq_limit; } ib_srq_attr_t;
FIELDS
max_wr Specifies the max number of work request on SRQ. max_sge Specifies the max number of scatter/gather elements in one work request. srq_limit Specifies the low water mark for SRQ.
SEE ALSO
ib_qp_type_t, ib_srq_attr_mask_t
NAME
ib_wc_status_t
DESCRIPTION
Indicates the status of a completed work request. These VALUES are returned to the user when retrieving completions. Note that success is identified as IB_WCS_SUCCESS, which is always zero.
SYNOPSIS
typedef enum _ib_wc_status_t { IB_WCS_SUCCESS, IB_WCS_LOCAL_LEN_ERR, IB_WCS_LOCAL_OP_ERR, IB_WCS_LOCAL_PROTECTION_ERR, IB_WCS_WR_FLUSHED_ERR, IB_WCS_MEM_WINDOW_BIND_ERR, IB_WCS_REM_ACCESS_ERR, IB_WCS_REM_OP_ERR, IB_WCS_RNR_RETRY_ERR, IB_WCS_TIMEOUT_RETRY_ERR, IB_WCS_REM_INVALID_REQ_ERR, IB_WCS_BAD_RESP_ERR, IB_WCS_LOCAL_ACCESS_ERR, IB_WCS_GENERAL_ERR, IB_WCS_UNMATCHED_RESPONSE, /* InfiniBand Access Layer */ IB_WCS_CANCELED, /* InfiniBand Access Layer */ IB_WCS_UNKNOWN /* Must be last. */ } ib_wc_status_t;
VALUES
IB_WCS_SUCCESS Work request completed successfully. IB_WCS_MAD The completed work request was associated with a managmenet datagram that requires post processing. The MAD will be returned to the user through a callback once all post processing has completed. IB_WCS_LOCAL_LEN_ERR Generated for a work request posted to the send queue when the total of the data segment lengths exceeds the message length of the channel. Generated for a work request posted to the receive queue when the total of the data segment lengths is too small for a valid incoming message. IB_WCS_LOCAL_OP_ERR An internal QP consistency error was generated while processing this work request. This may indicate that the QP was in an incorrect state for the requested operation. IB_WCS_LOCAL_PROTECTION_ERR The data segments of the locally posted work request did not refer to a valid memory region. The memory may not have been properly registered for the requested operation. IB_WCS_WR_FLUSHED_ERR The work request was flushed from the QP before being completed. IB_WCS_MEM_WINDOW_BIND_ERR A memory window bind operation failed due to insufficient access rights. IB_WCS_REM_ACCESS_ERR, A protection error was detected at the remote node for a RDMA or atomic operation. IB_WCS_REM_OP_ERR, The operation could not be successfully completed at the remote node. This may indicate that the remote QP was in an invalid state or contained an invalid work request. IB_WCS_RNR_RETRY_ERR, The RNR retry count was exceeded while trying to send this message. IB_WCS_TIMEOUT_RETRY_ERR The local transport timeout counter expired while trying to send this message. IB_WCS_REM_INVALID_REQ_ERR, The remote node detected an invalid message on the channel. This error is usually a result of one of the following: - The operation was not supported on receive queue. - There was insufficient buffers to receive a new RDMA request. - There was insufficient buffers to receive a new atomic operation. - An RDMA request was larger than 2^31 bytes. IB_WCS_BAD_RESP_ERR, An unexpected transport layer opcode was returned by the responder. IB_WCS_LOCAL_ACCESS_ERR, A protection error occurred on a local data buffer during the processing of a RDMA Write with Immediate Data operation sent from the remote node. IB_WCS_UNMATCHED_RESPONSE A response MAD was received for which there was no matching send. The send operation may have been canceled by the user or may have timed out. IB_WCS_CANCELED The completed work request was canceled by the user. IB_WCS_GENERAL_ERR, Any other error
NAME
ib_wc_t
DESCRIPTION
Work completion information.
SYNOPSIS
typedef struct _ib_wc { TO_LONG_PTR( struct _ib_wc* , p_next) ; uint64_t wr_id; ib_wc_type_t wc_type; uint32_t length; ib_wc_status_t status; uint64_t vendor_specific; union _wc_recv { struct _wc_conn { ib_recv_opt_t recv_opt; ib_net32_t immediate_data; } conn; struct _wc_ud { ib_recv_opt_t recv_opt; ib_net32_t immediate_data; ib_net32_t remote_qp; uint16_t pkey_index; ib_net16_t remote_lid; uint8_t remote_sl; uint8_t path_bits; } ud; struct _wc_raw_ipv6 { ib_net16_t remote_lid; uint8_t remote_sl; uint8_t path_bits; } raw_ipv6; struct _wc_raw_ether { ib_net16_t remote_lid; uint8_t remote_sl; uint8_t path_bits; ib_net16_t ether_type; } raw_ether; } recv; } ib_wc_t;
FIELDS
p_next A pointer used to chain work completions. This permits multiple work completions to be retrieved from a completion queue through a single function call. This value is set to NULL to mark the end of the chain. wr_id The 64-bit work request identifier that was specified when posting the work request. wc_type Indicates the type of work completion. length The total length of the data sent or received with the work request. status The result of the work request. vendor_specific HCA vendor specific information returned as part of the completion. recv.conn.recv_opt Indicates optional fields valid as part of a work request that completed on a connected (reliable or unreliable) queue pair. recv.conn.immediate_data 32-bit field received as part of an inbound message on a connected queue pair. This field is only valid if the recv_opt flag IB_RECV_OPT_IMMEDIATE has been set. recv.ud.recv_opt Indicates optional fields valid as part of a work request that completed on an unreliable datagram queue pair. recv.ud.immediate_data 32-bit field received as part of an inbound message on a unreliable datagram queue pair. This field is only valid if the recv_opt flag IB_RECV_OPT_IMMEDIATE has been set. recv.ud.remote_qp Identifies the source queue pair of a received datagram. recv.ud.pkey_index The pkey index of the source queue pair. This is valid only for IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types. recv.ud.remote_lid The source LID of the received datagram. recv.ud.remote_sl The service level used by the source of the received datagram. recv.ud.path_bits path bits... recv.raw_ipv6.remote_lid The source LID of the received message. recv.raw_ipv6.remote_sl The service level used by the source of the received message. recv.raw_ipv6.path_bits path bits... recv.raw_ether.remote_lid The source LID of the received message. recv.raw_ether.remote_sl The service level used by the source of the received message. recv.raw_ether.path_bits path bits... recv.raw_ether.ether_type ether type...
NOTES
When the work request completes with error, the only values that the consumer can depend on are the wr_id field, and the status of the operation. If the consumer is using the same CQ for completions from more than one type of QP (i.e Reliable Connected, Datagram etc), then the consumer must have additional information to decide what fields of the union are valid.
SEE ALSO
ib_wc_type_t, ib_qp_type_t, ib_wc_status_t, ib_recv_opt_t
NAME
ib_wc_type_t
DESCRIPTION
Indicates the type of work completion.
SYNOPSIS
typedef enum _ib_wc_type_t { IB_WC_SEND, IB_WC_RDMA_WRITE, IB_WC_RECV, IB_WC_RDMA_READ, IB_WC_MW_BIND, IB_WC_FETCH_ADD, IB_WC_COMPARE_SWAP, IB_WC_RECV_RDMA_WRITE, IB_WC_UNKNOWN } ib_wc_type_t;
NAME
ib_wr_type_t
DESCRIPTION
Identifies the type of work request posted to a queue pair.
SYNOPSIS
typedef enum _ib_wr_type_t { WR_SEND = 1, WR_RDMA_WRITE, WR_RDMA_READ, WR_COMPARE_SWAP, WR_FETCH_ADD, WR_UNKNOWN } ib_wr_type_t;
NAME
mlnx_fmr_create_t
DESCRIPTION
Information required to create a Mellanox fast memory region.
SYNOPSIS
typedef struct _mlnx_fmr_create { int max_pages; int max_maps; uint8_t page_size; ib_access_t access_ctrl; } mlnx_fmr_create_t;
FIELDS
max_pages max pages in the region. max_maps max times, the region can be mapped before remapping. page_size log2 of the page size (e.g. 12 for 4KB). access_ctrl Access rights of the registered region.
NOTES
This is a Mellanox specific extension to verbs.
SEE ALSO
ib_access_t
NAME
IB_CLASS_CAP_GETSET
DESCRIPTION
ClassPortInfo CapabilityMask bits. This bit will be set if the class supports Get(Notice) and Set(Notice) MADs (13.4.8.1).
SEE ALSO
ib_class_port_info_t, IB_CLASS_CAP_TRAP
SOURCE
#define IB_CLASS_CAP_GETSET 0x0002
NAME
IB_CLASS_CAP_TRAP
DESCRIPTION
ClassPortInfo CapabilityMask bits. This bit will be set if the class supports Trap() MADs (13.4.8.1).
SEE ALSO
ib_class_port_info_t, IB_CLASS_CAP_GETSET
SOURCE
#define IB_CLASS_CAP_TRAP 0x0001
NAME
IB_CLASS_RESP_TIME_MASK
DESCRIPTION
Mask bits to extract the reponse time value from the resp_time_val field of ib_class_port_info_t.
SEE ALSO
ib_class_port_info_t
SOURCE
#define IB_CLASS_RESP_TIME_MASK 0x1F
NAME
IB_DEFAULT_PARTIAL_PKEY
DESCRIPTION
0x7FFF in network order
SOURCE
#define IB_DEFAULT_PARTIAL_PKEY (CL_HTON16(0x7FFF))
NAME
IB_DEFAULT_PKEY
DESCRIPTION
P_Key value for the default partition.
SOURCE
#define IB_DEFAULT_PKEY 0xFFFF
NAME
IB_DEFAULT_SUBNET_PREFIX
DESCRIPTION
Default subnet GID prefix.
SOURCE
#define IB_DEFAULT_SUBNET_PREFIX (CL_HTON64(0xFE80000000000000ULL))
NAME
IB_INVALID_PORT_NUM
DESCRIPTION
Value used to indicate an invalid port number (14.2.5.10).
SOURCE
#define IB_INVALID_PORT_NUM 0xFF
NAME
IB_LID_MCAST_END
DESCRIPTION
Highest valid multicast LID value.
SOURCE
#define IB_LID_MCAST_END_HO 0xFFFE #define IB_LID_MCAST_END (CL_HTON16(IB_LID_MCAST_END_HO))
NAME
IB_LID_MCAST_START
DESCRIPTION
Lowest valid multicast LID value.
SOURCE
#define IB_LID_MCAST_START_HO 0xC000 #define IB_LID_MCAST_START (CL_HTON16(IB_LID_MCAST_START_HO))
NAME
IB_LID_PERMISSIVE
DESCRIPTION
Permissive LID
SOURCE
#define IB_LID_PERMISSIVE 0xFFFF
NAME
IB_LID_UCAST_END
DESCRIPTION
Highest valid unicast LID value.
SOURCE
#define IB_LID_UCAST_END_HO 0xBFFF #define IB_LID_UCAST_END (CL_HTON16(IB_LID_UCAST_END_HO))
NAME
IB_LID_UCAST_START
DESCRIPTION
Lowest valid unicast LID value.
SOURCE
#define IB_LID_UCAST_START_HO 0x0001 #define IB_LID_UCAST_START (CL_HTON16(IB_LID_UCAST_START_HO))
NAME
ib_link_states_t
DESCRIPTION
Defines the link states of a port.
SOURCE
#define IB_LINK_NO_CHANGE 0 #define IB_LINK_DOWN 1 #define IB_LINK_INIT 2 #define IB_LINK_ARMED 3 #define IB_LINK_ACTIVE 4 #define IB_LINK_ACT_DEFER 5
NAME
IB_MAD_ATTR_CLASS_PORT_INFO
DESCRIPTION
ClassPortInfo attribute (13.4.8)
SOURCE
#define IB_MAD_ATTR_CLASS_PORT_INFO (CL_NTOH16(0x0001))
NAME
IB_MAD_ATTR_DIAG_CODE
DESCRIPTION
DiagCode attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_DIAG_CODE (CL_NTOH16(0x0024))
NAME
IB_MAD_ATTR_DIAGNOSTIC_TIMEOUT
DESCRIPTION
DiagnosticTimeout attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_DIAGNOSTIC_TIMEOUT (CL_NTOH16(0x0020))
NAME
IB_MAD_ATTR_GUID_INFO
DESCRIPTION
GUIDInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_GUID_INFO (CL_NTOH16(0x0014))
NAME
IB_MAD_ATTR_GUIDINFO_RECORD
DESCRIPTION
GuidInfoRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_GUIDINFO_RECORD (CL_NTOH16(0x0030))
NAME
IB_MAD_ATTR_INFORM_INFO
DESCRIPTION
InformInfo attribute (13.4.8)
SOURCE
#define IB_MAD_ATTR_INFORM_INFO (CL_NTOH16(0x0003))
NAME
IB_MAD_ATTR_INFORM_INFO_RECORD
DESCRIPTION
InformInfo Record attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_INFORM_INFO_RECORD (CL_NTOH16(0x00F3))
NAME
IB_MAD_ATTR_IO_CONTROLLER_PROFILE
DESCRIPTION
IOControllerProfile attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_IO_CONTROLLER_PROFILE (CL_NTOH16(0x0011))
NAME
IB_MAD_ATTR_IO_UNIT_INFO
DESCRIPTION
IOUnitInfo attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_IO_UNIT_INFO (CL_NTOH16(0x0010))
NAME
IB_MAD_ATTR_LED_INFO
DESCRIPTION
LedInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_LED_INFO (CL_NTOH16(0x0031))
NAME
IB_MAD_ATTR_LFT_RECORD
DESCRIPTION
LinearForwardingTableRecord attribute (15.2.5.6)
SOURCE
#define IB_MAD_ATTR_LFT_RECORD (CL_NTOH16(0x0015))
NAME
IB_MAD_ATTR_LIN_FWD_TBL
DESCRIPTION
Switch linear forwarding table
SOURCE
#define IB_MAD_ATTR_LIN_FWD_TBL (CL_NTOH16(0x0019))
NAME
IB_MAD_ATTR_LINK_RECORD
DESCRIPTION
LinkRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_LINK_RECORD (CL_NTOH16(0x0020))
NAME
IB_MAD_ATTR_MCAST_FWD_TBL
DESCRIPTION
Switch multicast forwarding table
SOURCE
#define IB_MAD_ATTR_MCAST_FWD_TBL (CL_NTOH16(0x001B))
NAME
IB_MAD_ATTR_MCMEMBER_RECORD
DESCRIPTION
MCMemberRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_MCMEMBER_RECORD (CL_NTOH16(0x0038))
NAME
IB_MAD_ATTR_MULTIPATH_RECORD
DESCRIPTION
MultiPathRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_MULTIPATH_RECORD (CL_NTOH16(0x003A))
NAME
IB_MAD_ATTR_NODE_DESC
DESCRIPTION
NodeDescription attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_NODE_DESC (CL_NTOH16(0x0010))
NAME
IB_MAD_ATTR_NODE_INFO
DESCRIPTION
NodeInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_NODE_INFO (CL_NTOH16(0x0011))
NAME
IB_MAD_ATTR_NODE_RECORD
DESCRIPTION
NodeRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_NODE_RECORD (CL_NTOH16(0x0011))
NAME
IB_MAD_ATTR_NOTICE
DESCRIPTION
Notice attribute (13.4.8)
SOURCE
#define IB_MAD_ATTR_NOTICE (CL_NTOH16(0x0002))
NAME
IB_MAD_ATTR_P_KEY_TABLE
DESCRIPTION
PartitionTable attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_P_KEY_TABLE (CL_NTOH16(0x0016))
NAME
IB_MAD_ATTR_PATH_RECORD
DESCRIPTION
PathRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_PATH_RECORD (CL_NTOH16(0x0035))
NAME
IB_MAD_ATTR_PKEYTBL_RECORD
DESCRIPTION
PKEY Table Record attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_PKEY_TBL_RECORD (CL_NTOH16(0x0033))
NAME
IB_MAD_ATTR_PORT_CNTRS
DESCRIPTION
SwitchInfo attribute (16.1.2)
SOURCE
#define IB_MAD_ATTR_PORT_CNTRS (CL_NTOH16(0x0012))
NAME
IB_MAD_ATTR_PORT_INFO
DESCRIPTION
PortInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_PORT_INFO (CL_NTOH16(0x0015))
NAME
IB_MAD_ATTR_PORT_SMPL_CTRL
DESCRIPTION
NodeDescription attribute (16.1.2)
SOURCE
#define IB_MAD_ATTR_PORT_SMPL_CTRL (CL_NTOH16(0x0010))
NAME
IB_MAD_ATTR_PORT_SMPL_RSLT
DESCRIPTION
NodeInfo attribute (16.1.2)
SOURCE
#define IB_MAD_ATTR_PORT_SMPL_RSLT (CL_NTOH16(0x0011))
NAME
IB_MAD_ATTR_PORTINFO_RECORD
DESCRIPTION
PortInfoRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_PORTINFO_RECORD (CL_NTOH16(0x0012))
NAME
IB_MAD_ATTR_PREPARE_TO_TEST
DESCRIPTION
PrepareToTest attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_PREPARE_TO_TEST (CL_NTOH16(0x0021))
NAME
IB_MAD_ATTR_RND_FWD_TBL
DESCRIPTION
Switch random forwarding table
SOURCE
#define IB_MAD_ATTR_RND_FWD_TBL (CL_NTOH16(0x001A))
NAME
IB_MAD_ATTR_SERVICE_ENTRIES
DESCRIPTION
ServiceEntries attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_SERVICE_ENTRIES (CL_NTOH16(0x0012))
NAME
IB_MAD_ATTR_SERVICE_RECORD
DESCRIPTION
ServiceRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_SERVICE_RECORD (CL_NTOH16(0x0031))
NAME
IB_MAD_ATTR_SLVL_RECORD
DESCRIPTION
SLtoVL Mapping Table Record attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_SLVL_RECORD (CL_NTOH16(0x0013))
NAME
IB_MAD_ATTR_SLVL_TABLE
DESCRIPTION
SL VL Mapping Table attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_SLVL_TABLE (CL_NTOH16(0x0017))
NAME
IB_MAD_ATTR_SM_INFO
DESCRIPTION
SMInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_SM_INFO (CL_NTOH16(0x0020))
NAME
IB_MAD_ATTR_SMINFO_RECORD
DESCRIPTION
SmInfoRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_SMINFO_RECORD (CL_NTOH16(0x0018))
NAME
IB_MAD_ATTR_SVC_ASSOCIATION_RECORD
DESCRIPTION
Service Association Record attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_SVC_ASSOCIATION_RECORD (CL_NTOH16(0x003B))
NAME
IB_MAD_ATTR_SWITCH_INFO
DESCRIPTION
SwitchInfo attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_SWITCH_INFO (CL_NTOH16(0x0012))
NAME
IB_MAD_ATTR_TEST_DEVICE_LOOP
DESCRIPTION
TestDeviceLoop attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_TEST_DEVICE_LOOP (CL_NTOH16(0x0023))
NAME
IB_MAD_ATTR_TEST_DEVICE_ONCE
DESCRIPTION
TestDeviceOnce attribute (16.3.3)
SOURCE
#define IB_MAD_ATTR_TEST_DEVICE_ONCE (CL_NTOH16(0x0022))
NAME
IB_MAD_ATTR_MTRACE_RECORD
DESCRIPTION
TraceRecord attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_TRACE_RECORD (CL_NTOH16(0x0039))
NAME
IB_MAD_ATTR_VENDOR_DIAG
DESCRIPTION
VendorDiag attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_VENDOR_DIAG (CL_NTOH16(0x0030))
NAME
IB_MAD_ATTR_VL_ARBITRATION
DESCRIPTION
VL Arbitration Table attribute (14.2.5)
SOURCE
#define IB_MAD_ATTR_VL_ARBITRATION (CL_NTOH16(0x0018))
NAME
IB_MAD_ATTR_VLARB_RECORD
DESCRIPTION
VL Arbitration Table Record attribute (15.2.5)
SOURCE
#define IB_MAD_ATTR_VLARB_RECORD (CL_NTOH16(0x0036))
NAME
IB_MAD_METHOD_GET
DESCRIPTION
Get() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_GET 0x01
NAME
IB_MAD_METHOD_GET_RESP
DESCRIPTION
GetResp() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_GET_RESP 0x81
NAME
IB_MAD_METHOD_GETTABLE
DESCRIPTION
SubnAdmGetTable() Method (15.2.2)
SOURCE
#define IB_MAD_METHOD_GETTABLE 0x12
NAME
IB_MAD_METHOD_GETTABLE_RESP
DESCRIPTION
SubnAdmGetTableResp() Method (15.2.2)
SOURCE
#define IB_MAD_METHOD_GETTABLE_RESP 0x92
NAME
IB_MAD_METHOD_REPORT
DESCRIPTION
Report() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_REPORT 0x06
NAME
IB_MAD_METHOD_REPORT_RESP
DESCRIPTION
ReportResp() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_REPORT_RESP 0x86
NAME
IB_MAD_METHOD_RESP_MASK
DESCRIPTION
Response mask to extract 'R' bit from the method field. (13.4.5)
SOURCE
#define IB_MAD_METHOD_RESP_MASK 0x80
NAME
IB_MAD_METHOD_SEND
DESCRIPTION
Send() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_SEND 0x03
NAME
IB_MAD_METHOD_SET
DESCRIPTION
Set() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_SET 0x02
NAME
IB_MAD_METHOD_TRAP
DESCRIPTION
Trap() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_TRAP 0x05
NAME
IB_MAD_METHOD_TRAP_REPRESS
DESCRIPTION
TrapRepress() Method (13.4.5)
SOURCE
#define IB_MAD_METHOD_TRAP_REPRESS 0x07
NAME
IB_MAD_STATUS_BUSY
DESCRIPTION
Temporarily busy, MAD discarded (13.4.7)
SOURCE
#define IB_MAD_STATUS_BUSY (CL_HTON16(0x0001))
NAME
IB_MAD_STATUS_INVALID_FIELD
DESCRIPTION
Attribute contains one or more invalid fields (13.4.7)
SOURCE
#define IB_MAD_STATUS_INVALID_FIELD (CL_HTON16(0x001C))
NAME
IB_MAD_STATUS_REDIRECT
DESCRIPTION
QP Redirection required (13.4.7)
SOURCE
#define IB_MAD_STATUS_REDIRECT (CL_HTON16(0x0002))
NAME
IB_MAD_STATUS_UNSUP_CLASS_VER
DESCRIPTION
Unsupported class version (13.4.7)
SOURCE
#define IB_MAD_STATUS_UNSUP_CLASS_VER (CL_HTON16(0x0004))
NAME
IB_MAD_STATUS_UNSUP_METHOD
DESCRIPTION
Unsupported method (13.4.7)
SOURCE
#define IB_MAD_STATUS_UNSUP_METHOD (CL_HTON16(0x0008))
NAME
IB_MAD_STATUS_UNSUP_METHOD_ATTR
DESCRIPTION
Unsupported method/attribute combination (13.4.7)
SOURCE
#define IB_MAD_STATUS_UNSUP_METHOD_ATTR (CL_HTON16(0x000C))
NAME
IB_MAX_METHOD
DESCRIPTION
Total number of methods available to a class, not including the R-bit.
SOURCE
#define IB_MAX_METHODS 128
NAME
IB_MCAST_BLOCK_ID_MASK_HO
DESCRIPTION
Mask (host order) to recover the Multicast block ID.
SOURCE
#define IB_MCAST_BLOCK_ID_MASK_HO 0x000001FF
NAME
IB_MCAST_BLOCK_SIZE
DESCRIPTION
Number of port mask entries in a multicast forwarding table block.
SOURCE
#define IB_MCAST_BLOCK_SIZE 32
NAME
IB_MCAST_MASK_SIZE
DESCRIPTION
Number of port mask bits in each entry in the multicast forwarding table.
SOURCE
#define IB_MCAST_MASK_SIZE 16
NAME
IB_MCAST_MAX_BLOCK_ID
DESCRIPTION
Maximum number of Multicast port mask blocks
SOURCE
#define IB_MCAST_MAX_BLOCK_ID 511
NAME
IB_MCAST_POSITION_MASK_HO
DESCRIPTION
Mask (host order) to recover the multicast block position.
SOURCE
#define IB_MCAST_POSITION_MASK_HO 0xF0000000
NAME
IB_MCAST_POSITION_MAX
DESCRIPTION
Maximum value for the multicast block position.
SOURCE
#define IB_MCAST_POSITION_MAX 0xF
NAME
IB_MCAST_POSITION_SHIFT
DESCRIPTION
Shift value to normalize the multicast block position value.
SOURCE
#define IB_MCAST_POSITION_SHIFT 28
NAME
IB_MCLASS_BIS
DESCRIPTION
Subnet Management Class, BIS
SOURCE
#define IB_MCLASS_BIS 0x12
NAME
IB_MCLASS_BM
DESCRIPTION
Subnet Management Class, Baseboard Manager (13.4.4)
SOURCE
#define IB_MCLASS_BM 0x05
NAME
IB_MCLASS_COMM_MGMT
DESCRIPTION
Subnet Management Class, Communication Management (13.4.4)
SOURCE
#define IB_MCLASS_COMM_MGMT 0x07
NAME
IB_MCLASS_DEV_ADM
DESCRIPTION
Subnet Management Class, Device Administration
SOURCE
#define IB_MCLASS_DEV_ADM 0x10
NAME
IB_MCLASS_DEV_MGMT
DESCRIPTION
Subnet Management Class, Device Management (13.4.4)
SOURCE
#define IB_MCLASS_DEV_MGMT 0x06
NAME
IB_MCLASS_PERF
DESCRIPTION
Subnet Management Class, Performance Manager (13.4.4)
SOURCE
#define IB_MCLASS_PERF 0x04
NAME
IB_MCLASS_SNMP
DESCRIPTION
Subnet Management Class, SNMP Tunneling (13.4.4)
SOURCE
#define IB_MCLASS_SNMP 0x08
NAME
IB_MCLASS_SUBN_ADM
DESCRIPTION
Subnet Management Class, Subnet Administration (13.4.4)
SOURCE
#define IB_MCLASS_SUBN_ADM 0x03
NAME
IB_MCLASS_SUBN_DIR
DESCRIPTION
Subnet Management Class, Subnet Manager directed route (13.4.4)
SOURCE
#define IB_MCLASS_SUBN_DIR 0x81
NAME
IB_MCLASS_SUBN_LID
DESCRIPTION
Subnet Management Class, Subnet Manager LID routed (13.4.4)
SOURCE
#define IB_MCLASS_SUBN_LID 0x01
NAME
IB_MCLASS_VENDOR_HIGH_RANGE_MAX
DESCRIPTION
Subnet Management Class, Vendor Specific High Range End
SOURCE
#define IB_MCLASS_VENDOR_HIGH_RANGE_MAX 0x4f
NAME
IB_MCLASS_VENDOR_HIGH_RANGE_MIN
DESCRIPTION
Subnet Management Class, Vendor Specific High Range Start
SOURCE
#define IB_MCLASS_VENDOR_HIGH_RANGE_MIN 0x30
NAME
IB_MCLASS_VENDOR_LOW_RANGE_MAX
DESCRIPTION
Subnet Management Class, Vendor Specific Low Range End
SOURCE
#define IB_MCLASS_VENDOR_LOW_RANGE_MAX 0x0f
NAME
IB_MCLASS_VENDOR_LOW_RANGE_MIN
DESCRIPTION
Subnet Management Class, Vendor Specific Low Range Start
SOURCE
#define IB_MCLASS_VENDOR_LOW_RANGE_MIN 0x09
NAME
IB_MTU_LEN_TYPE
DESCRIPTION
Encoded path MTU. 1: 256 2: 512 3: 1024 4: 2048 5: 4096 others: reserved
SOURCE
#define IB_MTU_LEN_256 1 #define IB_MTU_LEN_512 2 #define IB_MTU_LEN_1024 3 #define IB_MTU_LEN_2048 4 #define IB_MTU_LEN_4096 5 #define IB_MIN_MTU IB_MTU_LEN_256 #define IB_MAX_MTU IB_MTU_LEN_4096
NAME
IB_MULTIPATH_REC_BASE_MASK
DESCRIPTION
Mask for the base value field for multipath record MTU, rate, and packet lifetime.
SOURCE
#define IB_MULTIPATH_REC_BASE_MASK 0x3F
NAME
IB_NODE_NUM_PORTS_MAX
DESCRIPTION
Maximum number of ports in a single node (14.2.5.7).
SOURCE
#define IB_NODE_NUM_PORTS_MAX 0xFE
NAME
IB_NODE_TYPE_CA
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NODE_TYPE_CA 0x01
NAME
IB_NODE_TYPE_ROUTER
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NODE_TYPE_ROUTER 0x03
NAME
IB_NODE_TYPE_SWITCH
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NODE_TYPE_SWITCH 0x02
NAME
IB_NOTICE_NODE_TYPE_CA
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NOTICE_NODE_TYPE_CA (CL_NTOH32(0x000001))
NAME
IB_NOTICE_NODE_TYPE_ROUTER
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NOTICE_NODE_TYPE_ROUTER (CL_NTOH32(0x000003))
NAME
IB_NOTICE_NODE_TYPE_SUBN_MGMT
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2). Note that this value is not defined for the NodeType field of the NodeInfo attribute (14.2.5.3).
SOURCE
#define IB_NOTICE_NODE_TYPE_SUBN_MGMT (CL_NTOH32(0x000004))
NAME
IB_NOTICE_NODE_TYPE_SWITCH
DESCRIPTION
Encoded generic node type used in MAD attributes (13.4.8.2)
SOURCE
#define IB_NOTICE_NODE_TYPE_SWITCH (CL_NTOH32(0x000002))
NAME
IB_PATH_REC_BASE_MASK
DESCRIPTION
Mask for the base value field for path record MTU, rate, and packet lifetime.
SOURCE
#define IB_PATH_REC_BASE_MASK 0x3F
NAME
IB_PATH_REC_SELECTOR_MASK
DESCRIPTION
Mask for the selector field for path record MTU, rate, and packet lifetime.
SOURCE
#define IB_PATH_REC_SELECTOR_MASK 0xC0
NAME
IB_PATH_SELECTOR_TYPE
DESCRIPTION
Path selector. 0: greater than specified 1: less than specified 2: exactly the specified 3: largest available
SOURCE
#define IB_PATH_SELECTOR_GREATER_THAN 0 #define IB_PATH_SELECTOR_LESS_THAN 1 #define IB_PATH_SELECTOR_EXACTLY 2 #define IB_PATH_SELECTOR_LARGEST 3
NAME
IB_PKEY_BASE_MASK
DESCRIPTION
Masks for the base P_Key value given a P_Key Entry.
SOURCE
#define IB_PKEY_BASE_MASK (CL_HTON16(0x7FFF))
NAME
IB_PKEY_ENTRIES_MAX
DESCRIPTION
Maximum number of PKEY entries per port (14.2.5.7).
SOURCE
#define IB_PKEY_ENTRIES_MAX (IB_PKEY_MAX_BLOCKS * IB_PKEY_BLOCK_SIZE)
NAME
IB_PKEY_MAX_BLOCKS
DESCRIPTION
Maximum number of PKEY blocks (14.2.5.7).
SOURCE
#define IB_PKEY_MAX_BLOCKS 2048
NAME
IB_PKEY_TYPE_MASK
DESCRIPTION
Masks for the P_Key membership type given a P_Key Entry.
SOURCE
#define IB_PKEY_TYPE_MASK (CL_NTOH16(0x8000))
NAME
IB_QP1_WELL_KNOWN_Q_KEY
DESCRIPTION
Well-known Q_Key for QP1 privileged mode access (15.4.2).
SOURCE
#define IB_QP1_WELL_KNOWN_Q_KEY CL_NTOH32(0x80010000)
NAME
IB_SMINFO_ATTR_MOD_ACKNOWLEDGE
DESCRIPTION
Encoded attribute modifier value used on SubnSet(SMInfo) SMPs.
SOURCE
#define IB_SMINFO_ATTR_MOD_ACKNOWLEDGE (CL_NTOH32(0x000002))
NAME
IB_SMINFO_ATTR_MOD_DISABLE
DESCRIPTION
Encoded attribute modifier value used on SubnSet(SMInfo) SMPs.
SOURCE
#define IB_SMINFO_ATTR_MOD_DISABLE (CL_NTOH32(0x000003))
NAME
IB_SMINFO_ATTR_MOD_DISCOVER
DESCRIPTION
Encoded attribute modifier value used on SubnSet(SMInfo) SMPs.
SOURCE
#define IB_SMINFO_ATTR_MOD_DISCOVER (CL_NTOH32(0x000005))
NAME
IB_SMINFO_ATTR_MOD_HANDOVER
DESCRIPTION
Encoded attribute modifier value used on SubnSet(SMInfo) SMPs.
SOURCE
#define IB_SMINFO_ATTR_MOD_HANDOVER (CL_NTOH32(0x000001))
NAME
IB_SMINFO_ATTR_MOD_STANDBY
DESCRIPTION
Encoded attribute modifier value used on SubnSet(SMInfo) SMPs.
SOURCE
#define IB_SMINFO_ATTR_MOD_STANDBY (CL_NTOH32(0x000004))
NAME
IB_SMINFO_STATE_DISCOVERING
DESCRIPTION
Encoded state value used in the SMInfo attribute.
SOURCE
#define IB_SMINFO_STATE_DISCOVERING 1
NAME
IB_SMINFO_STATE_INIT
DESCRIPTION
Encoded state value used in the SMInfo attribute.
SOURCE
#define IB_SMINFO_STATE_INIT 4
NAME
IB_SMINFO_STATE_MASTER
DESCRIPTION
Encoded state value used in the SMInfo attribute.
SOURCE
#define IB_SMINFO_STATE_MASTER 3
NAME
IB_SMINFO_STATE_NOTACTIVE
DESCRIPTION
Encoded state value used in the SMInfo attribute.
SOURCE
#define IB_SMINFO_STATE_NOTACTIVE 0
NAME
IB_SMINFO_STATE_STANDBY
DESCRIPTION
Encoded state value used in the SMInfo attribute.
SOURCE
#define IB_SMINFO_STATE_STANDBY 2
NAME
IB_SMP_DIRECTION
DESCRIPTION
The Direction bit for directed route SMPs.
SOURCE
#define IB_SMP_DIRECTION_HO 0x8000 #define IB_SMP_DIRECTION (CL_HTON16(IB_SMP_DIRECTION_HO))
NAME
IB_SMP_STATUS_MASK
DESCRIPTION
Mask value for extracting status from a directed route SMP.
SOURCE
#define IB_SMP_STATUS_MASK_HO 0x7FFF #define IB_SMP_STATUS_MASK (CL_HTON16(IB_SMP_STATUS_MASK_HO))
NAME
IB_SUBNET_PATH_HOPS_MAX
DESCRIPTION
Maximum number of directed route switch hops in a subnet (14.2.1.2).
SOURCE
#define IB_SUBNET_PATH_HOPS_MAX 64
NAME
Join States
DESCRIPTION
Defines the join state flags for multicast group management.
SOURCE
#define IB_JOIN_STATE_FULL 1 #define IB_JOIN_STATE_NON 2 #define IB_JOIN_STATE_SEND_ONLY 4
NAME
MAD_BLOCK_GRH_SIZE
DESCRIPTION
Size of a MAD datagram, including the GRH.
SOURCE
#define MAD_BLOCK_GRH_SIZE 296
NAME
MAD_BLOCK_SIZE
DESCRIPTION
Size of a non-RMPP MAD datagram.
SOURCE
#define MAD_BLOCK_SIZE 256
NAME
MAD_RMPP_DATA_SIZE
DESCRIPTION
Size of an RMPP transaction data section.
SOURCE
#define MAD_RMPP_DATA_SIZE (MAD_BLOCK_SIZE - MAD_RMPP_HDR_SIZE)
NAME
MAD_RMPP_HDR_SIZE
DESCRIPTION
Size of an RMPP header, including the common MAD header.
SOURCE
#define MAD_RMPP_HDR_SIZE 36
NAME
DM_SVC_NAME
DESCRIPTION
IBA defined Device Management service name (16.3)
SYNOPSIS
#define DM_SVC_NAME "DeviceManager.IBTA"
SEE ALSO
NAME
ib_class_is_rmpp
DESCRIPTION
Indicates if the Class Code supports RMPP
SYNOPSIS
AL_INLINE boolean_t AL_API ib_class_is_rmpp( IN const uint8_t class_code ) { return( (class_code == IB_MCLASS_SUBN_ADM) || (class_code == IB_MCLASS_DEV_MGMT) || (class_code == IB_MCLASS_DEV_ADM) || (class_code == IB_MCLASS_BIS) || ib_class_is_vendor_specific_high( class_code ) ); }
PARAMETERS
class_code [in] The Management Datagram Class Code
RETURN VALUE
TRUE if the class supports RMPP FALSE otherwise.
NOTES
NAME
ib_class_is_vendor_specific
DESCRIPTION
Indicates if the Class Code if a vendor specific class
SYNOPSIS
static inline boolean_t ib_class_is_vendor_specific( IN const uint8_t class_code ) { return( ib_class_is_vendor_specific_low(class_code) || ib_class_is_vendor_specific_high(class_code) ); }
PARAMETERS
class_code [in] The Management Datagram Class Code
RETURN VALUE
TRUE if the class is a Vendor Specific MAD FALSE otherwise.
NOTES
SEE ALSO
ib_class_is_vendor_specific_low, ib_class_is_vendor_specific_high
NAME
ib_class_is_vendor_specific_high
DESCRIPTION
Indicates if the Class Code if a vendor specific class from the high range
SYNOPSIS
static inline boolean_t ib_class_is_vendor_specific_high( IN const uint8_t class_code ) { return( (class_code >= IB_MCLASS_VENDOR_HIGH_RANGE_MIN) && (class_code <= IB_MCLASS_VENDOR_HIGH_RANGE_MAX)) ; }
PARAMETERS
class_code [in] The Management Datagram Class Code
RETURN VALUE
TRUE if the class is in the High range of Vendor Specific MADs FALSE otherwise.
NOTES
SEE ALSO
IB_MCLASS_VENDOR_HIGH_RANGE_MIN, IB_MCLASS_VENDOR_HIGH_RANGE_MAX
NAME
ib_class_is_vendor_specific_low
DESCRIPTION
Indicates if the Class Code if a vendor specific class from the low range
SYNOPSIS
static inline boolean_t ib_class_is_vendor_specific_low( IN const uint8_t class_code ) { return( (class_code >= IB_MCLASS_VENDOR_LOW_RANGE_MIN) && (class_code <= IB_MCLASS_VENDOR_LOW_RANGE_MAX)) ; }
PARAMETERS
class_code [in] The Management Datagram Class Code
RETURN VALUE
TRUE if the class is in the Low range of Vendor Specific MADs FALSE otherwise.
NOTES
SEE ALSO
IB_MCLASS_VENDOR_LOW_RANGE_MIN, IB_MCLASS_VENDOR_LOW_RANGE_MAX
NAME
ib_class_port_info_t
DESCRIPTION
IBA defined ClassPortInfo attribute (13.4.8.1) route between two end-points on a subnet.
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_class_port_info { uint8_t base_ver; uint8_t class_ver; ib_net16_t cap_mask; ib_net32_t resp_time_val; ib_gid_t redir_gid; ib_net32_t redir_tc_sl_fl; ib_net16_t redir_lid; ib_net16_t redir_pkey; ib_net32_t redir_qp; ib_net32_t redir_qkey; ib_gid_t trap_gid; ib_net32_t trap_tc_sl_fl; ib_net16_t trap_lid; ib_net16_t trap_pkey; ib_net32_t trap_hop_qp; ib_net32_t trap_qkey; } PACK_SUFFIX ib_class_port_info_t; #include <complib/cl_packoff.h>
FIELDS
base_ver Maximum supported MAD Base Version. class_ver Maximum supported management class version. cap_mask Supported capabilities of this management class. resp_time_value Maximum expected response time. redr_gid GID to use for redirection, or zero recdir_tc_sl_fl Traffic class, service level and flow label the requester should use if the service is redirected. redir_lid LID used for redirection, or zero redir_pkey P_Key used for redirection redir_qp QP number used for redirection redir_qkey Q_Key associated with the redirected QP. This shall be the well known Q_Key value. trap_gid GID value used for trap messages from this service. trap_tc_sl_fl Traffic class, service level and flow label used for trap messages originated by this service. trap_lid LID used for trap messages, or zero trap_pkey P_Key used for trap messages trap_hop_qp Hop limit (upper 8 bits) and QP number used for trap messages trap_qkey Q_Key associated with the trap messages QP.
SEE ALSO
IB_CLASS_CAP_GETSET, IB_CLASS_CAP_TRAP
NAME
ib_dm_mad_t
DESCRIPTION
IBA defined Device Management MAD (16.3.1)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_dm_mad { ib_mad_t hdr; uint8_t resv[40]; #define IB_DM_DATA_SIZE 192 uint8_t data[IB_DM_DATA_SIZE]; } PACK_SUFFIX ib_dm_mad_t; #include <complib/cl_packoff.h>
FIELDS
hdr Common MAD header. resv Reserved. data Device Management payload. The structure and content of this field depend upon the method, attr_id, and attr_mod fields in the header.
SEE ALSO
ib_mad_t
NAME
ib_field32_t
DESCRIPTION
Represents a 32-bit field, and allows access as a 32-bit network byte ordered or a 4-byte array.
SYNOPSIS
#include <complib/cl_packon.h> typedef union _ib_field32_t { net32_t val; uint8_t bytes[4]; } PACK_SUFFIX ib_field32_t; #include <complib/cl_packoff.h>
FIELDS
val Full field value. bytes Byte array representing the field. The byte array provides identical access independently from CPU byte-ordering.
NAME
ib_get_async_event_str
DESCRIPTION
Returns a string for the specified asynchronous event.
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_async_event_str( IN ib_async_event_t event );
PARAMETERS
event [in] event value RETURN VALUES Pointer to the asynchronous event description string.
NOTES
SEE ALSO
NAME
ib_get_err_str
DESCRIPTION
Returns a string for the specified status value.
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_err_str( IN ib_api_status_t status );
PARAMETERS
status [in] status value RETURN VALUES Pointer to the status description string.
NOTES
SEE ALSO
NAME
ib_get_node_type_str
DESCRIPTION
Returns a string for the specified node type.
SYNOPSIS
AL_INLINE const char* AL_API ib_get_node_type_str( IN uint8_t node_type ) { if( node_type >= IB_NODE_TYPE_ROUTER ) node_type = 0; return( __ib_node_type_str[node_type] ); }
PARAMETERS
node_type [in] Encoded node type as returned in the NodeInfo attribute. RETURN VALUES Pointer to the node type string.
NOTES
SEE ALSO
ib_node_info_t
NAME
ib_get_port_state_from_str
DESCRIPTION
Returns a string for the specified port state.
SYNOPSIS
AL_INLINE const uint8_t AL_API ib_get_port_state_from_str( IN char* p_port_state_str ) { if( !strncmp(p_port_state_str,"No State Change (NOP)",12) ) return(0); else if( !strncmp(p_port_state_str, "DOWN",4) ) return(1); else if( !strncmp(p_port_state_str, "INIT", 4) ) return(2); else if( !strncmp(p_port_state_str,"ARMED", 5) ) return(3); else if( !strncmp(p_port_state_str, "ACTIVE", 6) ) return(4); else if( !strncmp(p_port_state_str, "ACTDEFER", 8) ) return(5); return(6); }
PARAMETERS
p_port_state_str [in] A string matching one returned by ib_get_port_state_str RETURN VALUES The appropriate code.
NOTES
SEE ALSO
ib_port_info_t
NAME
ib_get_port_state_str
DESCRIPTION
Returns a string for the specified port state.
SYNOPSIS
AL_INLINE const char* AL_API ib_get_port_state_str( IN uint8_t port_state ) { if( port_state > IB_LINK_ACTIVE ) port_state = IB_LINK_ACTIVE + 1; return( __ib_port_state_str[port_state] ); }
PARAMETERS
port_state [in] Encoded port state as returned in the PortInfo attribute. RETURN VALUES Pointer to the port state string.
NOTES
SEE ALSO
ib_port_info_t
NAME
ib_get_qp_type_str
DESCRIPTION
Returns a string for the specified QP type
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_qp_type_str( IN uint8_t qp_type );
PARAMETERS
qp_type [in] Encoded QP type as defined in the RETURN VALUES Pointer to the QP type string.
NOTES
SEE ALSO
ib_qp_type_t
NAME
ib_get_wc_status_str
DESCRIPTION
Returns a string for the specified work completion status.
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_wc_status_str( IN ib_wc_status_t wc_status );
PARAMETERS
wc_status [in] work completion status value RETURN VALUES Pointer to the work completion status description string.
NOTES
SEE ALSO
NAME
ib_get_wc_type_str
DESCRIPTION
Returns a string for the specified work completion type.
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_wc_type_str( IN ib_wc_type_t wc_type );
PARAMETERS
wc_type [in] work completion type value RETURN VALUES Pointer to the work completion type description string.
NOTES
SEE ALSO
NAME
ib_get_wr_type_str
DESCRIPTION
Returns a string for the specified work request type
SYNOPSIS
AL_EXPORT const char* AL_API ib_get_wr_type_str( IN uint8_t wr_type );
PARAMETERS
wr_type [in] Encoded work request type as defined in the RETURN VALUES Pointer to the work request type string.
NOTES
SEE ALSO
ib_wr_type_t
NAME
ib_gid_get_guid
DESCRIPTION
Gets the guid from a GID.
SYNOPSIS
AL_INLINE ib_net64_t AL_API ib_gid_get_guid( IN const ib_gid_t* const p_gid ) { return( p_gid->unicast.interface_id ); }
PARAMETERS
p_gid [in] Pointer to the GID object. RETURN VALUES 64-bit GUID value.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_gid_get_subnet_prefix
DESCRIPTION
Gets the subnet prefix from a GID.
SYNOPSIS
AL_INLINE ib_net64_t AL_API ib_gid_get_subnet_prefix( IN const ib_gid_t* const p_gid ) { return( p_gid->unicast.prefix ); }
PARAMETERS
p_gid [in] Pointer to the GID object. RETURN VALUES 64-bit subnet prefix value.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_gid_is_link_local
DESCRIPTION
Returns TRUE if the unicast GID scoping indicates link local, FALSE otherwise.
SYNOPSIS
static inline boolean_t ib_gid_is_link_local( IN const ib_gid_t* const p_gid ) { return( ib_gid_get_subnet_prefix( p_gid ) == IB_DEFAULT_SUBNET_PREFIX ); }
PARAMETERS
p_gid [in] Pointer to the GID object. RETURN VALUES Returns TRUE if the unicast GID scoping indicates link local, FALSE otherwise.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_gid_is_site_local
DESCRIPTION
Returns TRUE if the unicast GID scoping indicates site local, FALSE otherwise.
SYNOPSIS
static inline boolean_t ib_gid_is_site_local( IN const ib_gid_t* const p_gid ) { return( ( ib_gid_get_subnet_prefix( p_gid ) & CL_HTON64( 0xFFFFFFFFFFFF0000ULL ) ) == CL_HTON64( 0xFEC0000000000000ULL ) ); }
PARAMETERS
p_gid [in] Pointer to the GID object. RETURN VALUES Returns TRUE if the unicast GID scoping indicates link local, FALSE otherwise.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_gid_prefix_t
DESCRIPTION
SOURCE
typedef ib_net64_t ib_gid_prefix_t;
NAME
ib_gid_set_default
DESCRIPTION
Sets a GID to the default value.
SYNOPSIS
AL_INLINE void AL_API ib_gid_set_default( IN ib_gid_t* const p_gid, IN const ib_net64_t interface_id ) { p_gid->unicast.prefix = IB_DEFAULT_SUBNET_PREFIX; p_gid->unicast.interface_id = interface_id; }
PARAMETERS
p_gid [in] Pointer to the GID object. interface_id [in] Manufacturer assigned EUI64 value of a port. RETURN VALUES None.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_gid_t
DESCRIPTION
SYNOPSIS
#include <complib/cl_packon.h> typedef union _ib_gid { uint8_t raw[16]; struct _ib_gid_unicast { ib_gid_prefix_t prefix; ib_net64_t interface_id; } PACK_SUFFIX unicast; struct _ib_gid_multicast { uint8_t header[2]; uint8_t raw_group_id[14]; } PACK_SUFFIX multicast; } PACK_SUFFIX ib_gid_t; #include <complib/cl_packoff.h>
FIELDS
raw GID represented as an unformated byte array. unicast Typical unicast representation with subnet prefix and port GUID. multicast Representation for multicast use.
SEE ALSO
NAME
ib_gmp_t
DESCRIPTION
IBA defined GMP MAD format. (16.1.1)
SYNOPSIS
#define IB_GMP_DATA_SIZE 200 #include <complib/cl_packon.h> typedef struct _ib_gmp { uint8_t base_ver; uint8_t mgmt_class; uint8_t class_ver; uint8_t method; ib_net16_t status; ib_net16_t resv; ib_net64_t trans_id; ib_net16_t attr_id; ib_net16_t resv1; ib_net32_t attr_mod; uint8_t resv2[40]; uint8_t data[IB_GMP_DATA_SIZE]; } PACK_SUFFIX ib_gmp_t; #include <complib/cl_packoff.h>
NAME
ib_grh_get_ver_class_flow
DESCRIPTION
Get encoded version, traffic class and flow label in grh
SYNOPSIS
AL_INLINE void AL_API ib_grh_get_ver_class_flow( IN const ib_net32_t ver_class_flow, OUT uint8_t* const p_ver OPTIONAL, OUT uint8_t* const p_tclass OPTIONAL, OUT net32_t* const p_flow_lbl OPTIONAL ) { ib_net32_t tmp_ver_class_flow; tmp_ver_class_flow = cl_ntoh32( ver_class_flow ); if (p_ver) *p_ver = (uint8_t)(tmp_ver_class_flow >> 28); if (p_tclass) *p_tclass = (uint8_t)(tmp_ver_class_flow >> 20); if (p_flow_lbl) *p_flow_lbl = (ver_class_flow & CL_HTON32( 0x000FFFFF )); }
PARAMETERS
ver_class_flow [in] the version, traffic class and flow label info. RETURN VALUES p_ver [out] pointer to the version info. p_tclass [out] pointer to the traffic class info. p_flow_lbl [out] pointer to the flow label info
NOTES
SEE ALSO
ib_grh_t
NAME
ib_grh_set_ver_class_flow
DESCRIPTION
Set encoded version, traffic class and flow label in grh
SYNOPSIS
AL_INLINE ib_net32_t AL_API ib_grh_set_ver_class_flow( IN const uint8_t ver, IN const uint8_t tclass, IN const net32_t flow_lbl ) { ib_net32_t ver_class_flow; ver_class_flow = cl_hton32( (ver << 28) | (tclass << 20) ); ver_class_flow |= (flow_lbl & CL_HTON32( 0x000FFFFF )); return (ver_class_flow); }
PARAMETERS
ver [in] the version info. tclass [in] the traffic class info. flow_lbl [in] the flow label info RETURN VALUES ver_class_flow [out] the version, traffic class and flow label info.
NOTES
SEE ALSO
ib_grh_t
NAME
ib_grh_t
DESCRIPTION
Global route header information received with unreliable datagram messages
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_grh { ib_net32_t ver_class_flow; ib_net16_t resv1; uint8_t resv2; uint8_t hop_limit; ib_gid_t src_gid; ib_gid_t dest_gid; } PACK_SUFFIX ib_grh_t; #include <complib/cl_packoff.h>
NAME
ib_guid_info_t
DESCRIPTION
IBA defined GuidInfo. (14.2.5.5)
SYNOPSIS
#define GUID_TABLE_MAX_ENTRIES 8 #include <complib/cl_packon.h> typedef struct _ib_guid_info { ib_net64_t guid[GUID_TABLE_MAX_ENTRIES]; } PACK_SUFFIX ib_guid_info_t; #include <complib/cl_packoff.h>
NAME
ib_inform_get_dev_id
DESCRIPTION
Retrieves the device ID from a vendor specific inform trap.
SYNOPSIS
AL_INLINE uint16_t AL_API ib_inform_get_dev_id( IN const ib_inform_info_t* const p_inform_info ) { return ib_inform_get_trap_num( p_inform_info ); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose device ID to return. RETURN VALUES Returns the vendor ID of the inform info, in host byte order.
SEE ALSO
ib_inform_info_t, ib_inform_set_dev_id
NAME
ib_inform_get_prod_type
DESCRIPTION
Retrieves the producer type from an inform info structure.
SYNOPSIS
AL_INLINE uint32_t AL_API ib_inform_get_prod_type( IN const ib_inform_info_t* const p_inform_info ) { return (cl_ntoh32( p_inform_info->combo3 ) >> 8); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose prducer type to return. RETURN VALUES Returns the producer type of the infrom info, in host byte order.
SEE ALSO
ib_inform_info_t, ib_inform_set_prod_type
NAME
ib_inform_get_qpn
DESCRIPTION
Retrieves the QPN from an inform info structure.
SYNOPSIS
AL_INLINE net32_t AL_API ib_inform_get_qpn( IN const ib_inform_info_t* const p_inform_info ) { return (p_inform_info->combo2 & CL_NTOH32( 0x00FFFFFF )); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose QPN to return. RETURN VALUES Returns the QPN of the infrom info.
SEE ALSO
ib_inform_info_t, ib_inform_set_qpn
NAME
ib_inform_get_resp_time_val
DESCRIPTION
Retrieves the response time value from an inform info structure.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_inform_get_resp_time_val( IN const ib_inform_info_t* const p_inform_info ) { return (uint8_t)(cl_ntoh32( p_inform_info->combo2 ) >> 27); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose response time value to return. RETURN VALUES Returns the response time value of the infrom info.
SEE ALSO
ib_inform_info_t, ib_inform_set_resp_time_val
NAME
ib_inform_get_trap_num
DESCRIPTION
Retrieves the trap number from an inform info structure.
SYNOPSIS
AL_INLINE uint16_t AL_API ib_inform_get_trap_num( IN const ib_inform_info_t* const p_inform_info ) { return cl_ntoh16( p_inform_info->combo1 ); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose trap number to return. RETURN VALUES Returns the trap number of the infrom info, in host byte order.
SEE ALSO
ib_inform_info_t, ib_inform_set_trap_num
NAME
ib_inform_get_vend_id
DESCRIPTION
Retrieves the vendor ID from an inform info structure.
SYNOPSIS
AL_INLINE uint32_t AL_API ib_inform_get_vend_id( IN const ib_inform_info_t* const p_inform_info ) { return ib_inform_get_prod_type( p_inform_info ); }
PARAMETERS
p_inform_info [in] Pointer to the inform info structure whose vendor ID to return. RETURN VALUES Returns the vendor ID of the infrom info, in host byte order.
SEE ALSO
ib_inform_info_t, ib_inform_set_vend_id
NAME
ib_inform_info_record_t
DESCRIPTION
IBA defined InformInfo Record. (15.2.5.12)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_inform_info_record { ib_gid_t subscriber_gid; net16_t subscriber_enum; uint16_t reserved[3]; ib_inform_info_t inform_info; } PACK_SUFFIX ib_inform_info_record_t; #include <complib/cl_packoff.h>
NAME
ib_inform_set_dev_id
DESCRIPTION
Sets the producer type of a vendor specific inform trap.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_dev_id( IN OUT ib_inform_info_t* const p_inform_info, IN const uint16_t dev_id ) { ib_inform_set_trap_num( p_inform_info, dev_id ); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose device ID to set. dev_id [in] Device ID of inform trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_inform_info_t, ib_inform_get_dev_id
NAME
ib_inform_set_prod_type
DESCRIPTION
Sets the producer type of an inform info structure.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_prod_type( IN OUT ib_inform_info_t* const p_inform_info, IN const uint32_t prod_type ) { p_inform_info->combo3 = cl_hton32( prod_type << 8 ); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose producer type to set. prod_type [in] Producer type of inform trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_inform_info_t, ib_inform_get_prod_type
NAME
ib_inform_set_qpn
DESCRIPTION
Sets the QPN of an inform info structure.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_qpn( IN OUT ib_inform_info_t* const p_inform_info, IN const net32_t qpn ) { p_inform_info->combo2 &= CL_NTOH32( 0xFF000000 ); p_inform_info->combo2 |= (qpn & CL_NTOH32( 0x00FFFFFF )); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose QPN to set. qpn [in] QPN of the inform info. RETURN VALUES This function does not return a value.
SEE ALSO
ib_inform_info_t, ib_inform_get_qpn
NAME
ib_inform_set_resp_time_val
DESCRIPTION
Sets the response time value of an inform info structure.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_resp_time_val( IN OUT ib_inform_info_t* const p_inform_info, IN const uint8_t resp_time_val ) { uint32_t val; val = cl_ntoh32( p_inform_info->combo2 ); val &= 0x07FFFFFF; val |= (resp_time_val << 27); p_inform_info->combo2 = cl_hton32( val ); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose response time value to set. resp_time_val [in] Response time value of the inform info. RETURN VALUES This function does not return a value.
SEE ALSO
ib_inform_info_t, ib_inform_get_resp_time_val
NAME
ib_inform_set_trap_num
DESCRIPTION
Sets the trap number of an inform info structure.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_trap_num( IN OUT ib_inform_info_t* const p_inform_info, IN const uint16_t trap_num ) { p_inform_info->combo1 = cl_hton16( trap_num ); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose trap number to set. trap_num [in] Trap number to set. RETURN VALUES This function does not return a value.
SEE ALSO
ib_inform_info_t, ib_inform_get_trap_num
NAME
ib_inform_set_vend_id
DESCRIPTION
Sets the vendor ID of an inform info structure.
SYNOPSIS
AL_INLINE void AL_API ib_inform_set_vend_id( IN OUT ib_inform_info_t* const p_inform_info, IN const uint32_t vend_id ) { ib_inform_set_prod_type( p_inform_info, vend_id ); }
PARAMETERS
p_inform_info [in/out] Pointer to the inform info structure whose vendor ID to set. vend_id [in] Vendor ID of inform trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_inform_info_t, ib_inform_get_vend_id
NAME
ib_ioc_profile_t
DESCRIPTION
IBA defined IO Controller profile structure (16.3.3.4)
SYNOPSIS
#include <complib/cl_packon.h> typedef __declspec(align(8)) struct _ib_ioc_profile { ib_net64_t ioc_guid; ib_net32_t vend_id; ib_net32_t dev_id; ib_net16_t dev_ver; ib_net16_t resv2; ib_net32_t subsys_vend_id; ib_net32_t subsys_id; ib_net16_t io_class; ib_net16_t io_subclass; ib_net16_t protocol; ib_net16_t protocol_ver; ib_net32_t resv3; ib_net16_t send_msg_depth; uint8_t resv4; uint8_t rdma_read_depth; ib_net32_t send_msg_size; ib_net32_t rdma_size; uint8_t ctrl_ops_cap; #define CTRL_OPS_CAP_ST 0x01 #define CTRL_OPS_CAP_SF 0x02 #define CTRL_OPS_CAP_RT 0x04 #define CTRL_OPS_CAP_RF 0x08 #define CTRL_OPS_CAP_WT 0x10 #define CTRL_OPS_CAP_WF 0x20 #define CTRL_OPS_CAP_AT 0x40 #define CTRL_OPS_CAP_AF 0x80 uint8_t resv5; uint8_t num_svc_entries; #define MAX_NUM_SVC_ENTRIES 0xff uint8_t resv6[9]; #define CTRL_ID_STRING_LEN 64 char id_string[CTRL_ID_STRING_LEN]; } PACK_SUFFIX ib_ioc_profile_t; #include <complib/cl_packoff.h>
FIELDS
ioc_guid An EUI-64 GUID used to uniquely identify the IO controller. vend_id IO controller vendor ID, IEEE format. dev_id A number assigned by the vendor to identify the type of controller. dev_ver A number assigned by the vendor to identify the divice version. subsys_vend_id ID of the vendor of the enclosure, if any, in which the IO controller resides in IEEE format; otherwise zero. subsys_id A number identifying the subsystem where the controller resides. io_class 0x0000 - 0xfffe = reserved for IO classes encompased by InfiniBand Architecture. 0xffff = Vendor specific. io_subclass 0x0000 - 0xfffe = reserved for IO subclasses encompased by InfiniBand Architecture. 0xffff = Vendor specific. This shall be set to 0xfff if the io_class component is 0xffff. protocol 0x0000 - 0xfffe = reserved for IO subclasses encompased by InfiniBand Architecture. 0xffff = Vendor specific. This shall be set to 0xfff if the io_class component is 0xffff. protocol_ver Protocol specific. send_msg_depth Maximum depth of the send message queue. rdma_read_depth Maximum depth of the per-channel RDMA read queue. send_msg_size Maximum size of send messages. ctrl_ops_cap Supported operation types of this IO controller. A bit set to one for affirmation of supported capability. num_svc_entries Number of entries in the service entries table. id_string UTF-8 encoded string for identifying the controller to an operator.
SEE ALSO
ib_dm_mad_t
NAME
ib_iou_info_diag_dev_id
DESCRIPTION
Returns the DiagDeviceID.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_iou_info_diag_dev_id( IN const ib_iou_info_t* const p_iou_info ) { return( (uint8_t)(p_iou_info->diag_rom >> 6 & 1) ); }
PARAMETERS
p_iou_info [in] Pointer to the IO Unit information structure. RETURN VALUES DiagDeviceID field of the IO Unit information.
NOTES
SEE ALSO
ib_iou_info_t
NAME
ib_iou_info_option_rom
DESCRIPTION
Returns the OptionROM.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_iou_info_option_rom( IN const ib_iou_info_t* const p_iou_info ) { return( (uint8_t)(p_iou_info->diag_rom >> 7) ); }
PARAMETERS
p_iou_info [in] Pointer to the IO Unit information structure. RETURN VALUES OptionROM field of the IO Unit information.
NOTES
SEE ALSO
ib_iou_info_t
NAME
ib_iou_info_t
DESCRIPTION
IBA defined IO Unit information structure (16.3.3.3)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_iou_info { ib_net16_t change_id; uint8_t max_controllers; uint8_t diag_rom; #define IB_DM_CTRL_LIST_SIZE 128 #define IB_DM_MAX_CTRL 0xFF; uint8_t controller_list[IB_DM_CTRL_LIST_SIZE]; #define IOC_NOT_INSTALLED 0x0 #define IOC_INSTALLED 0x1 // Reserved values 0x02-0xE #define SLOT_DOES_NOT_EXIST 0xF } PACK_SUFFIX ib_iou_info_t; #include <complib/cl_packoff.h>
FIELDS
change_id Value incremented, with rollover, by any change to the controller_list. max_controllers Number of slots in controller_list. diag_rom A byte containing two fields: DiagDeviceID and OptionROM. These fields may be read using the ib_iou_info_diag_dev_id and ib_iou_info_option_rom functions. controller_list A series of 4-bit nibbles, with each nibble representing a slot in the IO Unit. Individual nibbles may be read using the ioc_at_slot function.
SEE ALSO
ib_dm_mad_t, ib_iou_info_diag_dev_id, ib_iou_info_option_rom, ioc_at_slot
NAME
ib_lft_record_t
DESCRIPTION
IBA defined LinearForwardingTable. (14.2.5.6)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_lft_record { ib_net16_t lid; ib_net16_t block_num; uint32_t resv0; uint8_t lft[64]; } PACK_SUFFIX ib_lft_record_t; #include <complib/cl_packoff.h>
NAME
ib_mad_init_new
DESCRIPTION
Initializes a MAD common header.
SYNOPSIS
AL_INLINE void AL_API ib_mad_init_new( IN ib_mad_t* const p_mad, IN const uint8_t mgmt_class, IN const uint8_t class_ver, IN const uint8_t method, IN const ib_net64_t trans_id, IN const ib_net16_t attr_id, IN const ib_net32_t attr_mod ) { CL_ASSERT( p_mad ); p_mad->base_ver = 1; p_mad->mgmt_class = mgmt_class; p_mad->class_ver = class_ver; p_mad->method = method; p_mad->status = 0; p_mad->class_spec = 0; p_mad->trans_id = trans_id; p_mad->attr_id = attr_id; p_mad->resv = 0; p_mad->attr_mod = attr_mod; }
PARAMETERS
p_mad [in] Pointer to the MAD common header. mgmt_class [in] Class of operation. class_ver [in] Version of MAD class-specific format. method [in] Method to perform, including 'R' bit. trans_Id [in] Transaction ID. attr_id [in] Attribute ID. attr_mod [in] Attribute modifier. RETURN VALUES None.
NOTES
SEE ALSO
ib_mad_t
NAME
ib_mad_init_response
DESCRIPTION
Initializes a MAD common header as a response.
SYNOPSIS
AL_INLINE void AL_API ib_mad_init_response( IN const ib_mad_t* const p_req_mad, IN ib_mad_t* const p_mad, IN const ib_net16_t status ) { CL_ASSERT( p_req_mad ); CL_ASSERT( p_mad ); *p_mad = *p_req_mad; p_mad->status = status; if( p_mad->method == IB_MAD_METHOD_SET ) p_mad->method = IB_MAD_METHOD_GET; p_mad->method |= IB_MAD_METHOD_RESP_MASK; }
PARAMETERS
p_req_mad [in] Pointer to the MAD common header in the original request MAD. p_mad [in] Pointer to the MAD common header to initialize. status [in] MAD Status value to return; RETURN VALUES None.
NOTES
p_req_mad and p_mad may point to the same MAD.
SEE ALSO
ib_mad_t
NAME
ib_mad_is_response
DESCRIPTION
Returns TRUE if the MAD is a response ('R' bit set), FALSE otherwise.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_mad_is_response( IN const ib_mad_t* const p_mad ) { CL_ASSERT( p_mad ); return( (p_mad->method & IB_MAD_METHOD_RESP_MASK) == IB_MAD_METHOD_RESP_MASK ); }
PARAMETERS
p_mad [in] Pointer to the MAD. RETURN VALUES Returns TRUE if the MAD is a response ('R' bit set), FALSE otherwise.
NOTES
SEE ALSO
ib_mad_t
NAME
ib_mad_t
DESCRIPTION
IBA defined MAD header (13.4.3)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_mad { uint8_t base_ver; uint8_t mgmt_class; uint8_t class_ver; uint8_t method; ib_net16_t status; ib_net16_t class_spec; ib_net64_t trans_id; ib_net16_t attr_id; ib_net16_t resv; ib_net32_t attr_mod; } PACK_SUFFIX ib_mad_t; #include <complib/cl_packoff.h>
FIELDS
base_ver MAD base format. mgmt_class Class of operation. class_ver Version of MAD class-specific format. method Method to perform, including 'R' bit. status Status of operation. class_spec Reserved for subnet management. trans_id Transaction ID. attr_id Attribute ID. resv Reserved field. attr_mod Attribute modifier.
SEE ALSO
NAME
ib_member_get_scope
DESCRIPTION
Get encoded MGID scope
SYNOPSIS
AL_INLINE uint8_t AL_API ib_member_get_scope( IN const uint8_t scope_state ) { return (scope_state >> 4); }
PARAMETERS
scope_state [in] the scope and state RETURN VALUES Encoded scope.
SEE ALSO
ib_member_rec_t
NAME
ib_member_get_scope_state
DESCRIPTION
Get encoded MGID scope and JoinState
SYNOPSIS
AL_INLINE void AL_API ib_member_get_scope_state( IN const uint8_t scope_state, OUT uint8_t* const p_scope, OUT uint8_t* const p_state ) { if (p_scope) *p_scope = ib_member_get_scope( scope_state ); if (p_state) *p_state = ib_member_get_state( scope_state ); }
PARAMETERS
scope_state [in] the scope and state RETURN VALUES p_scope [out] pointer to the MGID scope p_state [out] pointer to the join state
NOTES
SEE ALSO
ib_member_rec_t
NAME
ib_member_get_sl_flow_hop
DESCRIPTION
Get encoded sl flow label and hop limit
SYNOPSIS
AL_INLINE void AL_API ib_member_get_sl_flow_hop( IN const ib_net32_t sl_flow_hop, OUT uint8_t* const p_sl OPTIONAL, OUT net32_t* const p_flow_lbl OPTIONAL, OUT uint8_t* const p_hop OPTIONAL ) { ib_net32_t tmp_sl_flow_hop; if (p_sl) *p_sl = (uint8_t)(sl_flow_hop & 0x0f); tmp_sl_flow_hop = sl_flow_hop >> 4; if (p_flow_lbl) *p_flow_lbl = (uint32_t)(tmp_sl_flow_hop & 0xffffff); tmp_sl_flow_hop = tmp_sl_flow_hop >> 20; if (p_hop) *p_hop = (uint8_t)(tmp_sl_flow_hop & 0xff); }
PARAMETERS
sl_flow_hop [in] the sl flow label and hop limit of MC Group RETURN VALUES p_sl [out] pointer to the service level p_flow_lbl [out] pointer to the flow label info p_hop [out] pointer to the hop count limit.
NOTES
SEE ALSO
ib_member_rec_t
NAME
ib_member_get_state
DESCRIPTION
Get encoded MGID JoinState
SYNOPSIS
AL_INLINE uint8_t AL_API ib_member_get_state( IN const uint8_t scope_state ) { return (scope_state & 0x0f); }
PARAMETERS
scope_state [in] the scope and state RETURN VALUES Encoded JoinState
SEE ALSO
ib_member_rec_t
NAME
ib_member_rec_t
DESCRIPTION
Multicast member record, used to create, join, and leave multicast groups.
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_member_rec { ib_gid_t mgid; ib_gid_t port_gid; ib_net32_t qkey; ib_net16_t mlid; uint8_t mtu; uint8_t tclass; ib_net16_t pkey; uint8_t rate; uint8_t pkt_life; ib_net32_t sl_flow_hop; uint8_t scope_state; uint8_t proxy_join; uint8_t reserved[2]; uint8_t pad[4]; } PACK_SUFFIX ib_member_rec_t; #include <complib/cl_packoff.h>
FIELDS
mgid Multicast GID address for this multicast group. port_gid Valid GID of the endpoint joining this multicast group. requestor_gid GID of the endpoint making this request on hehave of port_gid. qkey Q_Key to be used by this multicast group. mlid Multicast LID for this multicast group. mtu MTU and MTU selector fields to use on this path tclass Another global routing parameter. pkey Partition key (P_Key) to use for this member. rate Rate and rate selector fields to use on this path. pkt_life Packet lifetime sl_flow_hop Global routing parameters: service level, hop count, and flow label. scope_state MGID scope and JoinState of multicast request. proxy_join Enables others in the Partition to proxy add/remove from the group
SEE ALSO
NAME
ib_member_set_join_state
DESCRIPTION
Set JoinState
SYNOPSIS
AL_INLINE void AL_API ib_member_set_join_state( IN OUT ib_member_rec_t *p_mc_rec, IN const uint8_t state ) { p_mc_rec->scope_state &= 0xF0; p_mc_rec->scope_state |= (state & 0x0F); }
PARAMETERS
p_mc_rec [in] pointer to the member record state [in] the JoinState RETURN VALUES NONE
NOTES
SEE ALSO
ib_member_rec_t
NAME
ib_member_set_scope
DESCRIPTION
Set encoded scope of a MCR.
SYNOPSIS
AL_INLINE void AL_API ib_member_set_scope( IN OUT uint8_t* const p_scope_state, IN const uint8_t scope ) { CL_ASSERT( scope <= 0x0F ); /* Scope is MS 4-bits. */ *p_scope_state &= 0xF0; *p_scope_state |= (scope << 4); }
PARAMETERS
scope_state [in/out] Pointer to the MCR scope_state field. scope [in] The desired scope. RETURN VALUES This function does not return a value.
SEE ALSO
ib_member_rec_t
NAME
ib_member_set_scope_state
DESCRIPTION
Set encoded version, MGID scope and JoinState
SYNOPSIS
AL_INLINE uint8_t AL_API ib_member_set_scope_state( IN const uint8_t scope, IN const uint8_t state ) { /* Scope is MS 4-bits, state is LS 4-bits */ return ((scope << 4) | (state & 0xF)); }
PARAMETERS
scope [in] the MGID scope state [in] the JoinState RETURN VALUES scope_state [out] the encoded one
NOTES
SEE ALSO
ib_member_rec_t
NAME
ib_member_set_sl_flow_hop
DESCRIPTION
Set encoded version, sl flow and hop
SYNOPSIS
AL_INLINE ib_net32_t AL_API ib_member_set_sl_flow_hop( IN const uint8_t sl, IN const net32_t flow_lbl, IN const uint8_t hop_limit ) { ib_net32_t sl_flow_hop; sl_flow_hop = sl; sl_flow_hop <<= 20; sl_flow_hop |= (cl_ntoh32( flow_lbl ) & 0x000FFFFF); sl_flow_hop <<= 8; sl_flow_hop |= hop_limit; return cl_hton32(sl_flow_hop); }
PARAMETERS
sl [in] the service level. flow_lbl [in] the flow label info hop_limit [in] the hop limit. RETURN VALUES sl_flow_hop [out] the sl flow label and hop limit
NOTES
SEE ALSO
ib_member_rec_t
NAME
ib_member_set_state
DESCRIPTION
Set encoded JoinState of a MCR.
SYNOPSIS
AL_INLINE void AL_API ib_member_set_state( IN OUT uint8_t* const p_scope_state, IN const uint8_t state ) { CL_ASSERT( state <= 0x0F ); /* State is LS 4-bits. */ *p_scope_state &= 0x0F; *p_scope_state |= (state & 0x0F); }
PARAMETERS
scope_state [in/out] Pointer to the MCR scope_state field to modify. state [in] the JoinState RETURN VALUES This function does not return a value.
SEE ALSO
ib_member_rec_t
NAME
ib_net16_t
DESCRIPTION
Defines the network ordered type for 16-bit values.
SOURCE
typedef uint16_t ib_net16_t;
NAME
ib_net32_t
DESCRIPTION
Defines the network ordered type for 32-bit values.
SOURCE
typedef uint32_t ib_net32_t;
NAME
ib_net64_t
DESCRIPTION
Defines the network ordered type for 64-bit values.
SOURCE
typedef uint64_t ib_net64_t;
NAME
ib_node_info_get_local_port_num
DESCRIPTION
Gets a the local port number from the NodeInfo attribute.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_node_info_get_local_port_num( IN const ib_node_info_t* const p_ni ) { return( (uint8_t)(( p_ni->port_num_vendor_id & IB_NODE_INFO_PORT_NUM_MASK ) >> IB_NODE_INFO_PORT_NUM_SHIFT )); }
PARAMETERS
p_ni [in] Pointer to a NodeInfo attribute. RETURN VALUES Local port number that returned the attribute.
NOTES
SEE ALSO
ib_node_info_t
NAME
ib_node_info_get_vendor_id
DESCRIPTION
Gets the VendorID from the NodeInfo attribute.
SYNOPSIS
AL_INLINE ib_net32_t AL_API ib_node_info_get_vendor_id( IN const ib_node_info_t* const p_ni ) { return( (ib_net32_t)( p_ni->port_num_vendor_id & IB_NODE_INFO_VEND_ID_MASK ) ); }
PARAMETERS
p_ni [in] Pointer to a NodeInfo attribute. RETURN VALUES VendorID that returned the attribute.
NOTES
SEE ALSO
ib_node_info_t
NAME
ib_node_info_t
DESCRIPTION
IBA defined NodeInfo. (14.2.5.3)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_node_info { uint8_t base_version; uint8_t class_version; uint8_t node_type; uint8_t num_ports; ib_net64_t sys_guid; ib_net64_t node_guid; ib_net64_t port_guid; ib_net16_t partition_cap; ib_net16_t device_id; ib_net32_t revision; ib_net32_t port_num_vendor_id; } PACK_SUFFIX ib_node_info_t; #include <complib/cl_packoff.h>
NAME
ib_notice_get_count
DESCRIPTION
Retrieves the notice toggle count from a notice trap.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_notice_get_count( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return ((cl_ntoh16( p_notice_attr->combo3 ) & 0xFFFE) >> 1); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose notice toggle count to return. RETURN VALUES Returns the notice toggle count of the notice.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_count
NAME
ib_notice_get_dev_id
DESCRIPTION
Retrieves the device ID from a vendor specific notice trap.
SYNOPSIS
AL_INLINE uint16_t AL_API ib_notice_get_dev_id( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return ib_notice_get_trap_num( p_notice_attr ); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose device ID to return. RETURN VALUES Returns the vendor ID of the notice, in host byte order.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_dev_id
NAME
ib_notice_get_generic
DESCRIPTION
Retrieves whether a notice trap is generic.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_notice_get_generic( IN const ib_mad_notice_attr_t* const p_notice_attr ) { if( cl_ntoh32( p_notice_attr->combo1 ) & 0x00000001 ) return TRUE; return FALSE; }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure for which to return whether it is generic or not. RETURN VALUES Returns TRUE if the notice is generic. Returns FALSE if the notice is vendor specific.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_generic
NAME
ib_notice_get_prod_type
DESCRIPTION
Retrieves the producer type from a generic notice trap.
SYNOPSIS
AL_INLINE uint32_t AL_API ib_notice_get_prod_type( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return (cl_ntoh32( p_notice_attr->combo1 ) >> 8); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose prducer type to return. RETURN VALUES Returns the producer type of the notice, in host byte order.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_prod_type
NAME
ib_notice_get_toggle
DESCRIPTION
Retrieves the notice toggle bit from a notice trap.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_notice_get_toggle( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return (cl_ntoh16( p_notice_attr->combo3 ) & 0x0001); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose notice toggle bit value to return. RETURN VALUES Returns TRUE if the notice toggle bit of the notice is set. Returns FALSE otherwise.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_toggle
NAME
ib_notice_get_trap_num
DESCRIPTION
Retrieves the trap number from a generic notice trap.
SYNOPSIS
AL_INLINE uint16_t AL_API ib_notice_get_trap_num( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return cl_ntoh16( p_notice_attr->combo2 ); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose trap number to return. RETURN VALUES Returns the vendor ID of the notice, in host byte order.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_trap_num
NAME
ib_notice_get_type
DESCRIPTION
Retrieves the type of a notice trap.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_notice_get_type( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return (uint8_t)((cl_ntoh32( p_notice_attr->combo1 ) >> 1) & 0x0000007F); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose type to return. RETURN VALUES Returns the type of the notice.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_type
NAME
ib_notice_get_vend_id
DESCRIPTION
Retrieves the vendor ID from a vendor specific notice trap.
SYNOPSIS
AL_INLINE uint32_t AL_API ib_notice_get_vend_id( IN const ib_mad_notice_attr_t* const p_notice_attr ) { return ib_notice_get_prod_type( p_notice_attr ); }
PARAMETERS
p_notice_attr [in] Pointer to the notice attribute structure whose vendor ID to return. RETURN VALUES Returns the vendor ID of the notice, in host byte order.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_set_vend_id
NAME
ib_notice_set_count
DESCRIPTION
Sets the toggle count of a notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_count( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint16_t toggle_cnt ) { uint16_t val; val = cl_ntoh16( p_notice_attr->combo3 ); val &= 0x0001; val |= (toggle_cnt << 1); p_notice_attr->combo3 = cl_hton16( val ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose device ID to set. toggle_cnt [in] Toggle count value of the notice. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_count
NAME
ib_notice_set_dev_id
DESCRIPTION
Sets the producer type of a vendor specific notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_dev_id( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint16_t dev_id ) { ib_notice_set_trap_num( p_notice_attr, dev_id ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose device ID to set. dev_id [in] Device ID of notice trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_dev_id
NAME
ib_notice_set_generic
DESCRIPTION
Sets whether a notice trap is generic.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_generic( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const boolean_t is_generic ) { uint32_t val; val = cl_ntoh32( p_notice_attr->combo1 ); if( is_generic ) val |= 0x00000001; else val &= 0xFFFFFFFE; p_notice_attr->combo1 = cl_hton32( val ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure for which to set the generic bit. is_generic [in] TRUE if the notice is generic, FALSE if vendor specific. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_generic
NAME
ib_notice_set_prod_type
DESCRIPTION
Sets the producer type of a generic notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_prod_type( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint32_t prod_type ) { uint32_t val; val = cl_ntoh32( p_notice_attr->combo1 ); /* Clear the type. */ val &= 0x000000FF; /* Set new value. */ val |= (prod_type << 8); p_notice_attr->combo1 = cl_hton32( val ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose producer type to set. prod_type [in] Producer type of notice trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_prod_type
NAME
ib_notice_set_toggle
DESCRIPTION
Sets the notice toggle bit of a notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_toggle( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const boolean_t toggle_val ) { uint16_t val; val = cl_ntoh16( p_notice_attr->combo3 ); if( toggle_val ) val |= 0x0001; else val &= 0xFFFE; p_notice_attr->combo3 = cl_hton16( val ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose notice toggle bit to set or clear. toggle_val [in] Boolean value indicating whether the toggle bit of the notice should be set or cleared. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_toggle
NAME
ib_notice_set_trap_num
DESCRIPTION
Sets the trap number of a generic notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_trap_num( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint16_t trap_num ) { p_notice_attr->combo2 = cl_hton16( trap_num ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose trap number to set. trap_num [in] Trap number to set. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_trap_num
NAME
ib_notice_set_type
DESCRIPTION
Sets the type of a notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_type( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint8_t type ) { uint32_t val; val = cl_ntoh32( p_notice_attr->combo1 ); /* Clear the type. */ val &= 0xFFFFFF01; /* Set new value. */ val |= (((uint32_t)(type & 0x7F)) << 1); p_notice_attr->combo1 = cl_hton32( val ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose type to set. type [in] Type of notice trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_type
NAME
ib_notice_set_vend_id
DESCRIPTION
Sets the vendor ID of a vendor specific notice trap.
SYNOPSIS
AL_INLINE void AL_API ib_notice_set_vend_id( IN OUT ib_mad_notice_attr_t* const p_notice_attr, IN const uint32_t vend_id ) { ib_notice_set_prod_type( p_notice_attr, vend_id ); }
PARAMETERS
p_notice_attr [in/out] Pointer to the notice attribute structure whose vendor ID to set. vend_id [in] Vendor ID of notice trap. RETURN VALUES This function does not return a value.
SEE ALSO
ib_mad_notice_attr_t, ib_notice_get_vend_id
NAME
ib_path_get_ipd
DESCRIPTION
Returns the encoded value for the inter packet delay.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_get_ipd( IN uint8_t local_link_width_supported, IN uint8_t path_rec_rate ) { uint8_t ipd = 0; switch(local_link_width_supported) { //link_width_supported = 1: 1x case 1: break; //link_width_supported = 3: 1x or 4x case 3: switch(path_rec_rate & 0x3F) { case IB_PATH_RECORD_RATE_2_5_GBS: ipd = 3; break; default: break; } break; //link_width_supported = 11: 1x or 4x or 12x case 11: switch(path_rec_rate & 0x3F) { case IB_PATH_RECORD_RATE_2_5_GBS: ipd = 11; break; case IB_PATH_RECORD_RATE_10_GBS: ipd = 2; break; default: break; } break; default: break; } return ipd; }
PARAMETERS
local_link_width_supported [in] link with supported for this port path_rec_rate [in] rate field of the path record RETURN VALUES Returns the ipd
NOTES
SEE ALSO
NAME
ib_path_rec_flow_lbl
DESCRIPTION
Get flow label.
SYNOPSIS
AL_INLINE net32_t AL_API ib_path_rec_flow_lbl( IN const ib_path_rec_t* const p_rec ) { return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw.val) >> 8) & 0x000FFFFF ) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Flow label of the path record.
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_hop_limit
DESCRIPTION
Get hop limit.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_hop_limit( IN const ib_path_rec_t* const p_rec ) { return( p_rec->hop_flow_raw.bytes[3] ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Hop limit of the path record.
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_init_local
DESCRIPTION
Initializes a subnet local path record.
SYNOPSIS
AL_INLINE void AL_API ib_path_rec_init_local( IN ib_path_rec_t* const p_rec, IN const ib_gid_t* const p_dgid, IN const ib_gid_t* const p_sgid, IN const ib_net16_t dlid, IN const ib_net16_t slid, IN const uint8_t num_path, IN const ib_net16_t pkey, IN const uint8_t sl, IN const uint8_t mtu_selector, IN const uint8_t mtu, IN const uint8_t rate_selector, IN const uint8_t rate, IN const uint8_t pkt_life_selector, IN const uint8_t pkt_life, IN const uint8_t preference ) { p_rec->dgid = *p_dgid; p_rec->sgid = *p_sgid; p_rec->dlid = dlid; p_rec->slid = slid; p_rec->num_path = num_path; p_rec->pkey = pkey; /* Lower 4 bits of path rec's SL are reserved. */ p_rec->sl = cl_ntoh16( sl ); p_rec->mtu = (uint8_t)((mtu & IB_PATH_REC_BASE_MASK) | (uint8_t)(mtu_selector << 6)); p_rec->rate = (uint8_t)((rate & IB_PATH_REC_BASE_MASK) | (uint8_t)(rate_selector << 6)); p_rec->pkt_life = (uint8_t)((pkt_life & IB_PATH_REC_BASE_MASK) | (uint8_t)(pkt_life_selector << 6)); p_rec->preference = preference; /* Clear global routing fields for local path records */ p_rec->hop_flow_raw.val = 0; p_rec->tclass = 0; p_rec->resv0 = 0; p_rec->resv1 = 0; p_rec->resv2 = 0; }
PARAMETERS
p_rec [in] Pointer to the path record object. dgid [in] GID of destination port. sgid [in] GID of source port. dlid [in] LID of destination port. slid [in] LID of source port. num_path [in] In queries, maximum number of paths to return. In responses, undefined. pkey [in] Partition key (P_Key) to use on this path. sl [in] Service level to use on this path. Lower 4-bits are valid. mtu_selector [in] Encoded MTU selector value to use on this path mtu [in] Encoded MTU to use on this path rate_selector [in] Encoded rate selector value to use on this path. rate [in] Encoded rate to use on this path. pkt_life_selector [in] Encoded Packet selector value lifetime for this path. pkt_life [in] Encoded Packet lifetime for this path. preference [in] Indicates the relative merit of this path versus other path records returned from the SA. Lower numbers are better. RETURN VALUES None.
NOTES
SEE ALSO
ib_gid_t
NAME
ib_path_rec_mtu
DESCRIPTION
Get encoded path MTU.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_mtu( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)(p_rec->mtu & IB_PATH_REC_BASE_MASK) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path MTU. 1: 256 2: 512 3: 1024 4: 2048 5: 4096 others: reserved
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_mtu_sel
DESCRIPTION
Get encoded path MTU selector.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_mtu_sel( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)((p_rec->mtu & IB_PATH_REC_SELECTOR_MASK) >> 6) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path MTU selector value (for queries). 0: greater than MTU specified 1: less than MTU specified 2: exactly the MTU specified 3: largest MTU available
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_num_path
DESCRIPTION
Get max number of paths to return.
SYNOPSIS
static inline uint8_t ib_path_rec_num_path( IN const ib_path_rec_t* const p_rec ) { return( p_rec->num_path &0x7F ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Maximum number of paths to return for each unique SGID_DGID combination.
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_pkt_life
DESCRIPTION
Get encoded path pkt_life.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_pkt_life( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)(p_rec->pkt_life & IB_PATH_REC_BASE_MASK) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path pkt_life = 4.096 µsec * 2 ** PacketLifeTime.
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_pkt_life_sel
DESCRIPTION
Get encoded path pkt_lifetime selector.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_pkt_life_sel( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)((p_rec->pkt_life & IB_PATH_REC_SELECTOR_MASK) >> 6 )); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path pkt_lifetime selector value (for queries). 0: greater than rate specified 1: less than rate specified 2: exactly the rate specified 3: smallest packet lifetime available
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_rate
DESCRIPTION
Get encoded path rate.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_rate( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)(p_rec->rate & IB_PATH_REC_BASE_MASK) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path rate. 2: 2.5 Gb/sec. 3: 10 Gb/sec. 4: 30 Gb/sec. 5: 5 Gb/sec. 6: 20 Gb/sec. 7: 40 Gb/sec. 8: 60 Gb/sec. 9: 80 Gb/sec. 10: 120 Gb/sec. others: reserved
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_rate_sel
DESCRIPTION
Get encoded path rate selector.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_rate_sel( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)((p_rec->rate & IB_PATH_REC_SELECTOR_MASK) >> 6) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES Encoded path rate selector value (for queries). 0: greater than rate specified 1: less than rate specified 2: exactly the rate specified 3: largest rate available
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_set_hop_flow_raw
DESCRIPTION
Sets the hop limit, flow label, and raw traffic bits of a path record.
SYNOPSIS
AL_INLINE void AL_API ib_path_rec_set_hop_flow_raw( OUT ib_path_rec_t* const p_rec, IN const uint8_t hop_limit, IN const net32_t flow_lbl, IN const boolean_t raw ) { p_rec->hop_flow_raw.val = (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8; if( raw ) p_rec->hop_flow_raw.val |= 0x80000000; p_rec->hop_flow_raw.val = cl_hton32( p_rec->hop_flow_raw.val ); p_rec->hop_flow_raw.bytes[3] = hop_limit; }
PARAMETERS
p_rec Pointer to the path record whose hop limit, flow label, and rab traffic fields to set. hop_limit Hop limit to set in the path record. flow_lbl Flow label, in network byte order, to set in the path record. raw Boolean flag to indicate whether the path record is for raw traffic.
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_sl
DESCRIPTION
Get path service level.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_path_rec_sl( IN const ib_path_rec_t* const p_rec ) { return( (uint8_t)((cl_ntoh16( p_rec->sl )) & 0xF) ); }
PARAMETERS
p_rec [in] Pointer to the path record object. RETURN VALUES SL.
NOTES
SEE ALSO
ib_path_rec_t
NAME
ib_path_rec_t
DESCRIPTION
Path records encapsulate the properties of a given route between two end-points on a subnet.
SYNOPSIS
#include <complib/cl_packon.h> typedef __declspec(align(8)) struct _ib_path_rec { uint64_t resv0; ib_gid_t dgid; ib_gid_t sgid; ib_net16_t dlid; ib_net16_t slid; ib_field32_t hop_flow_raw; uint8_t tclass; uint8_t num_path; ib_net16_t pkey; ib_net16_t sl; uint8_t mtu; uint8_t rate; uint8_t pkt_life; uint8_t preference; uint16_t resv1; uint32_t resv2; } PACK_SUFFIX ib_path_rec_t; #include <complib/cl_packoff.h>
FIELDS
resv0 Reserved bytes. dgid GID of destination port. sgid GID of source port. dlid LID of destination port. slid LID of source port. hop_flow_raw Global routing parameters: hop count, flow label and raw bit. tclass Another global routing parameter. num_path In queries, maximum number of paths to return. In responses, undefined. pkey Partition key (P_Key) to use on this path. resv1 Reserved byte. sl Service level to use on this path. mtu MTU and MTU selector fields to use on this path rate Rate and rate selector fields to use on this path. pkt_life Packet lifetime preference Indicates the relative merit of this path versus other path records returned from the SA. Lower numbers are better. resv1 Reserved bytes. resv2 Reserved bytes.
SEE ALSO
NAME
ib_pkey_get_base
DESCRIPTION
Returns the base P_Key value with the membership bit stripped.
SYNOPSIS
AL_INLINE ib_net16_t AL_API ib_pkey_get_base( IN const ib_net16_t pkey ) { return( (ib_net16_t)(pkey & IB_PKEY_BASE_MASK) ); }
PARAMETERS
pkey [in] P_Key value
RETURN VALUE
Returns the base P_Key value with the membership bit stripped.
NOTES
SEE ALSO
NAME
ib_pkey_is_full_member
DESCRIPTION
Indicates if the port is a full member of the parition.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_pkey_is_full_member( IN const ib_net16_t pkey ) { return( (pkey & IB_PKEY_TYPE_MASK) == IB_PKEY_TYPE_MASK ); }
PARAMETERS
pkey [in] P_Key value
RETURN VALUE
TRUE if the port is a full member of the partition. FALSE otherwise.
NOTES
SEE ALSO
ib_pkey_get_base, ib_net16_t
NAME
ib_pkey_is_invalid
DESCRIPTION
Returns TRUE if the given P_Key is an invalid P_Key C10-116: the CI shall regard a P_Key as invalid if its low-order 15 bits are all zero...
SYNOPSIS
static inline boolean_t ib_pkey_is_invalid( IN const ib_net16_t pkey ) { if (ib_pkey_get_base(pkey) == 0x0000) return TRUE; return FALSE; }
PARAMETERS
pkey [in] P_Key value
RETURN VALUE
Returns the base P_Key value with the membership bit stripped.
NOTES
SEE ALSO
NAME
ib_pkey_table_info_t
DESCRIPTION
IBA defined PKey table. (14.2.5.7)
SYNOPSIS
#define PKEY_TABLE_MAX_ENTRIES 32 #include <complib/cl_packon.h> typedef struct _ib_pkey_table_info { ib_net16_t pkey[PKEY_TABLE_MAX_ENTRIES]; } PACK_SUFFIX ib_pkey_table_info_t; #include <complib/cl_packoff.h>
NAME
ib_gmp_t
DESCRIPTION
IBA defined PortCounters MAD format. (16.1.3.5)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_port_counters { uint8_t reserved0; uint8_t port_select; ib_net16_t counter_select; ib_net16_t symbol_error_counter; uint8_t link_error_recovery_counter; uint8_t link_down_counter; ib_net16_t port_rcv_errors; ib_net16_t port_rcv_remote_physical_errors; ib_net16_t port_rcv_switch_relay_errors; ib_net16_t port_xmit_discard; uint8_t port_xmit_constraint_errors; uint8_t port_rcv_constraint_errors; uint8_t reserved1; /* uint4_t excessive_buffer_overrun_errors; uint4_t local_link_integrity_errors; */ uint8_t lli_errors_exc_buf_errors; ib_net16_t reserved2; ib_net16_t vl15_dropped; ib_net32_t port_xmit_data; ib_net32_t port_rcv_data; ib_net32_t port_xmit_pkts; ib_net32_t port_rcv_pkts; } PACK_SUFFIX ib_port_counters_t; #include <complib/cl_packoff.h>
NAME
ib_port_info_compute_rate
DESCRIPTION
Returns the encoded value for the path rate.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_compute_rate( IN const ib_port_info_t* const p_pi ) { switch( p_pi->link_width_active * p_pi->link_width_active * ib_port_info_get_link_speed_active( p_pi ) ) { case 1: return IB_PATH_RECORD_RATE_2_5_GBS; case 2: return IB_PATH_RECORD_RATE_5_GBS; case 4: return IB_PATH_RECORD_RATE_10_GBS; case 8: return IB_PATH_RECORD_RATE_20_GBS; case 16: return IB_PATH_RECORD_RATE_40_GBS; case 64: return IB_PATH_RECORD_RATE_30_GBS; case 128: return IB_PATH_RECORD_RATE_60_GBS; case 256: return IB_PATH_RECORD_RATE_120_GBS; default: return IB_PATH_RECORD_RATE_2_5_GBS; } }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the encoded value for the link speed supported.
NOTES
SEE ALSO
NAME
ib_port_info_get_init_type
DESCRIPTION
Gets the init type of a port.
SYNOPSIS
static inline uint8_t ib_port_info_get_init_type( IN const ib_port_info_t* const p_pi) { return (uint8_t) (p_pi->vl_cap & 0x0F); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES InitType field
NOTES
SEE ALSO
NAME
ib_port_info_get_link_speed_active
DESCRIPTION
Returns the Link Speed Active value assigned to this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_link_speed_active( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)((p_pi->link_speed & IB_PORT_LINK_SPEED_ACTIVE_MASK) >> IB_PORT_LINK_SPEED_SHIFT) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the link speed active value assigned to this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_link_speed_sup
DESCRIPTION
Returns the encoded value for the link speed supported.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_link_speed_sup( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)((p_pi->state_info1 & IB_PORT_LINK_SPEED_SUPPORTED_MASK) >> IB_PORT_LINK_SPEED_SHIFT) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the encoded value for the link speed supported.
NOTES
SEE ALSO
NAME
ib_port_info_get_lmc
DESCRIPTION
Returns the LMC value assigned to this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_lmc( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)(p_pi->mkey_lmc & IB_PORT_LMC_MASK) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the LMC value assigned to this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_mpb
DESCRIPTION
Returns the M_Key protect bits assigned to this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_mpb( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)((p_pi->mkey_lmc & IB_PORT_MPB_MASK) >> IB_PORT_MPB_SHIFT) ); }
PARAMETERS
p_ni [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the M_Key protect bits assigned to this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_mtu_cap
DESCRIPTION
Returns the encoded value for the maximum MTU supported by this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_mtu_cap( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)(p_pi->mtu_cap & 0x0F) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the LMC value assigned to this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_neighbor_mtu
DESCRIPTION
Returns the encoded value for the neighbor MTU at this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_neighbor_mtu( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)((p_pi->mtu_smsl & 0xF0) >> 4) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the encoded value for the neighbor MTU at this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_op_vls
DESCRIPTION
Gets the operational VLs on a port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_op_vls( IN const ib_port_info_t* const p_pi) { return((p_pi->vl_enforce >> 4) & 0x0F); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES OP_VLS field
NOTES
SEE ALSO
NAME
ib_port_info_get_port_state
DESCRIPTION
Returns the port state.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_port_state( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)(p_pi->state_info1 & IB_PORT_STATE_MASK) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Port state.
NOTES
SEE ALSO
NAME
ib_port_info_get_sm_sl
DESCRIPTION
Returns the encoded value for the SM sl at this port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_sm_sl( IN const ib_port_info_t* const p_pi ) { return( (uint8_t)(p_pi->mtu_smsl & 0x0F) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the encoded value for the neighbor MTU at this port.
NOTES
SEE ALSO
NAME
ib_port_info_get_vl_cap
DESCRIPTION
Gets the VL Capability of a port.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_port_info_get_vl_cap( IN const ib_port_info_t* const p_pi) { return((p_pi->vl_cap >> 4) & 0x0F); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES VL_CAP field
NOTES
SEE ALSO
NAME
ib_port_info_set_link_speed_sup
DESCRIPTION
Given an integer of the supported link speed supported. Set the appropriate bits in state_info1
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_link_speed_sup( IN uint8_t const speed, IN ib_port_info_t* p_pi ) { p_pi->state_info1 = ( ~IB_PORT_LINK_SPEED_SUPPORTED_MASK & p_pi->state_info1 ) | ( IB_PORT_LINK_SPEED_SUPPORTED_MASK & (speed << IB_PORT_LINK_SPEED_SHIFT) ); }
PARAMETERS
speed [in] Supported Speeds Code. p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES This function does not return a value.
NOTES
SEE ALSO
NAME
ib_port_info_set_lmc
DESCRIPTION
Sets the LMC value in the PortInfo attribute.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_lmc( IN ib_port_info_t* const p_pi, IN const uint8_t lmc ) { CL_ASSERT( lmc <= 0x7 ); p_pi->mkey_lmc = (uint8_t)((p_pi->mkey_lmc & 0xF8) | lmc); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. lmc [in] LMC value to set, must be less than 7. RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_mpb
DESCRIPTION
Set the M_Key protect bits of this port.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_mpb( IN ib_port_info_t* p_pi, IN uint8_t mpb ) { p_pi->mkey_lmc = ((p_pi->mkey_lmc & ~IB_PORT_MPB_MASK) | (mpb << IB_PORT_MPB_SHIFT)); }
PARAMETERS
mpb [in] M_Key protect bits p_ni [in] Pointer to a PortInfo attribute. RETURN VALUES
NOTES
SEE ALSO
NAME
ib_port_info_set_neighbor_mtu
DESCRIPTION
Sets the Neighbor MTU value in the PortInfo attribute.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_neighbor_mtu( IN ib_port_info_t* const p_pi, IN const uint8_t mtu ) { CL_ASSERT( mtu <= 5 ); CL_ASSERT( mtu != 0 ); p_pi->mtu_smsl = (uint8_t)((p_pi->mtu_smsl & 0x0F) | (mtu << 4)); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. mtu [in] Encoded MTU value to set RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_op_vls
DESCRIPTION
Sets the operational VLs on a port.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_op_vls( IN ib_port_info_t* const p_pi, IN const uint8_t op_vls ) { p_pi->vl_enforce = (uint8_t)((p_pi->vl_enforce & 0x0F) | (op_vls << 4) ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. op_vls [in] Encoded operation VLs value. RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_port_state
DESCRIPTION
Sets the port state.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_port_state( IN ib_port_info_t* const p_pi, IN const uint8_t port_state ) { p_pi->state_info1 = (uint8_t)((p_pi->state_info1 & 0xF0) | port_state ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. port_state [in] Port state value to set. RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_sm_sl
DESCRIPTION
Sets the SM sl value in the PortInfo attribute.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_sm_sl( IN ib_port_info_t* const p_pi, IN const uint8_t sm_sl ) { CL_ASSERT( sm_sl<= 5 ); CL_ASSERT( sm_sl != 0 ); p_pi->mtu_smsl = (uint8_t)((p_pi->mtu_smsl & 0xF0) | sm_sl ); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. mtu [in] Encoded SM sl value to set RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_state_no_change
DESCRIPTION
Sets the port state fields to the value for "no change".
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_state_no_change( IN ib_port_info_t* const p_pi ) { ib_port_info_set_port_state( p_pi, IB_LINK_NO_CHANGE ); p_pi->state_info2 = 0; }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_set_timeout
DESCRIPTION
Sets the encoded subnet timeout value in the PortInfo attribute.
SYNOPSIS
AL_INLINE void AL_API ib_port_info_set_timeout( IN ib_port_info_t* const p_pi, IN const uint8_t timeout ) { CL_ASSERT( timeout <= 0x1F ); p_pi->subnet_timeout = (uint8_t)(timeout & 0x1F); }
PARAMETERS
p_pi [in] Pointer to a PortInfo attribute. timeout [in] Encoded timeout value to set RETURN VALUES None.
NOTES
SEE ALSO
NAME
ib_port_info_t
DESCRIPTION
IBA defined PortInfo. (14.2.5.6)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_port_info { ib_net64_t m_key; ib_net64_t subnet_prefix; ib_net16_t base_lid; ib_net16_t master_sm_base_lid; ib_net32_t capability_mask; ib_net16_t diag_code; ib_net16_t m_key_lease_period; uint8_t local_port_num; uint8_t link_width_enabled; uint8_t link_width_supported; uint8_t link_width_active; uint8_t state_info1; /* LinkSpeedSupported and PortState */ uint8_t state_info2; /* PortPhysState and LinkDownDefaultState */ uint8_t mkey_lmc; uint8_t link_speed; /* LinkSpeedEnabled and LinkSpeedActive */ uint8_t mtu_smsl; uint8_t vl_cap; /* VLCap and InitType */ uint8_t vl_high_limit; uint8_t vl_arb_high_cap; uint8_t vl_arb_low_cap; uint8_t mtu_cap; uint8_t vl_stall_life; uint8_t vl_enforce; ib_net16_t m_key_violations; ib_net16_t p_key_violations; ib_net16_t q_key_violations; uint8_t guid_cap; uint8_t subnet_timeout; /* cli_rereg(1b), resrv( 2b), timeout(5b) */ uint8_t resp_time_value; uint8_t error_threshold; } PACK_SUFFIX ib_port_info_t; #include <complib/cl_packoff.h>
NAME
ib_rmpp_is_flag_set
DESCRIPTION
Returns TRUE if the MAD has the given RMPP flag set.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_rmpp_is_flag_set( IN const ib_rmpp_mad_t* const p_rmpp_mad, IN const uint8_t flag ) { CL_ASSERT( p_rmpp_mad ); return( (p_rmpp_mad->rmpp_flags & flag) == flag ); }
PARAMETERS
ib_rmpp_mad_t [in] Pointer to a MAD with an RMPP header. flag [in] The RMPP flag being examined. RETURN VALUES Returns TRUE if the MAD has the given RMPP flag set.
NOTES
SEE ALSO
ib_mad_t, ib_rmpp_mad_t
NAME
ib_rmpp_mad_t
DESCRIPTION
IBA defined MAD RMPP header (13.6.2.1)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_rmpp_mad { ib_mad_t common_hdr; uint8_t rmpp_version; uint8_t rmpp_type; uint8_t rmpp_flags; uint8_t rmpp_status; ib_net32_t seg_num; ib_net32_t paylen_newwin; } PACK_SUFFIX ib_rmpp_mad_t; #include <complib/cl_packoff.h>
SEE ALSO
ib_mad_t
NAME
ib_sa_mad_get_payload_ptr
DESCRIPTION
Gets a pointer to the SA MAD's payload area.
SYNOPSIS
AL_INLINE void* AL_API ib_sa_mad_get_payload_ptr( IN const ib_sa_mad_t* const p_sa_mad ) { return( (void*)p_sa_mad->data ); }
PARAMETERS
p_smp [in] Pointer to the SA MAD packet. RETURN VALUES Pointer to SA MAD payload area.
NOTES
SEE ALSO
ib_mad_t
NAME
ib_sa_mad_t
DESCRIPTION
IBA defined SA MAD format. (15.2.1)
SYNOPSIS
#define IB_SA_DATA_SIZE 200 #include <complib/cl_packon.h> typedef struct _ib_sa_mad { uint8_t base_ver; uint8_t mgmt_class; uint8_t class_ver; uint8_t method; ib_net16_t status; ib_net16_t resv; ib_net64_t trans_id; ib_net16_t attr_id; ib_net16_t resv1; ib_net32_t attr_mod; uint8_t rmpp_version; uint8_t rmpp_type; uint8_t rmpp_flags; uint8_t rmpp_status; ib_net32_t seg_num; ib_net32_t paylen_newwin; ib_net64_t sm_key; ib_net16_t attr_offset; ib_net16_t resv3; ib_net64_t comp_mask; uint8_t data[IB_SA_DATA_SIZE]; } PACK_SUFFIX ib_sa_mad_t; #include <complib/cl_packoff.h>
NAME
ib_slvl_table_get_vl
DESCRIPTION
Retrieves the VL for a given SL from an SL to VL mapping table.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_slvl_table_get_vl( IN const ib_slvl_table_t* const p_slvl_tbl, IN const uint8_t sl ) { uint8_t vl; /* There are two VL's per byte. */ vl = p_slvl_tbl->vl_table[sl/2]; /* If odd, shift down 4 bits. */ if( sl % 2 ) vl >>= 4; /* Mask off upper bits and return. */ return vl & 0x0F; }
PARAMETERS
p_slvl_tbl [in] Pointer to the SL to VL mapping table from which to return the VL. sl [in] SL in the table for which to return the VL. RETURN VALUES Returns the VL value for the specified SL in the provided table.
SEE ALSO
ib_slvl_table_t, ib_slvl_table_set_vl
NAME
ib_slvl_table_record_t
DESCRIPTION
IBA defined Sl to VL Mapping Table Record for SA Query. (15.2.5.4)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_slvl_table_record { ib_net16_t lid; // for CA: lid of port, for switch lid of port 0 uint8_t in_port_num; // reserved for CA's uint8_t out_port_num; // reserved for CA's uint32_t resv; ib_slvl_table_t slvl_tbl; } PACK_SUFFIX ib_slvl_table_record_t; #include <complib/cl_packoff.h>
NAME
ib_slvl_table_set_vl
DESCRIPTION
Sets the VL for a given SL in an SL to VL mapping table.
SYNOPSIS
AL_INLINE void AL_API ib_slvl_table_set_vl( IN OUT ib_slvl_table_t* const p_slvl_tbl, IN const uint8_t sl, IN const uint8_t vl ) { uint8_t entry; /* Get the current value for the byte in which the VL is stored. */ entry = p_slvl_tbl->vl_table[sl/2]; /* Clear the appropriate bits and set the new VL value. */ if( sl % 2 ) { entry &= 0x0F; entry |= ((vl & 0x0F) << 4); } else { entry &= 0xF0; entry |= (vl & 0x0F); } /* Store the updated entry back into the table. */ p_slvl_tbl->vl_table[sl/2] = entry; }
PARAMETERS
slvl_tbl [in/out] Pointer to the SL to VL mapping table in which to store the VL. sl [in] SL in the table for which to store the VL. vl [in] VL to store at the specifed SL. RETURN VALUES This function does not return a value.
SEE ALSO
ib_slvl_table_t, ib_slvl_table_get_vl
NAME
ib_slvl_table_t
DESCRIPTION
IBA defined SL2VL Mapping Table Attribute. (14.2.5.8)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_slvl_table { uint8_t vl_table[IB_MAX_NUM_VLS/2]; } PACK_SUFFIX ib_slvl_table_t; #include <complib/cl_packoff.h>
NAME
ib_sm_info_t
DESCRIPTION
SMInfo structure (14.2.5.13).
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_sm_info { ib_net64_t guid; ib_net64_t sm_key; ib_net32_t act_count; uint8_t pri_state; } PACK_SUFFIX ib_sm_info_t; #include <complib/cl_packoff.h>
FIELDS
guid Port GUID for this SM. sm_key SM_Key of this SM. act_count Activity counter used as a heartbeat. pri_state Priority and State information
SEE ALSO
NAME
ib_sminfo_get_priority
DESCRIPTION
Returns the priority value.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_sminfo_get_priority( IN const ib_sm_info_t* const p_smi ) { return( (uint8_t)((p_smi->pri_state & 0xF0)>>4) ); }
PARAMETERS
p_smi [in] Pointer to the SMInfo Attribute. RETURN VALUES Returns the priority value.
NOTES
SEE ALSO
NAME
ib_sminfo_get_state
DESCRIPTION
Returns the state value.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_sminfo_get_state( IN const ib_sm_info_t* const p_smi ) { return( (uint8_t)(p_smi->pri_state & 0x0F) ); }
PARAMETERS
p_smi [in] Pointer to the SMInfo Attribute. RETURN VALUES Returns the state value.
NOTES
SEE ALSO
NAME
ib_smp_get_payload_ptr
DESCRIPTION
Gets a pointer to the SMP payload area.
SYNOPSIS
AL_INLINE void* AL_API ib_smp_get_payload_ptr( IN const ib_smp_t* const p_smp ) { return( (void*)p_smp->data ); }
PARAMETERS
p_smp [in] Pointer to the SMP packet. RETURN VALUES Pointer to SMP payload area.
NOTES
SEE ALSO
ib_mad_t
NAME
ib_smp_get_status
DESCRIPTION
Returns the SMP status value in network order.
SYNOPSIS
AL_INLINE ib_net16_t AL_API ib_smp_get_status( IN const ib_smp_t* const p_smp ) { return( (ib_net16_t)(p_smp->status & IB_SMP_STATUS_MASK) ); }
PARAMETERS
p_smp [in] Pointer to the SMP packet. RETURN VALUES Returns the SMP status value in network order.
NOTES
SEE ALSO
ib_smp_t
NAME
ib_smp_init_new
DESCRIPTION
Initializes a MAD common header.
TODO
This is too big for inlining, but leave it here for now since there is not yet another convient spot.
SYNOPSIS
AL_INLINE void AL_API ib_smp_init_new( IN ib_smp_t* const p_smp, IN const uint8_t method, IN const ib_net64_t trans_id, IN const ib_net16_t attr_id, IN const ib_net32_t attr_mod, IN const uint8_t hop_count, IN const ib_net64_t m_key, IN const uint8_t* path_out, IN const ib_net16_t dr_slid, IN const ib_net16_t dr_dlid ) { CL_ASSERT( p_smp ); CL_ASSERT( hop_count < IB_SUBNET_PATH_HOPS_MAX ); p_smp->base_ver = 1; p_smp->mgmt_class = IB_MCLASS_SUBN_DIR; p_smp->class_ver = 1; p_smp->method = method; p_smp->status = 0; p_smp->hop_ptr = 0; p_smp->hop_count = hop_count; p_smp->trans_id = trans_id; p_smp->attr_id = attr_id; p_smp->resv = 0; p_smp->attr_mod = attr_mod; p_smp->m_key = m_key; p_smp->dr_slid = dr_slid; p_smp->dr_dlid = dr_dlid; cl_memclr( p_smp->resv1, sizeof(p_smp->resv1) + sizeof(p_smp->data) + sizeof(p_smp->initial_path) + sizeof(p_smp->return_path) ); /* copy the path */ cl_memcpy( &p_smp->initial_path, path_out, sizeof( p_smp->initial_path ) ); }
PARAMETERS
p_smp [in] Pointer to the SMP packet. method [in] Method to perform, including 'R' bit. trans_Id [in] Transaction ID. attr_id [in] Attribute ID. attr_mod [in] Attribute modifier. hop_count [in] Number of hops in the path. m_key [in] Management key for this SMP. path_out [in] Port array for outbound path. RETURN VALUES None.
NOTES
Payload area is initialized to zero.
SEE ALSO
ib_mad_t
NAME
ib_smp_is_d
DESCRIPTION
Returns TRUE if the SMP 'D' (direction) bit is set.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_smp_is_d( IN const ib_smp_t* const p_smp ) { return( (p_smp->status & IB_SMP_DIRECTION) == IB_SMP_DIRECTION ); }
PARAMETERS
p_smp [in] Pointer to the SMP packet. RETURN VALUES Returns TRUE if the SMP 'D' (direction) bit is set.
NOTES
SEE ALSO
ib_smp_t
NAME
ib_smp_is_response
DESCRIPTION
Returns TRUE if the SMP is a response MAD, FALSE otherwise.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_smp_is_response( IN const ib_smp_t* const p_smp ) { return( ib_mad_is_response( (const ib_mad_t*)p_smp ) ); }
PARAMETERS
p_smp [in] Pointer to the SMP packet. RETURN VALUES Returns TRUE if the SMP is a response MAD, FALSE otherwise.
NOTES
SEE ALSO
ib_smp_t
NAME
ib_smp_t
DESCRIPTION
IBA defined SMP. (14.2.1.2)
SYNOPSIS
#define IB_SMP_DATA_SIZE 64 #include <complib/cl_packon.h> typedef struct _ib_smp { uint8_t base_ver; uint8_t mgmt_class; uint8_t class_ver; uint8_t method; ib_net16_t status; uint8_t hop_ptr; uint8_t hop_count; ib_net64_t trans_id; ib_net16_t attr_id; ib_net16_t resv; ib_net32_t attr_mod; ib_net64_t m_key; ib_net16_t dr_slid; ib_net16_t dr_dlid; uint32_t resv1[7]; uint8_t data[IB_SMP_DATA_SIZE]; uint8_t initial_path[IB_SUBNET_PATH_HOPS_MAX]; uint8_t return_path[IB_SUBNET_PATH_HOPS_MAX]; } PACK_SUFFIX ib_smp_t; #include <complib/cl_packoff.h>
FIELDS
base_ver MAD base format. mgmt_class Class of operation. class_ver Version of MAD class-specific format. method Method to perform, including 'R' bit. status Status of operation. hop_ptr Hop pointer for directed route MADs. hop_count Hop count for directed route MADs. trans_Id Transaction ID. attr_id Attribute ID. resv Reserved field. attr_mod Attribute modifier. m_key Management key value. dr_slid Directed route source LID. dr_dlid Directed route destination LID. resv0 Reserved for 64 byte alignment. data MAD data payload. initial_path Outbound port list. return_path Inbound port list.
SEE ALSO
NAME
ib_svc_entries_t
DESCRIPTION
IBA defined IO Controller service entry array (16.3.3.5)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_svc_entries { #define SVC_ENTRY_COUNT 4 ib_svc_entry_t service_entry[SVC_ENTRY_COUNT]; } PACK_SUFFIX ib_svc_entries_t; #include <complib/cl_packoff.h>
FIELDS
service_entry An array of IO controller service entries.
SEE ALSO
ib_dm_mad_t, ib_svc_entry_t
NAME
ib_svc_entry_t
DESCRIPTION
IBA defined IO Controller service entry structure (16.3.3.5)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_svc_entry { #define MAX_SVC_ENTRY_NAME_LEN 40 char name[MAX_SVC_ENTRY_NAME_LEN]; ib_net64_t id; } PACK_SUFFIX ib_svc_entry_t; #include <complib/cl_packoff.h>
FIELDS
name UTF-8 encoded, null-terminated name of the service. id An identifier of the associated Service.
SEE ALSO
ib_svc_entries_t
NAME
ib_switch_info_clear_state_change
DESCRIPTION
Clears the switch's state change bit.
SYNOPSIS
AL_INLINE void AL_API ib_switch_info_clear_state_change( IN ib_switch_info_t* const p_si ) { p_si->life_state = (uint8_t)(p_si->life_state & 0xFB); }
PARAMETERS
p_ni [in] Pointer to a PortInfo attribute. RETURN VALUES Returns the LMC value assigned to this port.
NOTES
SEE ALSO
NAME
ib_switch_info_get_state_change
DESCRIPTION
Returns the value of the state change flag.
SYNOPSIS
AL_INLINE boolean_t AL_API ib_switch_info_get_state_change( IN const ib_switch_info_t* const p_si ) { return( (p_si->life_state & IB_SWITCH_PSC) == IB_SWITCH_PSC ); }
PARAMETERS
p_si [in] Pointer to a SwitchInfo attribute. RETURN VALUES Returns the value of the state change flag.
NOTES
SEE ALSO
NAME
ib_switch_info_t
DESCRIPTION
IBA defined SwitchInfo. (14.2.5.4)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_switch_info { ib_net16_t lin_cap; ib_net16_t rand_cap; ib_net16_t mcast_cap; ib_net16_t lin_top; uint8_t def_port; uint8_t def_mcast_pri_port; uint8_t def_mcast_not_port; uint8_t life_state; ib_net16_t lids_per_port; ib_net16_t enforce_cap; uint8_t flags; } PACK_SUFFIX ib_switch_info_t; #include <complib/cl_packoff.h>
NAME
ib_vl_arb_element_get_vl
DESCRIPTION
Retrieves the VL from a VL arbitration table element.
SYNOPSIS
AL_INLINE uint8_t AL_API ib_vl_arb_element_get_vl( IN const ib_vl_arb_element_t vl_arb_element ) { return (vl_arb_element.res_vl >> 4); }
PARAMETERS
vl_arb_element [in] VL arbitration table element from which to return the VL. RETURN VALUES Returns the VL value for the specified VL arbitration table element.
SEE ALSO
vl_arb_element, ib_vl_arb_element_set_vl
NAME
ib_vl_arb_element_set_vl
DESCRIPTION
Retrieves the VL from a VL arbitration table element.
SYNOPSIS
AL_INLINE void AL_API ib_vl_arb_element_set_vl( IN OUT ib_vl_arb_element_t* const p_vl_arb_element, IN const uint8_t vl ) { p_vl_arb_element->res_vl = vl << 4; }
PARAMETERS
vl_arb_element [in/out] VL arbitration table element in which to store the VL. vl [in] VL to store in the specified element. RETURN VALUES This function does not return a value.
SEE ALSO
vl_arb_element, ib_vl_arb_element_get_vl
NAME
ib_vl_arb_element_t
DESCRIPTION
IBA defined VL Arbitration Table Element. (14.2.5.9)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_vl_arb_element { uint8_t res_vl; uint8_t weight; } PACK_SUFFIX ib_vl_arb_element_t; #include <complib/cl_packoff.h>
NAME
ib_vl_arb_table_record_t
DESCRIPTION
IBA defined VL Arbitration Table Record for SA Query. (15.2.5.9)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_vl_arb_table_record { ib_net16_t lid; // for CA: lid of port, for switch lid of port 0 uint8_t port_num; uint8_t block_num; uint32_t reserved; ib_vl_arb_table_t vl_arb_tbl; } PACK_SUFFIX ib_vl_arb_table_record_t; #include <complib/cl_packoff.h>
NAME
ib_vl_arb_table_t
DESCRIPTION
IBA defined VL Arbitration Table. (14.2.5.9)
SYNOPSIS
#include <complib/cl_packon.h> typedef struct _ib_vl_arb_table { ib_vl_arb_element_t vl_entry[IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK]; } PACK_SUFFIX ib_vl_arb_table_t; #include <complib/cl_packoff.h>
NAME
ioc_at_slot
DESCRIPTION
Returns the IOC value at the specified slot.
SYNOPSIS
AL_INLINE uint8_t AL_API ioc_at_slot( IN const ib_iou_info_t* const p_iou_info, IN uint8_t slot ) { if( !slot ) return SLOT_DOES_NOT_EXIST; else if( slot-- & 0x01 ) return (p_iou_info->controller_list[slot >> 1] >> 4); else return (p_iou_info->controller_list[slot >> 1] & 0x0F); }
PARAMETERS
p_iou_info [in] Pointer to the IO Unit information structure. slot [in] 1-based slot number of the IOC slot to check. RETURN VALUES Returns the encoded value for the desired slot. Possible values are SLOT_DOES_NOT_EXIST, IOC_NOT_INSTALLED, and IOC_INSTALLED.
NOTES
The input slot number is 1-based, not zero based.
SEE ALSO
ib_iou_info_t
DESCRIPTION
Returns the IOC slot number, and the lower and upper bound of the service entries given the attribute modifier of ServiceEntries response.
SEE ALSO
ib_dm_set_slot_lo_hi
DESCRIPTION
Joins the IOC slot number, and the lower and upper bound of the service entries and returns it.
SEE ALSO
ib_dm_get_slot_lo_hi
NAME
ib_async_event_t -- Async event types
DESCRIPTION
This type indicates the reason the async callback was called. The context in the ib_event_rec_t indicates the resource context that associated with the callback. For example, for IB_AE_CQ_ERROR the context provided during the ib_create_cq is returned in the event.
SYNOPSIS
typedef enum _ib_async_event_t { IB_AE_SQ_ERROR = 1, IB_AE_SQ_DRAINED, IB_AE_RQ_ERROR, IB_AE_CQ_ERROR, IB_AE_QP_FATAL, IB_AE_QP_COMM, IB_AE_QP_APM, IB_AE_LOCAL_FATAL, IB_AE_PKEY_TRAP, IB_AE_QKEY_TRAP, IB_AE_MKEY_TRAP, IB_AE_PORT_TRAP, IB_AE_SYSIMG_GUID_TRAP, IB_AE_BUF_OVERRUN, IB_AE_LINK_INTEGRITY, IB_AE_FLOW_CTRL_ERROR, IB_AE_BKEY_TRAP, IB_AE_QP_APM_ERROR, IB_AE_WQ_REQ_ERROR, IB_AE_WQ_ACCESS_ERROR, IB_AE_PORT_ACTIVE, IB_AE_PORT_DOWN, IB_AE_CLIENT_REREGISTER, IB_AE_SRQ_LIMIT_REACHED, IB_AE_SRQ_CATAS_ERROR, IB_AE_SRQ_QP_LAST_WQE_REACHED, IB_AE_UNKNOWN /* ALWAYS LAST ENUM VALUE */ } ib_async_event_t;
VALUES
IB_AE_SQ_ERROR An error occurred when accessing the send queue of the QP. This event is optional. IB_AE_SQ_DRAINED The send queue of the specified QP has completed the outstanding messages in progress when the state change was requested and, if applicable, has received all acknowledgements for those messages. IB_AE_RQ_ERROR An error occurred when accessing the receive queue of the QP. This event is optional. IB_AE_CQ_ERROR An error occurred when writing an entry to the CQ. IB_AE_QP_FATAL A catastrophic error occurred while accessing or processing the work queue that prevents reporting of completions. IB_AE_QP_COMM The first packet has arrived for the receive work queue where the QP is still in the RTR state. IB_AE_QP_APM If alternate path migration is supported, this event indicates that the QP connection has migrated to the alternate path. IB_AE_LOCAL_FATAL A catastrophic HCA error occurred which cannot be attributed to any resource; behavior is indeterminate. IB_AE_PKEY_TRAP A PKEY violation was detected. This event is optional. IB_AE_QKEY_TRAP A QKEY violation was detected. This event is optional. IB_AE_MKEY_TRAP An MKEY violation was detected. This event is optional. IB_AE_PORT_TRAP A port capability change was detected. This event is optional. IB_AE_SYSIMG_GUID_TRAP If the system image GUID is supported, this event indicates that the system image GUID of this HCA has been changed. This event is optional. IB_AE_BUF_OVERRUN The number of consecutive flow control update periods with at least one overrun error in each period has exceeded the threshold specified in the port info attributes. This event is optional. IB_AE_LINK_INTEGRITY The detection of excessively frequent local physical errors has exceeded the threshold specified in the port info attributes. This event is optional. IB_AE_FLOW_CTRL_ERROR An HCA watchdog timer monitoring the arrival of flow control updates has expired without receiving an update. This event is optional. IB_AE_BKEY_TRAP An BKEY violation was detected. This event is optional. IB_AE_QP_APM_ERROR If alternate path migration is supported, this event indicates that an incoming path migration request to this QP was not accepted. IB_AE_WQ_REQ_ERROR An OpCode violation was detected at the responder. IB_AE_WQ_ACCESS_ERROR An access violation was detected at the responder. IB_AE_PORT_ACTIVE If the port active event is supported, this event is generated when the link becomes active: IB_LINK_ACTIVE. IB_AE_PORT_DOWN The link is declared unavailable: IB_LINK_INIT, IB_LINK_ARMED, IB_LINK_DOWN. IB_AE_CLIENT_REREGISTER The SM idicate to client to reregister its SA records. IB_AE_SRQ_LIMIT_REACHED Reached SRQ low watermark IB_AE_SRQ_CATAS_ERROR An error occurred while processing or accessing the SRQ that prevents dequeuing a WQE from the SRQ and reporting of receive completions. IB_AE_SRQ_QP_LAST_WQE_REACHED An event, issued for a QP, associated with a shared receive queue, when a CQE is generated for the last WQE, or the QP gets in the Error State and there are no more WQEs on the RQ. IB_AE_UNKNOWN An unknown error occurred which cannot be attributed to any resource; behavior is indeterminate.
NAME
ib_event_rec_t -- Async event notification record
DESCRIPTION
When an async event callback is made, this structure is passed to indicate the type of event, the source of event that caused it, and the context associated with this event. context -- Context of the resource that caused the event. -- ca_context if this is a port/adapter event. -- qp_context if the source is a QP event -- cq_context if the source is a CQ event. -- ee_context if the source is an EE event.
SYNOPSIS
typedef struct _ib_event_rec { TO_LONG_PTR( void* , context) ; ib_async_event_t type; /* HCA vendor specific event information. */ uint64_t vendor_specific; /* The following structures are valid only for trap types. */ union _trap { struct { uint16_t lid; ib_net64_t port_guid; uint8_t port_num; /* * The following structure is valid only for * P_KEY, Q_KEY, and M_KEY violation traps. */ struct { uint8_t sl; uint16_t src_lid; uint16_t dest_lid; union _key { uint16_t pkey; uint32_t qkey; uint64_t mkey; } key; uint32_t src_qp; uint32_t dest_qp; ib_gid_t src_gid; ib_gid_t dest_gid; } violation; } info; ib_net64_t sysimg_guid; } trap; } ib_event_rec_t;