OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

btl_openib_endpoint.h
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2006 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
13 * Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
14 * reserved.
15 * Copyright (c) 2006-2007 Voltaire All rights reserved.
16 * Copyright (c) 2007-2009 Mellanox Technologies. All rights reserved.
17 * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
18 * $COPYRIGHT$
19 *
20 * Additional copyrights may follow
21 *
22 * $HEADER$
23 */
24
25 #ifndef MCA_BTL_IB_ENDPOINT_H
26 #define MCA_BTL_IB_ENDPOINT_H
27
28 #include "opal/class/opal_list.h"
29 #include "opal/mca/event/event.h"
30 #include "opal/util/output.h"
31 #include "ompi/mca/btl/btl.h"
32 #include "btl_openib.h"
33 #include "btl_openib_frag.h"
34 #include "btl_openib_eager_rdma.h"
35 #include <errno.h>
36 #include <string.h>
37 #include "ompi/mca/btl/base/btl_base_error.h"
38 #include "connect/base.h"
39
40 BEGIN_C_DECLS
41
42 struct mca_btl_openib_frag_t;
43 struct mca_btl_openib_proc_modex_t;
44
45 /**
46 * State of IB endpoint connection.
47 */
48
49 typedef enum {
50 /* Defines the state in which this BTL instance
51 * has started the process of connection */
52 MCA_BTL_IB_CONNECTING,
53
54 /* Waiting for ack from endpoint */
55 MCA_BTL_IB_CONNECT_ACK,
56
57 /*Waiting for final connection ACK from endpoint */
58 MCA_BTL_IB_WAITING_ACK,
59
60 /* Connected ... both sender & receiver have
61 * buffers associated with this connection */
62 MCA_BTL_IB_CONNECTED,
63
64 /* Connection is closed, there are no resources
65 * associated with this */
66 MCA_BTL_IB_CLOSED,
67
68 /* Maximum number of retries have been used.
69 * Report failure on send to upper layer */
70 MCA_BTL_IB_FAILED
71 } mca_btl_openib_endpoint_state_t;
72
73 typedef struct mca_btl_openib_rem_qp_info_t {
74 uint32_t rem_qp_num;
75 /* Remote QP number */
76 uint32_t rem_psn;
77 /* Remote processes port sequence number */
78 } mca_btl_openib_rem_qp_info_t;
79
80 typedef struct mca_btl_openib_rem_srq_info_t {
81 /* Remote SRQ number */
82 uint32_t rem_srq_num;
83 } mca_btl_openib_rem_srq_info_t;
84
85 typedef struct mca_btl_openib_rem_info_t {
86 /* Local identifier of the remote process */
87 uint16_t rem_lid;
88 /* subnet id of remote process */
89 uint64_t rem_subnet_id;
90 /* MTU of remote process */
91 uint32_t rem_mtu;
92 /* index of remote endpoint in endpoint array */
93 uint32_t rem_index;
94 /* Remote QPs */
95 mca_btl_openib_rem_qp_info_t *rem_qps;
96 /* Remote xrc_srq info, used only with XRC connections */
97 mca_btl_openib_rem_srq_info_t *rem_srqs;
98 /* Vendor id of remote HCA */
99 uint32_t rem_vendor_id;
100 /* Vendor part id of remote HCA */
101 uint32_t rem_vendor_part_id;
102 /* Transport type of remote port */
103 mca_btl_openib_transport_type_t rem_transport_type;
104 } mca_btl_openib_rem_info_t;
105
106
107 /**
108 * Agggregates all per peer qp info for an endpoint
109 */
110 typedef struct mca_btl_openib_endpoint_pp_qp_t {
111 int32_t sd_credits; /**< this rank's view of the credits
112 * available for sending:
113 * this is the credits granted by the
114 * remote peer which has some relation to the
115 * number of receive buffers posted remotely
116 */
117 int32_t rd_posted; /**< number of descriptors posted to the nic*/
118 int32_t rd_credits; /**< number of credits to return to peer */
119 int32_t cm_received; /**< Credit messages received */
120 int32_t cm_return; /**< how may credits to return */
121 int32_t cm_sent; /**< Outstanding number of credit messages */
122 } mca_btl_openib_endpoint_pp_qp_t;
123
124
125 /**
126 * Aggregates all srq qp info for an endpoint
127 */
128 typedef struct mca_btl_openib_endpoint_srq_qp_t {
129 int32_t dummy;
130 } mca_btl_openib_endpoint_srq_qp_t;
131
132 typedef struct mca_btl_openib_qp_t {
133 struct ibv_qp *lcl_qp;
134 uint32_t lcl_psn;
135 int32_t sd_wqe; /**< number of available send wqe entries */
136 int users;
137 opal_mutex_t lock;
138 } mca_btl_openib_qp_t;
139
140 typedef struct mca_btl_openib_endpoint_qp_t {
141 mca_btl_openib_qp_t *qp;
142 opal_list_t no_credits_pending_frags[2]; /**< put fragment here if there is no credits
143 available */
144 opal_list_t no_wqe_pending_frags[2]; /**< put fragments here if there is no wqe
145 available */
146 int32_t rd_credit_send_lock; /**< Lock credit send fragment */
147 mca_btl_openib_send_control_frag_t *credit_frag;
148 size_t ib_inline_max; /**< max size of inline send*/
149 union {
150 mca_btl_openib_endpoint_srq_qp_t srq_qp;
151 mca_btl_openib_endpoint_pp_qp_t pp_qp;
152 } u;
153 } mca_btl_openib_endpoint_qp_t;
154
155 /**
156 * An abstraction that represents a connection to a endpoint process.
157 * An instance of mca_btl_base_endpoint_t is associated w/ each process
158 * and BTL pair at startup. However, connections to the endpoint
159 * are established dynamically on an as-needed basis:
160 */
161
162 struct mca_btl_base_endpoint_t {
163 opal_list_item_t super;
164
165 /** BTL module that created this connection */
166 struct mca_btl_openib_module_t* endpoint_btl;
167
168 /** proc structure corresponding to endpoint */
169 struct mca_btl_openib_proc_t* endpoint_proc;
170
171 /** local CPC to connect to this endpoint */
172 ompi_btl_openib_connect_base_module_t *endpoint_local_cpc;
173
174 /** hook for local CPC to hang endpoint-specific data */
175 void *endpoint_local_cpc_data;
176
177 /** If endpoint_local_cpc->cbm_uses_cts is true and this endpoint
178 is iWARP, then endpoint_initiator must be true on the side
179 that actually initiates the QP, false on the other side. This
180 bool is used to know which way to send the first CTS
181 message. */
182 bool endpoint_initiator;
183
184 /** pointer to remote proc's CPC data (essentially its CPC modex
185 message) */
186 ompi_btl_openib_connect_base_module_data_t *endpoint_remote_cpc_data;
187
188 /** current state of the connection */
189 mca_btl_openib_endpoint_state_t endpoint_state;
190
191 /** number of connection retries attempted */
192 size_t endpoint_retries;
193
194 /** timestamp of when the first connection was attempted */
195 double endpoint_tstamp;
196
197 /** lock for concurrent access to endpoint state */
198 opal_mutex_t endpoint_lock;
199
200 /** list of pending frags due to lazy connection establishment
201 for this endpotint */
202 opal_list_t pending_lazy_frags;
203
204 mca_btl_openib_endpoint_qp_t *qps;
205 uint32_t xrc_recv_qp_num; /* in xrc we will use it as recv qp */
206 uint32_t xrc_recv_psn;
207
208 /** list of pending rget ops */
209 opal_list_t pending_get_frags;
210 /** list of pending rput ops */
211 opal_list_t pending_put_frags;
212
213 /** number of available get tokens */
214 int32_t get_tokens;
215
216 /** subnet id of this endpoint*/
217 uint64_t subnet_id;
218 /** used only for xrc; pointer to struct that keeps remote port
219 info */
220 struct ib_address_t *ib_addr;
221
222 /** number of eager received */
223 int32_t eager_recv_count;
224 /** info about remote RDMA buffer */
225 mca_btl_openib_eager_rdma_remote_t eager_rdma_remote;
226 /** info about local RDMA buffer */
227 mca_btl_openib_eager_rdma_local_t eager_rdma_local;
228 /** index of the endpoint in endpoints array */
229 int32_t index;
230
231 /** does the endpoint require network byte ordering? */
232 bool nbo;
233 /** use eager rdma for this peer? */
234 bool use_eager_rdma;
235
236 /** information about the remote port */
237 mca_btl_openib_rem_info_t rem_info;
238
239 /** Frag for initial wireup CTS protocol; will be NULL if CPC
240 indicates that it does not want to use CTS */
241 mca_btl_openib_recv_frag_t endpoint_cts_frag;
242 /** Memory registration info for the CTS frag */
243 struct ibv_mr *endpoint_cts_mr;
244
245 /** Whether we've posted receives on this EP or not (only used in
246 CTS protocol) */
247 bool endpoint_posted_recvs;
248
249 /** Whether we've received the CTS from the peer or not (only used
250 in CTS protocol) */
251 bool endpoint_cts_received;
252
253 /** Whether we've send out CTS to the peer or not (only used in
254 CTS protocol) */
255 bool endpoint_cts_sent;
256 };
257
258 typedef struct mca_btl_base_endpoint_t mca_btl_base_endpoint_t;
259 typedef mca_btl_base_endpoint_t mca_btl_openib_endpoint_t;
260
261 OBJ_CLASS_DECLARATION(mca_btl_openib_endpoint_t);
262
263 static inline int32_t qp_get_wqe(mca_btl_openib_endpoint_t *ep, const int qp)
264 {
265 return OPAL_THREAD_ADD32(&ep->qps[qp].qp->sd_wqe, -1);
266 }
267
268 static inline int32_t qp_put_wqe(mca_btl_openib_endpoint_t *ep, const int qp)
269 {
270 return OPAL_THREAD_ADD32(&ep->qps[qp].qp->sd_wqe, 1);
271 }
272
273 int mca_btl_openib_endpoint_send(mca_btl_base_endpoint_t*,
274 mca_btl_openib_send_frag_t*);
275 int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t*,
276 mca_btl_openib_send_frag_t*);
277 void mca_btl_openib_endpoint_send_credits(mca_btl_base_endpoint_t*, const int);
278 void mca_btl_openib_endpoint_connect_eager_rdma(mca_btl_openib_endpoint_t*);
279 int mca_btl_openib_endpoint_post_recvs(mca_btl_openib_endpoint_t*);
280 void mca_btl_openib_endpoint_send_cts(mca_btl_openib_endpoint_t *endpoint);
281 void mca_btl_openib_endpoint_cpc_complete(mca_btl_openib_endpoint_t*);
282 void mca_btl_openib_endpoint_connected(mca_btl_openib_endpoint_t*);
283 void mca_btl_openib_endpoint_init(mca_btl_openib_module_t*,
284 mca_btl_base_endpoint_t*,
285 ompi_btl_openib_connect_base_module_t *local_cpc,
286 struct mca_btl_openib_proc_modex_t *remote_proc_info,
287 ompi_btl_openib_connect_base_module_data_t *remote_cpc_data);
288
289 /*
290 * Invoke an error on the btl associated with an endpoint. If we
291 * don't have an endpoint, then just use the first one on the
292 * component list of BTLs.
293 */
294 void *mca_btl_openib_endpoint_invoke_error(void *endpoint);
295
296 static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp,
297 const int num_post)
298 {
299 int i, rc;
300 struct ibv_recv_wr *bad_wr, *wr_list = NULL, *wr = NULL;
301 mca_btl_openib_module_t *openib_btl = ep->endpoint_btl;
302
303 if(0 == num_post)
304 return OMPI_SUCCESS;
305
306 for(i = 0; i < num_post; i++) {
307 int rc;
308 ompi_free_list_item_t* item;
309 OMPI_FREE_LIST_WAIT(&openib_btl->device->qps[qp].recv_free, item, rc);
310 to_base_frag(item)->base.order = qp;
311 to_com_frag(item)->endpoint = ep;
312 if(NULL == wr)
313 wr = wr_list = &to_recv_frag(item)->rd_desc;
314 else
315 wr = wr->next = &to_recv_frag(item)->rd_desc;
316 OPAL_OUTPUT((-1, "Posting recv (QP num %d): WR ID %p, SG addr %p, len %d, lkey %d",
317 ep->qps[qp].qp->lcl_qp->qp_num,
318 (void*) wr->wr_id,
319 (void*) wr->sg_list[0].addr,
320 wr->sg_list[0].length,
321 wr->sg_list[0].lkey));
322 }
323
324 wr->next = NULL;
325
326 rc = ibv_post_recv(ep->qps[qp].qp->lcl_qp, wr_list, &bad_wr);
327 if (0 == rc)
328 return OMPI_SUCCESS;
329
330 BTL_ERROR(("error %d posting receive on qp %d", rc, qp));
331 return OMPI_ERROR;
332 }
333
334 static inline int mca_btl_openib_endpoint_post_rr_nolock(
335 mca_btl_base_endpoint_t *ep, const int qp)
336 {
337 int rd_rsv = mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_rsv;
338 int rd_num = mca_btl_openib_component.qp_infos[qp].rd_num;
339 int rd_low = mca_btl_openib_component.qp_infos[qp].rd_low;
340 int cqp = mca_btl_openib_component.credits_qp, rc;
341 int cm_received = 0, num_post = 0;
342
343 assert(BTL_OPENIB_QP_TYPE_PP(qp));
344
345 if(ep->qps[qp].u.pp_qp.rd_posted <= rd_low)
346 num_post = rd_num - ep->qps[qp].u.pp_qp.rd_posted;
347
348 assert(num_post >= 0);
349
350 if(ep->qps[qp].u.pp_qp.cm_received >= (rd_rsv >> 2))
351 cm_received = ep->qps[qp].u.pp_qp.cm_received;
352
353 if((rc = post_recvs(ep, qp, num_post)) != OMPI_SUCCESS) {
354 return rc;
355 }
356 OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.rd_posted, num_post);
357 OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.rd_credits, num_post);
358
359 /* post buffers for credit management on credit management qp */
360 if((rc = post_recvs(ep, cqp, cm_received)) != OMPI_SUCCESS) {
361 return rc;
362 }
363 OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.cm_return, cm_received);
364 OPAL_THREAD_ADD32(&ep->qps[qp].u.pp_qp.cm_received, -cm_received);
365
366 assert(ep->qps[qp].u.pp_qp.rd_credits <= rd_num &&
367 ep->qps[qp].u.pp_qp.rd_credits >= 0);
368
369 return OMPI_SUCCESS;
370 }
371
372 static inline int mca_btl_openib_endpoint_post_rr(
373 mca_btl_base_endpoint_t *ep, const int qp)
374 {
375 int ret;
376 OPAL_THREAD_LOCK(&ep->endpoint_lock);
377 ret = mca_btl_openib_endpoint_post_rr_nolock(ep, qp);
378 OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
379 return ret;
380 }
381
382 #define BTL_OPENIB_CREDITS_SEND_TRYLOCK(E, Q) \
383 OPAL_ATOMIC_CMPSET_32(&(E)->qps[(Q)].rd_credit_send_lock, 0, 1)
384 #define BTL_OPENIB_CREDITS_SEND_UNLOCK(E, Q) \
385 OPAL_ATOMIC_CMPSET_32(&(E)->qps[(Q)].rd_credit_send_lock, 1, 0)
386 #define BTL_OPENIB_GET_CREDITS(FROM, TO) \
387 do { \
388 TO = FROM; \
389 } while(0 == OPAL_ATOMIC_CMPSET_32(&FROM, TO, 0))
390
391
392 static inline bool check_eager_rdma_credits(const mca_btl_openib_endpoint_t *ep)
393 {
394 return (ep->eager_rdma_local.credits > ep->eager_rdma_local.rd_win) ? true :
395 false;
396 }
397
398 static inline bool
399 check_send_credits(const mca_btl_openib_endpoint_t *ep, const int qp)
400 {
401
402 if(!BTL_OPENIB_QP_TYPE_PP(qp))
403 return false;
404
405 return (ep->qps[qp].u.pp_qp.rd_credits >=
406 mca_btl_openib_component.qp_infos[qp].u.pp_qp.rd_win) ? true : false;
407 }
408
409 static inline void send_credits(mca_btl_openib_endpoint_t *ep, int qp)
410 {
411 if(BTL_OPENIB_QP_TYPE_PP(qp)) {
412 if(check_send_credits(ep, qp))
413 goto try_send;
414 } else {
415 qp = mca_btl_openib_component.credits_qp;
416 }
417
418 if(!check_eager_rdma_credits(ep))
419 return;
420
421 try_send:
422 if(BTL_OPENIB_CREDITS_SEND_TRYLOCK(ep, qp))
423 mca_btl_openib_endpoint_send_credits(ep, qp);
424 }
425
426 static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep,
427 mca_btl_base_descriptor_t *des, opal_list_t *pending_list)
428 {
429 int rc = OMPI_ERR_RESOURCE_BUSY;
430
431 switch(ep->endpoint_state) {
432 case MCA_BTL_IB_CLOSED:
433 rc = ep->endpoint_local_cpc->cbm_start_connect(ep->endpoint_local_cpc, ep);
434 if (OMPI_SUCCESS == rc) {
435 rc = OMPI_ERR_RESOURCE_BUSY;
436 }
437 /*
438 * As long as we expect a message from the peer (in order
439 * to setup the connection) let the event engine pool the
440 * OOB events. Note: we increment it once peer active
441 * connection.
442 */
443 opal_progress_event_users_increment();
444 /* fall through */
445 default:
446 opal_list_append(pending_list, (opal_list_item_t *)des);
447 break;
448 case MCA_BTL_IB_FAILED:
449 rc = OMPI_ERR_UNREACH;
450 break;
451 case MCA_BTL_IB_CONNECTED:
452 rc = OMPI_SUCCESS;
453 break;
454 }
455
456 return rc;
457 }
458
459 static inline __opal_attribute_always_inline__ int
460 ib_send_flags(uint32_t size, mca_btl_openib_endpoint_qp_t *qp)
461 {
462 return IBV_SEND_SIGNALED |
463 ((size <= qp->ib_inline_max) ? IBV_SEND_INLINE : 0);
464 }
465
466 static inline int
467 acquire_eager_rdma_send_credit(mca_btl_openib_endpoint_t *endpoint)
468 {
469 if(OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, -1) < 0) {
470 OPAL_THREAD_ADD32(&endpoint->eager_rdma_remote.tokens, 1);
471 return OMPI_ERR_OUT_OF_RESOURCE;
472 }
473
474 return OMPI_SUCCESS;
475 }
476
477 static inline int post_send(mca_btl_openib_endpoint_t *ep,
478 mca_btl_openib_send_frag_t *frag, const bool rdma)
479 {
480 mca_btl_openib_module_t *openib_btl = ep->endpoint_btl;
481 mca_btl_base_segment_t *seg = &to_base_frag(frag)->segment;
482 struct ibv_sge *sg = &to_com_frag(frag)->sg_entry;
483 struct ibv_send_wr *sr_desc = &to_out_frag(frag)->sr_desc;
484 struct ibv_send_wr *bad_wr;
485 int qp = to_base_frag(frag)->base.order;
486
487 sg->length = seg->seg_len + sizeof(mca_btl_openib_header_t) +
488 (rdma ? sizeof(mca_btl_openib_footer_t) : 0) + frag->coalesced_length;
489
490 sr_desc->send_flags = ib_send_flags(sg->length, &(ep->qps[qp]));
491
492 if(ep->nbo)
493 BTL_OPENIB_HEADER_HTON(*frag->hdr);
494
495 if(rdma) {
496 int32_t head;
497 mca_btl_openib_footer_t* ftr =
498 (mca_btl_openib_footer_t*)(((char*)frag->hdr) + sg->length +
499 BTL_OPENIB_FTR_PADDING(sg->length) - sizeof(mca_btl_openib_footer_t));
500 sr_desc->opcode = IBV_WR_RDMA_WRITE;
501 MCA_BTL_OPENIB_RDMA_FRAG_SET_SIZE(ftr, sg->length);
502 MCA_BTL_OPENIB_RDMA_MAKE_LOCAL(ftr);
503 #if OPAL_ENABLE_DEBUG
504 do {
505 ftr->seq = ep->eager_rdma_remote.seq;
506 } while (!OPAL_ATOMIC_CMPSET_32((int32_t*) &ep->eager_rdma_remote.seq,
507 (int32_t) ftr->seq,
508 (int32_t) (ftr->seq+1)));
509 #endif
510 if(ep->nbo)
511 BTL_OPENIB_FOOTER_HTON(*ftr);
512
513 sr_desc->wr.rdma.rkey = ep->eager_rdma_remote.rkey;
514 MCA_BTL_OPENIB_RDMA_MOVE_INDEX(ep->eager_rdma_remote.head, head);
515 #if BTL_OPENIB_FAILOVER_ENABLED
516 /* frag->ftr is unused on the sending fragment, so use it
517 * to indicate it is an eager fragment. A non-zero value
518 * indicates it is eager, and the value indicates the
519 * location in the eager RDMA array that it lives. */
520 frag->ftr = (mca_btl_openib_footer_t*)(long)(1 + head);
521 #endif
522 sr_desc->wr.rdma.remote_addr =
523 ep->eager_rdma_remote.base.lval +
524 head * openib_btl->eager_rdma_frag_size +
525 sizeof(mca_btl_openib_header_t) +
526 mca_btl_openib_component.eager_limit +
527 sizeof(mca_btl_openib_footer_t);
528 sr_desc->wr.rdma.remote_addr -= sg->length + BTL_OPENIB_FTR_PADDING(sg->length);
529 } else {
530 if(BTL_OPENIB_QP_TYPE_PP(qp)) {
531 sr_desc->opcode = IBV_WR_SEND;
532 } else {
533 sr_desc->opcode = IBV_WR_SEND_WITH_IMM;
534 #if !defined(WORDS_BIGENDIAN) && OPAL_ENABLE_HETEROGENEOUS_SUPPORT
535 sr_desc->imm_data = htonl(ep->rem_info.rem_index);
536 #else
537 sr_desc->imm_data = ep->rem_info.rem_index;
538 #endif
539 }
540 }
541
542 #if HAVE_XRC
543 if(BTL_OPENIB_QP_TYPE_XRC(qp))
544 sr_desc->xrc_remote_srq_num = ep->rem_info.rem_srqs[qp].rem_srq_num;
545 #endif
546 assert(sg->addr == (uint64_t)(uintptr_t)frag->hdr);
547
548 return ibv_post_send(ep->qps[qp].qp->lcl_qp, sr_desc, &bad_wr);
549 }
550
551 END_C_DECLS
552
553 #endif
OPAL_THREAD_ADD32
#define OPAL_THREAD_ADD32(x, y)
Use an atomic operation for increment/decrement if opal_using_threads() indicates that threads are in...
Definition: mutex.h:367
mca_btl_base_endpoint_t::eager_rdma_local
mca_btl_openib_eager_rdma_local_t eager_rdma_local
info about local RDMA buffer
Definition: btl_openib_endpoint.h:227
OPAL_OUTPUT
#define OPAL_OUTPUT(a)
Main macro for use in sending debugging output to output streams; will be "compiled out" when OPAL is...
Definition: output.h:534
mca_btl_openib_endpoint_pp_qp_t
Agggregates all per peer qp info for an endpoint.
Definition: btl_openib_endpoint.h:110
mca_btl_base_descriptor_t
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
output.h
OPAL output stream facility.
mca_btl_openib_eager_rdma_remote_t::head
int32_t head
RDMA buffer to post to.
Definition: btl_openib_eager_rdma.h:37
mca_btl_openib_device_qp_t::recv_free
ompi_free_list_t recv_free
free lists of receive buffer descriptors
Definition: btl_openib.h:341
mca_btl_openib_send_frag_t
Definition: btl_openib_frag.h:322
mca_btl_openib_eager_rdma_local_t::credits
int32_t credits
number of RDMA credits
Definition: btl_openib_eager_rdma.h:24
mca_btl_base_endpoint_t::index
int32_t index
index of the endpoint in endpoints array
Definition: btl_openib_endpoint.h:229
mca_btl_base_endpoint_t::eager_recv_count
int32_t eager_recv_count
number of eager received
Definition: btl_openib_endpoint.h:223
mca_btl_openib_qp_t::sd_wqe
int32_t sd_wqe
number of available send wqe entries
Definition: btl_openib_endpoint.h:135
opal_progress_event_users_increment
OPAL_DECLSPEC void opal_progress_event_users_increment(void)
Increase the number of users of the event library.
Definition: opal_progress.c:245
mca_btl_openib_qp_t
Definition: btl_openib_endpoint.h:132
mca_btl_openib_recv_frag_t
Definition: btl_openib_frag.h:334
mca_btl_base_endpoint_t::endpoint_initiator
bool endpoint_initiator
If endpoint_local_cpc->cbm_uses_cts is true and this endpoint is iWARP, then endpoint_initiator must ...
Definition: btl_openib_endpoint.h:182
mca_btl_openib_endpoint_qp_t::rd_credit_send_lock
int32_t rd_credit_send_lock
Lock credit send fragment.
Definition: btl_openib_endpoint.h:146
mca_btl_openib_rem_info_t
Definition: btl_openib_endpoint.h:85
mca_btl_base_endpoint_t::endpoint_proc
struct mca_btl_openib_proc_t * endpoint_proc
proc structure corresponding to endpoint
Definition: btl_openib_endpoint.h:169
ib_address_t
Definition: btl_openib_xrc.h:29
mca_btl_base_endpoint_t::get_tokens
int32_t get_tokens
number of available get tokens
Definition: btl_openib_endpoint.h:214
opal_mutex_t
Definition: mutex_unix.h:53
ompi_btl_openib_connect_base_module_t::cbm_start_connect
ompi_btl_openib_connect_base_module_start_connect_fn_t cbm_start_connect
Connect function.
Definition: connect.h:336
mca_btl_base_endpoint_t::endpoint_cts_mr
struct ibv_mr * endpoint_cts_mr
Memory registration info for the CTS frag.
Definition: btl_openib_endpoint.h:243
mca_btl_openib_endpoint_qp_t
Definition: btl_openib_endpoint.h:140
mca_btl_openib_module_t
IB BTL Interface.
Definition: btl_openib.h:432
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
mca_btl_base_endpoint_t::endpoint_state
mca_btl_openib_endpoint_state_t endpoint_state
current state of the connection
Definition: btl_openib_endpoint.h:189
mca_btl_openib_endpoint_pp_qp_t::cm_received
int32_t cm_received
Credit messages received.
Definition: btl_openib_endpoint.h:119
mca_btl_base_endpoint_t::endpoint_retries
size_t endpoint_retries
number of connection retries attempted
Definition: btl_openib_endpoint.h:192
opal_list_item_t
Definition: opal_list.h:98
OPAL_THREAD_LOCK
#define OPAL_THREAD_LOCK(mutex)
Lock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:223
mca_btl_base_endpoint_t::endpoint_lock
opal_mutex_t endpoint_lock
lock for concurrent access to endpoint state
Definition: btl_openib_endpoint.h:198
mca_btl_base_endpoint_t::endpoint_btl
struct mca_btl_elan_module_t * endpoint_btl
BTL instance that created this connection.
Definition: btl_elan_endpoint.h:36
OPAL_THREAD_UNLOCK
#define OPAL_THREAD_UNLOCK(mutex)
Unlock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:309
mca_btl_openib_endpoint_qp_t::ib_inline_max
size_t ib_inline_max
max size of inline send
Definition: btl_openib_endpoint.h:148
mca_btl_base_endpoint_t::rem_info
mca_btl_openib_rem_info_t rem_info
information about the remote port
Definition: btl_openib_endpoint.h:237
mca_btl_openib_endpoint_pp_qp_t::rd_posted
int32_t rd_posted
number of descriptors posted to the nic
Definition: btl_openib_endpoint.h:117
mca_btl_openib_eager_rdma_remote_t::base
ompi_ptr_t base
address of remote buffer
Definition: btl_openib_eager_rdma.h:35
mca_btl_base_endpoint_t::use_eager_rdma
bool use_eager_rdma
use eager rdma for this peer?
Definition: btl_openib_endpoint.h:234
mca_btl_base_endpoint_t::endpoint_local_cpc
ompi_btl_openib_connect_base_module_t * endpoint_local_cpc
local CPC to connect to this endpoint
Definition: btl_openib_endpoint.h:172
mca_btl_base_endpoint_t::endpoint_tstamp
double endpoint_tstamp
timestamp of when the first connection was attempted
Definition: btl_openib_endpoint.h:195
mca_btl_base_endpoint_t::endpoint_local_cpc_data
void * endpoint_local_cpc_data
hook for local CPC to hang endpoint-specific data
Definition: btl_openib_endpoint.h:175
opal_list_append
#define opal_list_append(l, i)
Append an item to the end of the list.
Definition: opal_list.h:410
mca_btl_openib_rem_srq_info_t
Definition: btl_openib_endpoint.h:80
mca_btl_openib_header_t
Definition: btl_openib_frag.h:37
mca_btl_openib_frag_t
IB fragment derived type.
Definition: btl_openib_frag.h:288
btl.h
Byte Transfer Layer (BTL)
mca_btl_base_endpoint_t::ib_addr
struct ib_address_t * ib_addr
used only for xrc; pointer to struct that keeps remote port info
Definition: btl_openib_endpoint.h:220
mca_btl_base_segment_t::seg_len
uint32_t seg_len
Length in bytes.
Definition: btl.h:240
ompi_btl_openib_connect_base_module_t
Struct for holding CPC module and associated meta data.
Definition: connect.h:328
mca_btl_base_endpoint_t
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
ompi_free_list_item_t
Definition: ompi_free_list.h:62
ompi_btl_openib_connect_base_module_data_t
Meta data about a CPC module.
Definition: connect.h:303
mca_btl_openib_module_t::eager_rdma_frag_size
size_t eager_rdma_frag_size
length of eager frag
Definition: btl_openib.h:459
mca_btl_openib_eager_rdma_remote_t
Definition: btl_openib_eager_rdma.h:34
mca_btl_openib_proc_t
Represents the state of a remote process and the set of addresses that it exports.
Definition: btl_openib_proc.h:61
mca_btl_openib_endpoint_pp_qp_t::cm_return
int32_t cm_return
how may credits to return
Definition: btl_openib_endpoint.h:120
mca_btl_openib_eager_rdma_remote_t::tokens
int32_t tokens
number of rdam tokens
Definition: btl_openib_eager_rdma.h:38
opal_list_t
Definition: opal_list.h:147
mca_btl_base_endpoint_t::endpoint_remote_cpc_data
ompi_btl_openib_connect_base_module_data_t * endpoint_remote_cpc_data
pointer to remote proc's CPC data (essentially its CPC modex message)
Definition: btl_openib_endpoint.h:186
mca_btl_base_endpoint_t::pending_put_frags
opal_list_t pending_put_frags
list of pending rput ops
Definition: btl_openib_endpoint.h:211
mca_btl_base_endpoint_t::nbo
bool nbo
does the endpoint require network byte ordering?
Definition: btl_openib_endpoint.h:232
mca_btl_openib_rem_qp_info_t
Definition: btl_openib_endpoint.h:73
mca_btl_base_endpoint_t::subnet_id
uint64_t subnet_id
subnet id of this endpoint
Definition: btl_openib_endpoint.h:217
mca_btl_openib_eager_rdma_local_t
Definition: btl_openib_eager_rdma.h:18
mca_btl_base_endpoint_t::eager_rdma_remote
mca_btl_openib_eager_rdma_remote_t eager_rdma_remote
info about remote RDMA buffer
Definition: btl_openib_endpoint.h:225
mca_btl_openib_endpoint_qp_t::no_wqe_pending_frags
opal_list_t no_wqe_pending_frags[2]
put fragments here if there is no wqe available
Definition: btl_openib_endpoint.h:144
mca_btl_openib_component_t::eager_limit
size_t eager_limit
Eager send limit of first fragment, in Bytes.
Definition: btl_openib.h:200
mca_btl_base_endpoint_t::endpoint_btl
struct mca_btl_openib_module_t * endpoint_btl
BTL module that created this connection.
Definition: btl_openib_endpoint.h:166
mca_btl_base_endpoint_t::pending_lazy_frags
opal_list_t pending_lazy_frags
list of pending frags due to lazy connection establishment for this endpotint
Definition: btl_openib_endpoint.h:202
mca_btl_base_endpoint_t::pending_get_frags
opal_list_t pending_get_frags
list of pending rget ops
Definition: btl_openib_endpoint.h:209
mca_btl_base_endpoint_t::endpoint_posted_recvs
bool endpoint_posted_recvs
Whether we've posted receives on this EP or not (only used in CTS protocol)
Definition: btl_openib_endpoint.h:247
mca_btl_openib_endpoint_pp_qp_t::sd_credits
int32_t sd_credits
this rank's view of the credits available for sending: this is the credits granted by the remote peer...
Definition: btl_openib_endpoint.h:111
mca_btl_openib_endpoint_qp_t::no_credits_pending_frags
opal_list_t no_credits_pending_frags[2]
put fragment here if there is no credits available
Definition: btl_openib_endpoint.h:142
mca_btl_openib_endpoint_srq_qp_t
Aggregates all srq qp info for an endpoint.
Definition: btl_openib_endpoint.h:128
mca_btl_openib_endpoint_pp_qp_t::rd_credits
int32_t rd_credits
number of credits to return to peer
Definition: btl_openib_endpoint.h:118
mca_btl_base_endpoint_t::endpoint_cts_received
bool endpoint_cts_received
Whether we've received the CTS from the peer or not (only used in CTS protocol)
Definition: btl_openib_endpoint.h:251
mca_btl_openib_proc_modex_t
Data received from the modex.
Definition: btl_openib_proc.h:44
mca_btl_base_segment_t
Describes a region/segment of memory that is addressable by an BTL.
Definition: btl.h:236
mca_btl_base_endpoint_t::endpoint_cts_sent
bool endpoint_cts_sent
Whether we've send out CTS to the peer or not (only used in CTS protocol)
Definition: btl_openib_endpoint.h:255
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
mca_btl_openib_eager_rdma_remote_t::rkey
uint32_t rkey
RKey for accessing remote buffer.
Definition: btl_openib_eager_rdma.h:36
mca_btl_base_endpoint_t::endpoint_cts_frag
mca_btl_openib_recv_frag_t endpoint_cts_frag
Frag for initial wireup CTS protocol; will be NULL if CPC indicates that it does not want to use CTS...
Definition: btl_openib_endpoint.h:241
mca_btl_openib_endpoint_pp_qp_t::cm_sent
int32_t cm_sent
Outstanding number of credit messages.
Definition: btl_openib_endpoint.h:121