52
52
53
53
typedef struct lstcon_node {
54
54
lnet_process_id_t nd_id ; /* id of the node */
55
- int nd_ref ; /* reference count */
56
- int nd_state ; /* state of the node */
57
- int nd_timeout ; /* session timeout */
58
- unsigned long nd_stamp ; /* timestamp of last replied RPC */
55
+ int nd_ref ; /* reference count */
56
+ int nd_state ; /* state of the node */
57
+ int nd_timeout ; /* session timeout */
58
+ unsigned long nd_stamp ; /* timestamp of last replied RPC */
59
59
struct lstcon_rpc nd_ping ; /* ping rpc */
60
60
} lstcon_node_t ; /* node descriptor */
61
61
62
62
typedef struct {
63
63
struct list_head ndl_link ; /* chain on list */
64
64
struct list_head ndl_hlink ; /* chain on hash */
65
- lstcon_node_t * ndl_node ; /* pointer to node */
65
+ lstcon_node_t * ndl_node ; /* pointer to node */
66
66
} lstcon_ndlink_t ; /* node link descriptor */
67
67
68
68
typedef struct {
69
- struct list_head grp_link ; /* chain on global group list
69
+ struct list_head grp_link ; /* chain on global group list
70
70
*/
71
- int grp_ref ; /* reference count */
72
- int grp_userland ; /* has userland nodes */
73
- int grp_nnode ; /* # of nodes */
74
- char grp_name [LST_NAME_SIZE ]; /* group name */
75
-
76
- struct list_head grp_trans_list ; /* transaction list */
77
- struct list_head grp_ndl_list ; /* nodes list */
78
- struct list_head grp_ndl_hash [0 ]; /* hash table for nodes */
71
+ int grp_ref ; /* reference count */
72
+ int grp_userland ; /* has userland nodes */
73
+ int grp_nnode ; /* # of nodes */
74
+ char grp_name [LST_NAME_SIZE ]; /* group name */
75
+
76
+ struct list_head grp_trans_list ; /* transaction list */
77
+ struct list_head grp_ndl_list ; /* nodes list */
78
+ struct list_head grp_ndl_hash [0 ]; /* hash table for nodes */
79
79
} lstcon_group_t ; /* (alias of nodes) group descriptor */
80
80
81
- #define LST_BATCH_IDLE 0xB0 /* idle batch */
81
+ #define LST_BATCH_IDLE 0xB0 /* idle batch */
82
82
#define LST_BATCH_RUNNING 0xB1 /* running batch */
83
83
84
84
typedef struct lstcon_tsb_hdr {
85
- lst_bid_t tsb_id ; /* batch ID */
86
- int tsb_index ; /* test index */
85
+ lst_bid_t tsb_id ; /* batch ID */
86
+ int tsb_index ; /* test index */
87
87
} lstcon_tsb_hdr_t ;
88
88
89
89
typedef struct {
90
- lstcon_tsb_hdr_t bat_hdr ; /* test_batch header */
91
- struct list_head bat_link ; /* chain on session's batches list */
92
- int bat_ntest ; /* # of test */
93
- int bat_state ; /* state of the batch */
94
- int bat_arg ; /* parameter for run|stop, timeout
90
+ lstcon_tsb_hdr_t bat_hdr ; /* test_batch header */
91
+ struct list_head bat_link ; /* chain on session's batches list */
92
+ int bat_ntest ; /* # of test */
93
+ int bat_state ; /* state of the batch */
94
+ int bat_arg ; /* parameter for run|stop, timeout
95
95
* for run, force for stop */
96
- char bat_name [LST_NAME_SIZE ];/* name of batch */
96
+ char bat_name [LST_NAME_SIZE ];/* name of batch */
97
97
98
98
struct list_head bat_test_list ; /* list head of tests (lstcon_test_t)
99
99
*/
100
100
struct list_head bat_trans_list ; /* list head of transaction */
101
- struct list_head bat_cli_list ; /* list head of client nodes
101
+ struct list_head bat_cli_list ; /* list head of client nodes
102
102
* (lstcon_node_t) */
103
103
struct list_head * bat_cli_hash ; /* hash table of client nodes */
104
- struct list_head bat_srv_list ; /* list head of server nodes */
104
+ struct list_head bat_srv_list ; /* list head of server nodes */
105
105
struct list_head * bat_srv_hash ; /* hash table of server nodes */
106
106
} lstcon_batch_t ; /* (tests ) batch descriptor */
107
107
108
108
typedef struct lstcon_test {
109
- lstcon_tsb_hdr_t tes_hdr ; /* test batch header */
110
- struct list_head tes_link ; /* chain on batch's tests list */
111
- lstcon_batch_t * tes_batch ; /* pointer to batch */
112
-
113
- int tes_type ; /* type of the test, i.e: bulk, ping */
114
- int tes_stop_onerr ; /* stop on error */
115
- int tes_oneside ; /* one-sided test */
116
- int tes_concur ; /* concurrency */
117
- int tes_loop ; /* loop count */
118
- int tes_dist ; /* nodes distribution of target group */
119
- int tes_span ; /* nodes span of target group */
120
- int tes_cliidx ; /* client index, used for RPC creating */
109
+ lstcon_tsb_hdr_t tes_hdr ; /* test batch header */
110
+ struct list_head tes_link ; /* chain on batch's tests list */
111
+ lstcon_batch_t * tes_batch ; /* pointer to batch */
112
+
113
+ int tes_type ; /* type of the test, i.e: bulk, ping */
114
+ int tes_stop_onerr ; /* stop on error */
115
+ int tes_oneside ; /* one-sided test */
116
+ int tes_concur ; /* concurrency */
117
+ int tes_loop ; /* loop count */
118
+ int tes_dist ; /* nodes distribution of target group */
119
+ int tes_span ; /* nodes span of target group */
120
+ int tes_cliidx ; /* client index, used for RPC creating */
121
121
122
122
struct list_head tes_trans_list ; /* transaction list */
123
- lstcon_group_t * tes_src_grp ; /* group run the test */
124
- lstcon_group_t * tes_dst_grp ; /* target group */
123
+ lstcon_group_t * tes_src_grp ; /* group run the test */
124
+ lstcon_group_t * tes_dst_grp ; /* target group */
125
125
126
- int tes_paramlen ; /* test parameter length */
127
- char tes_param [0 ]; /* test parameter */
126
+ int tes_paramlen ; /* test parameter length */
127
+ char tes_param [0 ]; /* test parameter */
128
128
} lstcon_test_t ; /* a single test descriptor */
129
129
130
130
#define LST_GLOBAL_HASHSIZE 503 /* global nodes hash table size */
@@ -136,24 +136,24 @@ typedef struct lstcon_test {
136
136
#define LST_CONSOLE_TIMEOUT 300 /* default console timeout */
137
137
138
138
struct lstcon_session {
139
- struct mutex ses_mutex ; /* only 1 thread in session */
140
- lst_sid_t ses_id ; /* global session id */
141
- int ses_key ; /* local session key */
142
- int ses_state ; /* state of session */
143
- int ses_timeout ; /* timeout in seconds */
144
- time64_t ses_laststamp ; /* last operation stamp (seconds)
139
+ struct mutex ses_mutex ; /* only 1 thread in session */
140
+ lst_sid_t ses_id ; /* global session id */
141
+ int ses_key ; /* local session key */
142
+ int ses_state ; /* state of session */
143
+ int ses_timeout ; /* timeout in seconds */
144
+ time64_t ses_laststamp ; /* last operation stamp (seconds)
145
145
*/
146
- unsigned ses_features ; /* tests features of the session
146
+ unsigned ses_features ; /* tests features of the session
147
147
*/
148
- unsigned ses_feats_updated :1 ; /* features are synced with
148
+ unsigned ses_feats_updated :1 ; /* features are synced with
149
149
* remote test nodes */
150
- unsigned ses_force :1 ; /* force creating */
151
- unsigned ses_shutdown :1 ; /* session is shutting down */
152
- unsigned ses_expired :1 ; /* console is timedout */
153
- __u64 ses_id_cookie ; /* batch id cookie */
154
- char ses_name [LST_NAME_SIZE ];/* session name */
155
- lstcon_rpc_trans_t * ses_ping ; /* session pinger */
156
- struct stt_timer ses_ping_timer ; /* timer for pinger */
150
+ unsigned ses_force :1 ; /* force creating */
151
+ unsigned ses_shutdown :1 ; /* session is shutting down */
152
+ unsigned ses_expired :1 ; /* console is timedout */
153
+ __u64 ses_id_cookie ; /* batch id cookie */
154
+ char ses_name [LST_NAME_SIZE ];/* session name */
155
+ lstcon_rpc_trans_t * ses_ping ; /* session pinger */
156
+ struct stt_timer ses_ping_timer ; /* timer for pinger */
157
157
lstcon_trans_stat_t ses_trans_stat ; /* transaction stats */
158
158
159
159
struct list_head ses_trans_list ; /* global list of transaction */
@@ -162,8 +162,8 @@ struct lstcon_session {
162
162
struct list_head ses_ndl_list ; /* global list of nodes */
163
163
struct list_head * ses_ndl_hash ; /* hash table of nodes */
164
164
165
- spinlock_t ses_rpc_lock ; /* serialize */
166
- atomic_t ses_rpc_counter ; /* # of initialized RPCs */
165
+ spinlock_t ses_rpc_lock ; /* serialize */
166
+ atomic_t ses_rpc_counter ; /* # of initialized RPCs */
167
167
struct list_head ses_rpc_freelist ; /* idle console rpc */
168
168
}; /* session descriptor */
169
169
0 commit comments