File: base.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 (105 lines) | stat: -rw-r--r-- 2,525 bytes parent folder | download | duplicates (4)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
 * Copyright (c) 2007-2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright (c) 2013      Mellanox Technologies, Inc.
 *                         All rights reserved.
 *
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#ifndef BTL_OPENIB_CONNECT_BASE_H
#define BTL_OPENIB_CONNECT_BASE_H

#include "opal/mca/btl/openib/connect/connect.h"

#ifdef OPAL_HAVE_RDMAOE
#define BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)                       \
        (((IBV_TRANSPORT_IB != ((btl)->device->ib_dev->transport_type)) || \
        (IBV_LINK_LAYER_ETHERNET == ((btl)->ib_port_attr.link_layer))) ?   \
        true : false)
#else
#define BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)                       \
        ((IBV_TRANSPORT_IB != ((btl)->device->ib_dev->transport_type)) ?   \
        true : false)
#endif

BEGIN_C_DECLS

/*
 * Forward declaration to resolve circular dependency
 */
struct mca_btl_base_endpoint_t;

/*
 * Open function
 */
int opal_btl_openib_connect_base_register(void);

/*
 * Component-wide CPC init
 */
int opal_btl_openib_connect_base_init(void);

/*
 * Query CPCs to see if they want to run on a specific module
 */
int opal_btl_openib_connect_base_select_for_local_port
    (mca_btl_openib_module_t *btl);

/*
 * Forward reference to avoid an include file loop
 */
struct mca_btl_openib_proc_modex_t;

/*
 * Select function
 */
int opal_btl_openib_connect_base_find_match
    (mca_btl_openib_module_t *btl,
     struct mca_btl_openib_proc_modex_t *peer_port,
     opal_btl_openib_connect_base_module_t **local_cpc,
     opal_btl_openib_connect_base_module_data_t **remote_cpc_data);

/*
 * Find a CPC's index so that we can send it in the modex
 */
int opal_btl_openib_connect_base_get_cpc_index
    (opal_btl_openib_connect_base_component_t *cpc);

/*
 * Lookup a CPC by its index (received from the modex)
 */
opal_btl_openib_connect_base_component_t *
    opal_btl_openib_connect_base_get_cpc_byindex(uint8_t index);

/*
 * Allocate a CTS frag
 */
int opal_btl_openib_connect_base_alloc_cts(
        struct mca_btl_base_endpoint_t *endpoint);

/*
 * Free a CTS frag
 */
int opal_btl_openib_connect_base_free_cts(
        struct mca_btl_base_endpoint_t *endpoint);

/*
 * Start a new connection to an endpoint
 */
int opal_btl_openib_connect_base_start(
        opal_btl_openib_connect_base_module_t *cpc,
        struct mca_btl_base_endpoint_t *endpoint);


/*
 * Component-wide CPC finalize
 */
void opal_btl_openib_connect_base_finalize(void);

END_C_DECLS

#endif