MODULE_PARM_DESC(brw_inject_errors, "# data errors to inject randomly, zero by default");
static void
-brw_client_fini(sfw_test_instance_t *tsi)
+brw_client_fini(struct sfw_test_instance *tsi)
{
struct srpc_bulk *bulk;
sfw_test_unit_t *tsu;
}
static int
-brw_client_init(sfw_test_instance_t *tsi)
+brw_client_init(struct sfw_test_instance *tsi)
{
struct sfw_session *sn = tsi->tsi_batch->bat_session;
int flags;
lnet_process_id_t dest, struct srpc_client_rpc **rpcpp)
{
struct srpc_bulk *bulk = tsu->tsu_private;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct sfw_session *sn = tsi->tsi_batch->bat_session;
struct srpc_client_rpc *rpc;
srpc_brw_reqst_t *req;
brw_client_done_rpc(sfw_test_unit_t *tsu, struct srpc_client_rpc *rpc)
{
__u64 magic = BRW_MAGIC;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct sfw_session *sn = tsi->tsi_batch->bat_session;
srpc_msg_t *msg = &rpc->crpc_replymsg;
srpc_brw_reply_t *reply = &msg->msg_body.brw_reply;
sfw_test_rpc_fini(struct srpc_client_rpc *rpc)
{
sfw_test_unit_t *tsu = rpc->crpc_priv;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
/* Called with hold of tsi->tsi_lock */
LASSERT(list_empty(&rpc->crpc_list));
}
static inline int
-sfw_test_buffers(sfw_test_instance_t *tsi)
+sfw_test_buffers(struct sfw_test_instance *tsi)
{
struct sfw_test_case *tsc;
struct srpc_service *svc;
}
static void
-sfw_destroy_test_instance(sfw_test_instance_t *tsi)
+sfw_destroy_test_instance(struct sfw_test_instance *tsi)
{
struct srpc_client_rpc *rpc;
sfw_test_unit_t *tsu;
static void
sfw_destroy_batch(struct sfw_batch *tsb)
{
- sfw_test_instance_t *tsi;
+ struct sfw_test_instance *tsi;
LASSERT(!sfw_batch_active(tsb));
LASSERT(list_empty(&tsb->bat_list));
while (!list_empty(&tsb->bat_tests)) {
tsi = list_entry(tsb->bat_tests.next,
- sfw_test_instance_t, tsi_list);
+ struct sfw_test_instance, tsi_list);
list_del_init(&tsi->tsi_list);
sfw_destroy_test_instance(tsi);
}
struct srpc_bulk *bk = rpc->srpc_bulk;
int ndest = req->tsr_ndest;
sfw_test_unit_t *tsu;
- sfw_test_instance_t *tsi;
+ struct sfw_test_instance *tsi;
int i;
int rc;
static void
sfw_test_unit_done(sfw_test_unit_t *tsu)
{
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct sfw_batch *tsb = tsi->tsi_batch;
struct sfw_session *sn = tsb->bat_session;
sfw_test_rpc_done(struct srpc_client_rpc *rpc)
{
sfw_test_unit_t *tsu = rpc->crpc_priv;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
int done = 0;
tsi->tsi_ops->tso_done_rpc(tsu, rpc);
struct srpc_client_rpc **rpcpp)
{
struct srpc_client_rpc *rpc = NULL;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
spin_lock(&tsi->tsi_lock);
sfw_run_test(struct swi_workitem *wi)
{
sfw_test_unit_t *tsu = wi->swi_workitem.wi_data;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct srpc_client_rpc *rpc = NULL;
LASSERT(wi == &tsu->tsu_worker);
{
struct swi_workitem *wi;
sfw_test_unit_t *tsu;
- sfw_test_instance_t *tsi;
+ struct sfw_test_instance *tsi;
if (sfw_batch_active(tsb)) {
CDEBUG(D_NET, "Batch already active: %llu (%d)\n",
int
sfw_stop_batch(struct sfw_batch *tsb, int force)
{
- sfw_test_instance_t *tsi;
+ struct sfw_test_instance *tsi;
struct srpc_client_rpc *rpc;
if (!sfw_batch_active(tsb)) {
static int
sfw_query_batch(struct sfw_batch *tsb, int testidx, srpc_batch_reply_t *reply)
{
- sfw_test_instance_t *tsi;
+ struct sfw_test_instance *tsi;
if (testidx < 0)
return -EINVAL;
static struct lst_ping_data lst_ping_data;
static int
-ping_client_init(sfw_test_instance_t *tsi)
+ping_client_init(struct sfw_test_instance *tsi)
{
struct sfw_session *sn = tsi->tsi_batch->bat_session;
}
static void
-ping_client_fini(sfw_test_instance_t *tsi)
+ping_client_fini(struct sfw_test_instance *tsi)
{
struct sfw_session *sn = tsi->tsi_batch->bat_session;
int errors;
struct srpc_client_rpc **rpc)
{
srpc_ping_reqst_t *req;
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct sfw_session *sn = tsi->tsi_batch->bat_session;
struct timespec64 ts;
int rc;
static void
ping_client_done_rpc(sfw_test_unit_t *tsu, struct srpc_client_rpc *rpc)
{
- sfw_test_instance_t *tsi = tsu->tsu_instance;
+ struct sfw_test_instance *tsi = tsu->tsu_instance;
struct sfw_session *sn = tsi->tsi_batch->bat_session;
srpc_ping_reqst_t *reqst = &rpc->crpc_reqstmsg.msg_body.ping_reqst;
srpc_ping_reply_t *reply = &rpc->crpc_replymsg.msg_body.ping_reply;
struct srpc_client_rpc *rpc); /* done a test rpc */
};
-typedef struct sfw_test_instance {
+struct sfw_test_instance {
struct list_head tsi_list; /* chain on batch */
int tsi_service; /* test type */
struct sfw_batch *tsi_batch; /* batch */
test_bulk_req_t bulk_v0; /* bulk parameter */
test_bulk_req_v1_t bulk_v1; /* bulk v1 parameter */
} tsi_u;
-} sfw_test_instance_t;
+};
/* XXX: trailing (PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at the end of
* pages are not used */
struct list_head tsu_list; /* chain on lst_test_instance */
lnet_process_id_t tsu_dest; /* id of dest node */
int tsu_loop; /* loop count of the test */
- sfw_test_instance_t *tsu_instance; /* pointer to test instance */
+ struct sfw_test_instance *tsu_instance; /* pointer to test instance */
void *tsu_private; /* private data */
struct swi_workitem tsu_worker; /* workitem of the test unit */
} sfw_test_unit_t;