/*
* Copyright (C) 2012 Cray, Inc.
*
- * Copyright (c) 2013, 2015, Intel Corporation.
+ * Copyright (c) 2013, 2017, Intel Corporation.
*
* Author: Nic Henke <nic@cray.com>
* Author: James Shimek <jshimek@cray.com>
conn->gnc_next_tx = (int) GNILND_MAX_MSG_ID - 10;
/* if this fails, we have conflicts and MAX_TX is too large */
- CLASSERT(GNILND_MAX_MSG_ID < GNILND_MSGID_CLOSE);
+ BUILD_BUG_ON(GNILND_MAX_MSG_ID >= GNILND_MSGID_CLOSE);
/* get a new unique CQ id for this conn */
write_lock(&kgnilnd_data.kgn_peer_conn_lock);
void
kgnilnd_peer_alive(kgn_peer_t *peer)
{
- set_mb(peer->gnp_last_alive, jiffies);
+ time64_t now = ktime_get_seconds();
+
+ set_mb(peer->gnp_last_alive, now);
}
void
peer_nid = kgnilnd_lnd2lnetnid(net->gnn_ni->ni_nid,
peer->gnp_nid);
- CDEBUG(D_NET, "peer 0x%p->%s last_alive %lu (%lus ago)\n",
+ CDEBUG(D_NET, "peer 0x%p->%s last_alive %lld (%llds ago)\n",
peer, libcfs_nid2str(peer_nid), peer->gnp_last_alive,
- cfs_duration_sec(jiffies - peer->gnp_last_alive));
+ ktime_get_seconds() - peer->gnp_last_alive);
lnet_notify(net->gnn_ni, peer_nid, alive,
+ (alive) ? true : false,
peer->gnp_last_alive);
kgnilnd_net_decref(net);
}
void
-kgnilnd_query(struct lnet_ni *ni, lnet_nid_t nid, cfs_time_t *when)
+kgnilnd_query(struct lnet_ni *ni, lnet_nid_t nid, time64_t *when)
{
kgn_net_t *net = ni->ni_data;
kgn_tx_t *tx;
/* LIE if in a quiesce - we will update the timeouts after,
* but we don't want sends failing during it */
if (kgnilnd_data.kgn_quiesce_trigger) {
- *when = jiffies;
+ *when = ktime_get_seconds();
read_unlock(&kgnilnd_data.kgn_peer_conn_lock);
GOTO(out, 0);
}
* - if it was, we lie to LNet because we believe a TX would complete
* on reconnect */
if (kgnilnd_conn_clean_errno(peer->gnp_last_errno)) {
- *when = jiffies;
+ *when = ktime_get_seconds();
}
/* we still want to fire a TX and new conn in this case */
} else {
kgnilnd_launch_tx(tx, net, &id);
}
out:
- CDEBUG(D_NETTRACE, "peer 0x%p->%s when %lu\n", peer,
+ CDEBUG(D_NETTRACE, "peer 0x%p->%s when %lld\n", peer,
libcfs_nid2str(nid), *when);
EXIT;
}
if (rc != 0)
return rc;
- printk(KERN_INFO "Lustre: kgnilnd build version: "KGNILND_BUILD_REV"\n");
+ LCONSOLE_INFO("Lustre: kgnilnd build version: "LUSTRE_VERSION_STRING"\n");
kgnilnd_insert_sysctl();
kgnilnd_proc_init();
MODULE_AUTHOR("Cray, Inc. <nic@cray.com>");
MODULE_DESCRIPTION("Gemini LNet Network Driver");
-MODULE_VERSION(KGNILND_BUILD_REV);
+MODULE_VERSION(LUSTRE_VERSION_STRING);
MODULE_LICENSE("GPL");
module_init(kgnilnd_init);