File: btl_openib_xrc.h

package info (click to toggle)
openmpi 3.1.3-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 118,572 kB
  • sloc: ansic: 628,972; f90: 17,993; makefile: 13,761; sh: 7,051; java: 6,360; perl: 3,215; cpp: 2,225; python: 1,350; lex: 988; fortran: 52; tcl: 12
file content (58 lines) | stat: -rw-r--r-- 2,201 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2007-2008 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2014      Research Organization for Information Science
 *                         and Technology (RIST). All rights reserved.
 * Copyright (c) 2014      Bull SAS.  All rights reserved.
 * Copyright (c) 2015      Research Organization for Information Science
 *                         and Technology (RIST). All rights reserved.
 * Copyright (c) 2016      Los Alamos National Security, LLC. All rights
 *                         reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 *
 * @file
 */

#ifndef MCA_BTL_OPENIB_XRC_H
#define MCA_BTL_OPENIB_XRC_H
#include "btl_openib.h"
#include "btl_openib_endpoint.h"

#if HAVE_XRC
#define MCA_BTL_XRC_ENABLED (mca_btl_openib_component.num_xrc_qps)
#else
#define MCA_BTL_XRC_ENABLED 0
#endif

typedef enum {
    MCA_BTL_IB_ADDR_CONNECTING = 100,
    MCA_BTL_IB_ADDR_CONNECTED,
    MCA_BTL_IB_ADDR_CLOSED
} mca_btl_openib_ib_addr_state_t;

struct ib_address_t {
    opal_list_item_t super;
    void *key;                             /* the key with size 80bit - [subnet(64) LID(16bit)] */
    uint64_t subnet_id;                    /* caching subnet_id  */
    uint16_t lid;                          /* caching lid */
    opal_list_t pending_ep;                /* list of endpoints that use this ib_address */
    mca_btl_openib_qp_t *qp;               /* pointer to qp that will be used
                                              for communication with the
                                              destination */
    uint32_t remote_xrc_rcv_qp_num;        /* remote xrc qp number */
    opal_mutex_t addr_lock;                /* protection */
    mca_btl_openib_ib_addr_state_t status; /* ib port status */
    int32_t max_wqe;
};
typedef struct ib_address_t ib_address_t;

int mca_btl_openib_open_xrc_domain(struct mca_btl_openib_device_t *device);
int mca_btl_openib_close_xrc_domain(struct mca_btl_openib_device_t *device);
int mca_btl_openib_ib_address_add_new (uint16_t lid, uint64_t s_id,
        opal_jobid_t ep_jobid, mca_btl_openib_endpoint_t *ep);

#endif