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