1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 #ifndef __SELFTEST_RPC_H__
5 #define __SELFTEST_RPC_H__
7 #include <lnet/lnetst.h>
10 * LST wired structures
12 * XXX: *REPLY == *REQST + 1
15 SRPC_MSG_MKSN_REQST = 0,
16 SRPC_MSG_MKSN_REPLY = 1,
17 SRPC_MSG_RMSN_REQST = 2,
18 SRPC_MSG_RMSN_REPLY = 3,
19 SRPC_MSG_BATCH_REQST = 4,
20 SRPC_MSG_BATCH_REPLY = 5,
21 SRPC_MSG_STAT_REQST = 6,
22 SRPC_MSG_STAT_REPLY = 7,
23 SRPC_MSG_TEST_REQST = 8,
24 SRPC_MSG_TEST_REPLY = 9,
25 SRPC_MSG_DEBUG_REQST = 10,
26 SRPC_MSG_DEBUG_REPLY = 11,
27 SRPC_MSG_BRW_REQST = 12,
28 SRPC_MSG_BRW_REPLY = 13,
29 SRPC_MSG_PING_REQST = 14,
30 SRPC_MSG_PING_REPLY = 15,
31 SRPC_MSG_JOIN_REQST = 16,
32 SRPC_MSG_JOIN_REPLY = 17,
36 * All srpc_*_reqst_t's 1st field must be matchbits of reply buffer,
37 * and 2nd field matchbits of bulk buffer if any.
39 * All srpc_*_reply_t's 1st field must be a __u32 status, and 2nd field
40 * session id if needed.
43 __u64 rpyid; /* reply buffer matchbits */
44 __u64 bulkid; /* bulk buffer matchbits */
45 } WIRE_ATTR srpc_generic_reqst_t;
50 } WIRE_ATTR srpc_generic_reply_t;
54 __u64 mksn_rpyid; /* reply buffer matchbits */
55 lst_sid_t mksn_sid; /* session id */
56 __u32 mksn_force; /* use brute force */
57 char mksn_name[LST_NAME_SIZE];
58 } WIRE_ATTR srpc_mksn_reqst_t; /* make session request */
61 __u32 mksn_status; /* session status */
62 lst_sid_t mksn_sid; /* session id */
63 __u32 mksn_timeout; /* session timeout */
64 char mksn_name[LST_NAME_SIZE];
65 } WIRE_ATTR srpc_mksn_reply_t; /* make session reply */
68 __u64 rmsn_rpyid; /* reply buffer matchbits */
69 lst_sid_t rmsn_sid; /* session id */
70 } WIRE_ATTR srpc_rmsn_reqst_t; /* remove session request */
74 lst_sid_t rmsn_sid; /* session id */
75 } WIRE_ATTR srpc_rmsn_reply_t; /* remove session reply */
78 __u64 join_rpyid; /* reply buffer matchbits */
79 lst_sid_t join_sid; /* session id to join */
80 char join_group[LST_NAME_SIZE]; /* group name */
81 } WIRE_ATTR srpc_join_reqst_t;
84 __u32 join_status; /* returned status */
85 lst_sid_t join_sid; /* session id */
86 __u32 join_timeout; /* # seconds' inactivity to expire */
87 char join_session[LST_NAME_SIZE]; /* session name */
88 } WIRE_ATTR srpc_join_reply_t;
91 __u64 dbg_rpyid; /* reply buffer matchbits */
92 lst_sid_t dbg_sid; /* session id */
93 __u32 dbg_flags; /* bitmap of debug */
94 } WIRE_ATTR srpc_debug_reqst_t;
97 __u32 dbg_status; /* returned code */
98 lst_sid_t dbg_sid; /* session id */
99 __u32 dbg_timeout; /* session timeout */
100 __u32 dbg_nbatch; /* # of batches in the node */
101 char dbg_name[LST_NAME_SIZE]; /* session name */
102 } WIRE_ATTR srpc_debug_reply_t;
104 #define SRPC_BATCH_OPC_RUN 1
105 #define SRPC_BATCH_OPC_STOP 2
106 #define SRPC_BATCH_OPC_QUERY 3
109 __u64 bar_rpyid; /* reply buffer matchbits */
110 lst_sid_t bar_sid; /* session id */
111 lst_bid_t bar_bid; /* batch id */
112 __u32 bar_opc; /* create/start/stop batch */
113 __u32 bar_testidx; /* index of test */
114 __u32 bar_arg; /* parameters */
115 } WIRE_ATTR srpc_batch_reqst_t;
118 __u32 bar_status; /* status of request */
119 lst_sid_t bar_sid; /* session id */
120 __u32 bar_active; /* # of active tests in batch/test */
121 __u32 bar_time; /* remained time */
122 } WIRE_ATTR srpc_batch_reply_t;
125 __u64 str_rpyid; /* reply buffer matchbits */
126 lst_sid_t str_sid; /* session id */
127 __u32 str_type; /* type of stat */
128 } WIRE_ATTR srpc_stat_reqst_t;
133 sfw_counters_t str_fw;
134 srpc_counters_t str_rpc;
135 lnet_counters_t str_lnet;
136 } WIRE_ATTR srpc_stat_reply_t;
139 __u32 blk_opc; /* bulk operation code */
140 __u32 blk_npg; /* # of pages */
141 __u32 blk_flags; /* reserved flags */
142 } WIRE_ATTR test_bulk_req_t;
145 __u32 png_size; /* size of ping message */
146 __u32 png_flags; /* reserved flags */
147 } WIRE_ATTR test_ping_req_t;
150 __u64 tsr_rpyid; /* reply buffer matchbits */
151 __u64 tsr_bulkid; /* bulk buffer matchbits */
152 lst_sid_t tsr_sid; /* session id */
153 lst_bid_t tsr_bid; /* batch id */
154 __u32 tsr_service; /* test type: bulk|ping|... */
155 /* test client loop count or # server buffers needed */
157 __u32 tsr_concur; /* concurrency of test */
158 __u8 tsr_is_client; /* is test client or not */
159 __u8 tsr_stop_onerr; /* stop on error */
160 __u32 tsr_ndest; /* # of dest nodes */
163 test_bulk_req_t bulk;
164 test_ping_req_t ping;
166 } WIRE_ATTR srpc_test_reqst_t;
169 __u32 tsr_status; /* returned code */
171 } WIRE_ATTR srpc_test_reply_t;
180 } WIRE_ATTR srpc_ping_reqst_t;
186 } WIRE_ATTR srpc_ping_reply_t;
189 __u64 brw_rpyid; /* reply buffer matchbits */
190 __u64 brw_bulkid; /* bulk buffer matchbits */
191 __u32 brw_rw; /* read or write */
192 __u32 brw_len; /* bulk data len */
193 __u32 brw_flags; /* bulk data patterns */
194 } WIRE_ATTR srpc_brw_reqst_t; /* bulk r/w request */
198 } WIRE_ATTR srpc_brw_reply_t; /* bulk r/w reply */
200 #define SRPC_MSG_MAGIC 0xeeb0f00d
201 #define SRPC_MSG_VERSION 1
203 __u32 msg_magic; /* magic */
204 __u32 msg_version; /* # version */
205 __u32 msg_type; /* what's in msg_body? srpc_msg_type_t */
206 __u32 msg_reserved0; /* reserved seats */
210 srpc_generic_reqst_t reqst;
211 srpc_generic_reply_t reply;
213 srpc_mksn_reqst_t mksn_reqst;
214 srpc_mksn_reply_t mksn_reply;
215 srpc_rmsn_reqst_t rmsn_reqst;
216 srpc_rmsn_reply_t rmsn_reply;
217 srpc_debug_reqst_t dbg_reqst;
218 srpc_debug_reply_t dbg_reply;
219 srpc_batch_reqst_t bat_reqst;
220 srpc_batch_reply_t bat_reply;
221 srpc_stat_reqst_t stat_reqst;
222 srpc_stat_reply_t stat_reply;
223 srpc_test_reqst_t tes_reqst;
224 srpc_test_reply_t tes_reply;
225 srpc_join_reqst_t join_reqst;
226 srpc_join_reply_t join_reply;
228 srpc_ping_reqst_t ping_reqst;
229 srpc_ping_reply_t ping_reply;
230 srpc_brw_reqst_t brw_reqst;
231 srpc_brw_reply_t brw_reply;
233 } WIRE_ATTR srpc_msg_t;
235 #endif /* __SELFTEST_RPC_H__ */