-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.h
63 lines (51 loc) · 1.72 KB
/
config.h
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
//License: Apache License 2.0
//See LICENSE for details
//Authors (in alphabet order of last name):
// - Qijiang Fan <[email protected]>
// - Bin He <[email protected]>
// - Cheng Zhang <[email protected]>
// - Shiwei Zhou <[email protected]>
#include <infiniband/verbs.h>
struct f_linkedlist{
char f_name[256];
long int f_size;
int f_mode;
struct f_linkedlist *next;
};
struct added_config_t {
int windowsize;
const char *p_filename;
const char *p_dir;
const char *p_listname;
int reserve_flag;
int cover_flag;
int verbose_flag;
};
struct config_t {
const char *dev_name; /* IB device name */
char *server_name; /* daemon host name */
int tcp_port; /* daemon TCP port */
int ib_port; /* local IB port to work with */
};
struct cm_con_data_t {
uint64_t addr; /* Buffer address */
uint32_t rkey; /* Remote key */
uint32_t qp_num; /* QP number */
uint16_t lid; /* LID of the IB port */
} __attribute__ ((packed));
/* structure of needed test resources */
/*void ReadFile(struct f_linkedlist * list, long bufSize, void *memory1, void *memory2);
void WriteFile(void *memory1, void *memory2, int bufSize); */
struct resources {
struct ibv_device_attr device_attr; /* Device attributes */
struct ibv_port_attr port_attr; /* IB port attributes */
struct cm_con_data_t remote_props; /* values to connect to remote side */
struct ibv_device **dev_list; /* device list */
struct ibv_context *ib_ctx; /* device handle */
struct ibv_pd *pd; /* PD handle */
struct ibv_cq *cq; /* CQ handle */
struct ibv_qp *qp; /* QP handle */
struct ibv_mr *mr; /* MR handle */
char *buf; /* memory buffer pointer */
int sock; /* TCP socket file descriptor */
};