#include "selftest.h"
-struct lst_sid LST_INVALID_SID = {LNET_NID_ANY, -1};
+struct lst_sid LST_INVALID_SID = { .ses_nid = LNET_NID_ANY, .ses_stamp = -1};
static int session_timeout = 100;
module_param(session_timeout, int, 0444);
sfw_session_t *sn = sfw_data.fw_session;
struct sfw_counters *cnt = &reply->str_fw;
sfw_batch_t *bat;
- struct timeval tv;
reply->str_sid = (sn == NULL) ? LST_INVALID_SID : sn->sn_id;
/* send over the msecs since the session was started
- with 32 bits to send, this is ~49 days */
- cfs_duration_usec(cfs_time_sub(cfs_time_current(),
- sn->sn_started), &tv);
-
- cnt->running_ms = (__u32)(tv.tv_sec * 1000 + tv.tv_usec / 1000);
+ cnt->running_ms = jiffies_to_msecs(jiffies - sn->sn_started);
cnt->brw_errors = atomic_read(&sn->sn_brw_errors);
cnt->ping_errors = atomic_read(&sn->sn_ping_errors);
cnt->zombie_sessions = atomic_read(&sfw_data.fw_nzombies);
}
int
-sfw_create_test_rpc(sfw_test_unit_t *tsu, lnet_process_id_t peer,
+sfw_create_test_rpc(sfw_test_unit_t *tsu, struct lnet_process_id peer,
unsigned features, int nblk, int blklen,
srpc_client_rpc_t **rpcpp)
{
wi = &tsu->tsu_worker;
swi_init_workitem(wi, tsu, sfw_run_test,
lst_sched_test[\
- lnet_cpt_of_nid(tsu->tsu_dest.nid)]);
+ lnet_cpt_of_nid(tsu->tsu_dest.nid,
+ NULL)]);
swi_schedule_workitem(wi);
}
}
}
srpc_client_rpc_t *
-sfw_create_rpc(lnet_process_id_t peer, int service,
+sfw_create_rpc(struct lnet_process_id peer, int service,
unsigned features, int nbulkiov, int bulklen,
void (*done)(srpc_client_rpc_t *), void *priv)
{