spin_unlock(&rtr->lp_lock);
/* find the peer_ni associated with the primary NID */
- lpni = lnet_peer_get_ni_locked(
- rtr, lnet_nid_to_nid4(&rtr->lp_primary_nid));
+ lpni = lnet_peer_ni_get_locked(rtr, &rtr->lp_primary_nid);
if (!lpni) {
CDEBUG(D_NET, "Expected to find an lpni for %s, but non found\n",
libcfs_nidstr(&rtr->lp_primary_nid));
* when: notificaiton time.
*/
int
-lnet_notify(struct lnet_ni *ni, lnet_nid_t nid, bool alive, bool reset,
+lnet_notify(struct lnet_ni *ni, lnet_nid_t nid4, bool alive, bool reset,
time64_t when)
{
struct lnet_peer_ni *lpni = NULL;
struct lnet_route *route;
struct lnet_peer *lp;
time64_t now = ktime_get_seconds();
+ struct lnet_nid nid;
int cpt;
+ lnet_nid4_to_nid(nid4, &nid);
LASSERT(!in_interrupt());
CDEBUG(D_NET, "%s notifying %s: %s\n",
(ni == NULL) ? "userspace" : libcfs_nidstr(&ni->ni_nid),
- libcfs_nid2str(nid), alive ? "up" : "down");
+ libcfs_nidstr(&nid), alive ? "up" : "down");
if (ni != NULL &&
- LNET_NID_NET(&ni->ni_nid) != LNET_NIDNET(nid)) {
+ LNET_NID_NET(&ni->ni_nid) != LNET_NID_NET(&nid)) {
CWARN("Ignoring notification of %s %s by %s (different net)\n",
- libcfs_nid2str(nid), alive ? "birth" : "death",
+ libcfs_nidstr(&nid), alive ? "birth" : "death",
libcfs_nidstr(&ni->ni_nid));
return -EINVAL;
}
if (when > now) {
CWARN("Ignoring prediction from %s of %s %s %lld seconds in the future\n",
ni ? libcfs_nidstr(&ni->ni_nid) : "userspace",
- libcfs_nid2str(nid), alive ? "up" : "down", when - now);
+ libcfs_nidstr(&nid), alive ? "up" : "down", when - now);
return -EINVAL;
}
return -ESHUTDOWN;
}
- lpni = lnet_find_peer_ni_locked(nid);
+ lpni = lnet_peer_ni_find_locked(&nid);
if (lpni == NULL) {
/* nid not found */
lnet_net_unlock(0);
- CDEBUG(D_NET, "%s not found\n", libcfs_nid2str(nid));
+ CDEBUG(D_NET, "%s not found\n", libcfs_nidstr(&nid));
return 0;
}