OpenMPI  0.1.1
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 
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 
74  uint32_t rem_qp_num;
75  /* Remote QP number */
76  uint32_t rem_psn;
77  /* Remote processes port sequence number */
79 
81  /* Remote SRQ number */
82  uint32_t rem_srq_num;
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 */
96  /* Remote xrc_srq info, used only with XRC connections */
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;
105 
106 
107 /**
108  * Agggregates all per peer qp info for an endpoint
109  */
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 */
123 
124 
125 /**
126  * Aggregates all srq qp info for an endpoint
127  */
129  int32_t dummy;
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;
139 
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 */
148  size_t ib_inline_max; /**< max size of inline send*/
149  union {
152  } u;
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 
163  opal_list_item_t super;
164 
165  /** BTL module that created this connection */
167 
168  /** proc structure corresponding to endpoint */
170 
171  /** local CPC to connect to this endpoint */
173 
174  /** hook for local CPC to hang endpoint-specific 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. */
183 
184  /** pointer to remote proc's CPC data (essentially its CPC modex
185  message) */
187 
188  /** current state of the connection */
189  mca_btl_openib_endpoint_state_t endpoint_state;
190 
191  /** number of connection retries attempted */
193 
194  /** timestamp of when the first connection was attempted */
196 
197  /** lock for concurrent access to endpoint state */
199 
200  /** list of pending frags due to lazy connection establishment
201  for this endpotint */
203 
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 */
210  /** list of pending rput ops */
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 */
221 
222  /** number of eager received */
224  /** info about remote RDMA buffer */
226  /** info about local RDMA buffer */
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? */
235 
236  /** information about the remote port */
238 
239  /** Frag for initial wireup CTS protocol; will be NULL if CPC
240  indicates that it does not want to use CTS */
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) */
248 
249  /** Whether we've received the CTS from the peer or not (only used
250  in CTS protocol) */
252 
253  /** Whether we've send out CTS to the peer or not (only used in
254  CTS protocol) */
256 };
257 
260 
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*,
275 int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_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*,
286  struct mca_btl_openib_proc_modex_t *remote_proc_info,
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;
377  ret = mca_btl_openib_endpoint_post_rr_nolock(ep, qp);
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:
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  */
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) {
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;
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
#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_openib_eager_rdma_local_t eager_rdma_local
info about local RDMA buffer
Definition: btl_openib_endpoint.h:227
#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
Agggregates all per peer qp info for an endpoint.
Definition: btl_openib_endpoint.h:110
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
OPAL output stream facility.
int32_t head
RDMA buffer to post to.
Definition: btl_openib_eager_rdma.h:37
ompi_free_list_t recv_free
free lists of receive buffer descriptors
Definition: btl_openib.h:341
Definition: btl_openib_frag.h:322
int32_t credits
number of RDMA credits
Definition: btl_openib_eager_rdma.h:24
int32_t index
index of the endpoint in endpoints array
Definition: btl_openib_endpoint.h:229
int32_t eager_recv_count
number of eager received
Definition: btl_openib_endpoint.h:223
int32_t sd_wqe
number of available send wqe entries
Definition: btl_openib_endpoint.h:135
OPAL_DECLSPEC void opal_progress_event_users_increment(void)
Increase the number of users of the event library.
Definition: opal_progress.c:245
Definition: btl_openib_endpoint.h:132
Definition: btl_openib_frag.h:334
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
int32_t rd_credit_send_lock
Lock credit send fragment.
Definition: btl_openib_endpoint.h:146
Definition: btl_openib_endpoint.h:85
struct mca_btl_openib_proc_t * endpoint_proc
proc structure corresponding to endpoint
Definition: btl_openib_endpoint.h:169
Definition: btl_openib_xrc.h:29
int32_t get_tokens
number of available get tokens
Definition: btl_openib_endpoint.h:214
Definition: mutex_unix.h:53
ompi_btl_openib_connect_base_module_start_connect_fn_t cbm_start_connect
Connect function.
Definition: connect.h:336
struct ibv_mr * endpoint_cts_mr
Memory registration info for the CTS frag.
Definition: btl_openib_endpoint.h:243
Definition: btl_openib_endpoint.h:140
IB BTL Interface.
Definition: btl_openib.h:432
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
mca_btl_openib_endpoint_state_t endpoint_state
current state of the connection
Definition: btl_openib_endpoint.h:189
int32_t cm_received
Credit messages received.
Definition: btl_openib_endpoint.h:119
size_t endpoint_retries
number of connection retries attempted
Definition: btl_openib_endpoint.h:192
Definition: opal_list.h:98
#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
opal_mutex_t endpoint_lock
lock for concurrent access to endpoint state
Definition: btl_openib_endpoint.h:198
struct mca_btl_elan_module_t * endpoint_btl
BTL instance that created this connection.
Definition: btl_elan_endpoint.h:36
#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
size_t ib_inline_max
max size of inline send
Definition: btl_openib_endpoint.h:148
mca_btl_openib_rem_info_t rem_info
information about the remote port
Definition: btl_openib_endpoint.h:237
int32_t rd_posted
number of descriptors posted to the nic
Definition: btl_openib_endpoint.h:117
ompi_ptr_t base
address of remote buffer
Definition: btl_openib_eager_rdma.h:35
bool use_eager_rdma
use eager rdma for this peer?
Definition: btl_openib_endpoint.h:234
ompi_btl_openib_connect_base_module_t * endpoint_local_cpc
local CPC to connect to this endpoint
Definition: btl_openib_endpoint.h:172
double endpoint_tstamp
timestamp of when the first connection was attempted
Definition: btl_openib_endpoint.h:195
void * endpoint_local_cpc_data
hook for local CPC to hang endpoint-specific data
Definition: btl_openib_endpoint.h:175
#define opal_list_append(l, i)
Append an item to the end of the list.
Definition: opal_list.h:410
Definition: btl_openib_endpoint.h:80
Definition: btl_openib_frag.h:37
IB fragment derived type.
Definition: btl_openib_frag.h:288
Byte Transfer Layer (BTL)
struct ib_address_t * ib_addr
used only for xrc; pointer to struct that keeps remote port info
Definition: btl_openib_endpoint.h:220
uint32_t seg_len
Length in bytes.
Definition: btl.h:240
Struct for holding CPC module and associated meta data.
Definition: connect.h:328
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
Definition: ompi_free_list.h:62
Meta data about a CPC module.
Definition: connect.h:303
size_t eager_rdma_frag_size
length of eager frag
Definition: btl_openib.h:459
Definition: btl_openib_eager_rdma.h:34
Represents the state of a remote process and the set of addresses that it exports.
Definition: btl_openib_proc.h:61
int32_t cm_return
how may credits to return
Definition: btl_openib_endpoint.h:120
int32_t tokens
number of rdam tokens
Definition: btl_openib_eager_rdma.h:38
Definition: opal_list.h:147
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
opal_list_t pending_put_frags
list of pending rput ops
Definition: btl_openib_endpoint.h:211
bool nbo
does the endpoint require network byte ordering?
Definition: btl_openib_endpoint.h:232
Definition: btl_openib_endpoint.h:73
uint64_t subnet_id
subnet id of this endpoint
Definition: btl_openib_endpoint.h:217
Definition: btl_openib_eager_rdma.h:18
mca_btl_openib_eager_rdma_remote_t eager_rdma_remote
info about remote RDMA buffer
Definition: btl_openib_endpoint.h:225
opal_list_t no_wqe_pending_frags[2]
put fragments here if there is no wqe available
Definition: btl_openib_endpoint.h:144
size_t eager_limit
Eager send limit of first fragment, in Bytes.
Definition: btl_openib.h:200
struct mca_btl_openib_module_t * endpoint_btl
BTL module that created this connection.
Definition: btl_openib_endpoint.h:166
opal_list_t pending_lazy_frags
list of pending frags due to lazy connection establishment for this endpotint
Definition: btl_openib_endpoint.h:202
opal_list_t pending_get_frags
list of pending rget ops
Definition: btl_openib_endpoint.h:209
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
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
opal_list_t no_credits_pending_frags[2]
put fragment here if there is no credits available
Definition: btl_openib_endpoint.h:142
Aggregates all srq qp info for an endpoint.
Definition: btl_openib_endpoint.h:128
int32_t rd_credits
number of credits to return to peer
Definition: btl_openib_endpoint.h:118
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
Data received from the modex.
Definition: btl_openib_proc.h:44
Describes a region/segment of memory that is addressable by an BTL.
Definition: btl.h:236
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
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
uint32_t rkey
RKey for accessing remote buffer.
Definition: btl_openib_eager_rdma.h:36
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
int32_t cm_sent
Outstanding number of credit messages.
Definition: btl_openib_endpoint.h:121