]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ofed/librdmacm/man/rdma_get_cm_event.3
Merge OpenSSL 1.0.2p.
[FreeBSD/FreeBSD.git] / contrib / ofed / librdmacm / man / rdma_get_cm_event.3
1 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
2 .TH "RDMA_GET_CM_EVENT" 3 "2007-10-31" "librdmacm" "Librdmacm Programmer's Manual" librdmacm
3 .SH NAME
4 rdma_get_cm_event \- Retrieves the next pending communication event.
5 .SH SYNOPSIS
6 .B "#include <rdma/rdma_cma.h>"
7 .P
8 .B "int" rdma_get_cm_event
9 .BI "(struct rdma_event_channel *" channel ","
10 .BI "struct rdma_cm_event **" event ");"
11 .SH ARGUMENTS
12 .IP "channel" 12
13 Event channel to check for events.
14 .IP "event" 12
15 Allocated information about the next communication event.
16 .SH "DESCRIPTION"
17 Retrieves a communication event.  If no events are pending, by default,
18 the call will block until an event is received.
19 .SH "RETURN VALUE"
20 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
21 set to indicate the failure reason.
22 .SH "NOTES"
23 The default synchronous behavior of this routine can be changed by
24 modifying the file descriptor associated with the given channel.  All
25 events that are reported must be acknowledged by calling rdma_ack_cm_event.
26 Destruction of an rdma_cm_id will block until related events have been
27 acknowledged.
28 .SH "EVENT DATA"
29 Communication event details are returned in the rdma_cm_event structure.
30 This structure is allocated by the rdma_cm and released by the
31 rdma_ack_cm_event routine.  Details of the rdma_cm_event structure are
32 given below.
33 .IP "id" 12
34 The rdma_cm identifier associated with the event.  If the event type is
35 RDMA_CM_EVENT_CONNECT_REQUEST, then this references a new id for that
36 communication.
37 .IP "listen_id" 12
38 For RDMA_CM_EVENT_CONNECT_REQUEST event types, this references the
39 corresponding listening request identifier.
40 .IP "event" 12
41 Specifies the type of communication event which occurred.  See EVENT TYPES
42 below.
43 .IP "status" 12
44 Returns any asynchronous error information associated with an event.  The
45 status is zero if the operation was successful, otherwise the status value
46 is non-zero and is either set to an errno or a transport specific value.
47 For details on transport specific status values, see the event type information
48 below.
49 .IP "param" 12
50 Provides additional details based on the type of event.  Users should
51 select the conn or ud subfields based on the rdma_port_space of the
52 rdma_cm_id associated with the event.  See UD EVENT DATA and CONN EVENT
53 DATA below.
54 .SH "UD EVENT DATA"
55 Event parameters related to unreliable datagram (UD) services: RDMA_PS_UDP and
56 RDMA_PS_IPOIB.  The UD event data is valid for RDMA_CM_EVENT_ESTABLISHED and
57 RDMA_CM_EVENT_MULTICAST_JOIN events, unless stated otherwise.
58 .IP "private_data" 12
59 References any user-specified data associated with RDMA_CM_EVENT_CONNECT_REQUEST
60 or RDMA_CM_EVENT_ESTABLISHED events.  The data referenced by this field matches
61 that specified by the remote side when calling rdma_connect or rdma_accept.
62 This field is NULL if the event does not include private data.  The buffer
63 referenced by this pointer is deallocated when calling rdma_ack_cm_event.
64 .IP "private_data_len" 12
65 The size of the private data buffer.  Users should note that the size of
66 the private data buffer may be larger than the amount of private data
67 sent by the remote side.  Any additional space in the buffer will be
68 zeroed out.
69 .IP "ah_attr" 12
70 Address information needed to send data to the remote endpoint(s).
71 Users should use this structure when allocating their address handle.
72 .IP "qp_num" 12
73 QP number of the remote endpoint or multicast group.
74 .IP "qkey" 12
75 QKey needed to send data to the remote endpoint(s).
76 .SH "CONN EVENT DATA"
77 Event parameters related to connected QP services: RDMA_PS_TCP.  The
78 connection related event data is valid for RDMA_CM_EVENT_CONNECT_REQUEST
79 and RDMA_CM_EVENT_ESTABLISHED events, unless stated otherwise.
80 .IP "private_data" 12
81 References any user-specified data associated with the event.  The data
82 referenced by this field matches that specified by the remote side when
83 calling rdma_connect or rdma_accept.  This field is NULL if the event
84 does not include private data.  The buffer referenced by this pointer is
85 deallocated when calling rdma_ack_cm_event.
86 .IP "private_data_len" 12
87 The size of the private data buffer.  Users should note that the size of
88 the private data buffer may be larger than the amount of private data
89 sent by the remote side.  Any additional space in the buffer will be
90 zeroed out.
91 .IP "responder_resources" 12
92 The number of responder resources requested of the recipient.
93 This field matches the initiator depth specified by the remote node when
94 calling rdma_connect and rdma_accept.
95 .IP "initiator_depth" 12
96 The maximum number of outstanding RDMA read/atomic operations
97 that the recipient may have outstanding.  This field matches the responder
98 resources specified by the remote node when calling rdma_connect and
99 rdma_accept.
100 .IP "flow_control" 12
101 Indicates if hardware level flow control is provided by the sender.
102 .IP "retry_count" 12
103 For RDMA_CM_EVENT_CONNECT_REQUEST events only, indicates the number of times
104 that the recipient should retry send operations.
105 .IP "rnr_retry_count" 12
106 The number of times that the recipient should retry receiver not ready (RNR)
107 NACK errors.
108 .IP "srq" 12
109 Specifies if the sender is using a shared-receive queue.
110 .IP "qp_num" 12
111 Indicates the remote QP number for the connection.
112 .SH "EVENT TYPES"
113 The following types of communication events may be reported.
114 .IP RDMA_CM_EVENT_ADDR_RESOLVED
115 Address resolution (rdma_resolve_addr) completed successfully.
116 .IP RDMA_CM_EVENT_ADDR_ERROR
117 Address resolution (rdma_resolve_addr) failed.
118 .IP RDMA_CM_EVENT_ROUTE_RESOLVED
119 Route resolution (rdma_resolve_route) completed successfully.
120 .IP RDMA_CM_EVENT_ROUTE_ERROR
121 Route resolution (rdma_resolve_route) failed.
122 .IP RDMA_CM_EVENT_CONNECT_REQUEST
123 Generated on the passive side to notify the user of a new connection request.
124 .IP RDMA_CM_EVENT_CONNECT_RESPONSE
125 Generated on the active side to notify the user of a successful response
126 to a connection request.  It is only generated on rdma_cm_id's that do not
127 have a QP associated with them.
128 .IP RDMA_CM_EVENT_CONNECT_ERROR
129 Indicates that an error has occurred trying to establish or a connection.
130 May be generated on the active or passive side of a connection.
131 .IP RDMA_CM_EVENT_UNREACHABLE
132 Generated on the active side to notify the user that the remote server is
133 not reachable or unable to respond to a connection request.  If this event
134 is generated in response to a UD QP resolution request over InfiniBand,
135 the event status field will contain an errno, if negative, or the status
136 result carried in the IB CM SIDR REP message.
137 .IP RDMA_CM_EVENT_REJECTED
138 Indicates that a connection request or response was rejected by the remote
139 end point.  The event status field will contain the transport specific
140 reject reason if available.  Under InfiniBand, this is the reject reason
141 carried in the IB CM REJ message.
142 .IP RDMA_CM_EVENT_ESTABLISHED
143 Indicates that a connection has been established with the remote end point.
144 .IP RDMA_CM_EVENT_DISCONNECTED
145 The connection has been disconnected.
146 .IP RDMA_CM_EVENT_DEVICE_REMOVAL
147 The local RDMA device associated with the rdma_cm_id has been removed.
148 Upon receiving this event, the user must destroy the related rdma_cm_id.
149 .IP RDMA_CM_EVENT_MULTICAST_JOIN
150 The multicast join operation (rdma_join_multicast) completed successfully.
151 .IP RDMA_CM_EVENT_MULTICAST_ERROR
152 An error either occurred joining a multicast group, or, if the group had
153 already been joined, on an existing group.  The specified multicast group is
154 no longer accessible and should be rejoined, if desired.
155 .IP RDMA_CM_EVENT_ADDR_CHANGE
156 The network device associated with this ID through address resolution changed
157 its HW address, eg following of bonding failover. This event can serve as a
158 hint for applications who want the links used for their RDMA sessions to
159 align with the network stack.
160 .IP RDMA_CM_EVENT_TIMEWAIT_EXIT
161 The QP associated with a connection has exited its timewait state and is now
162 ready to be re-used.  After a QP has been disconnected, it is maintained in
163 a timewait state to allow any in flight packets to exit the network.  After
164 the timewait state has completed, the rdma_cm will report this event.
165 .SH "SEE ALSO"
166 rdma_ack_cm_event(3), rdma_create_event_channel(3), rdma_resolve_addr(3),
167 rdma_resolve_route(3), rdma_connect(3), rdma_listen(3), rdma_join_multicast(3),
168 rdma_destroy_id(3), rdma_event_str(3)