1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef OMPI_MTL_OFI_REQUEST_H
14 #define OMPI_MTL_OFI_REQUEST_H
15
16 #include "mtl_ofi.h"
17
18 #define TO_OFI_REQ(_ptr_ctx) \
19 container_of((_ptr_ctx), struct ompi_mtl_ofi_request_t, ctx)
20
21 typedef enum {
22 OMPI_MTL_OFI_SEND,
23 OMPI_MTL_OFI_RECV,
24 OMPI_MTL_OFI_ACK,
25 OMPI_MTL_OFI_PROBE
26 } ompi_mtl_ofi_request_type_t;
27
28 struct ompi_mtl_ofi_request_t;
29
30 struct ompi_mtl_ofi_request_t {
31 struct mca_mtl_request_t super;
32
33
34 ompi_mtl_ofi_request_type_t type;
35
36
37 struct fi_context ctx;
38
39
40 volatile int completion_count;
41
42
43 int (*event_callback)(struct fi_cq_tagged_entry *wc,
44 struct ompi_mtl_ofi_request_t*);
45
46
47 int (*error_callback)(struct fi_cq_err_entry *error,
48 struct ompi_mtl_ofi_request_t*);
49
50
51 struct ompi_status_public_t status;
52
53
54 int match_state;
55
56
57
58 struct ompi_communicator_t *comm;
59
60
61
62 struct mca_mtl_base_module_t* mtl;
63
64
65 void *buffer;
66
67
68 size_t length;
69
70
71 struct opal_convertor_t *convertor;
72
73
74 volatile bool req_started;
75
76
77 uint64_t match_bits;
78
79
80 uint64_t mask_bits;
81
82
83 fi_addr_t remote_addr;
84
85
86 struct ompi_mtl_ofi_request_t *parent;
87
88
89 struct mca_mtl_request_t *mrecv_req;
90 };
91 typedef struct ompi_mtl_ofi_request_t ompi_mtl_ofi_request_t;
92
93 #endif