read_unlock(&ksocknal_data.ksnd_global_lock);
if (notify)
- lnet_notify(peer_ni->ksnp_ni, peer_ni->ksnp_id.nid, 0,
- last_alive);
+ lnet_notify(peer_ni->ksnp_ni, peer_ni->ksnp_id.nid,
+ false, false, last_alive);
}
void
}
void
-ksocknal_notify(struct lnet_ni *ni, lnet_nid_t gw_nid, int alive)
+ksocknal_notify_gw_down(lnet_nid_t gw_nid)
{
/* The router is telling me she's been notified of a change in
* gateway state....
.pid = LNET_PID_ANY,
};
- CDEBUG (D_NET, "gw %s %s\n", libcfs_nid2str(gw_nid),
- alive ? "up" : "down");
+ CDEBUG(D_NET, "gw %s down\n", libcfs_nid2str(gw_nid));
- if (!alive) {
- /* If the gateway crashed, close all open connections... */
- ksocknal_close_matching_conns (id, 0);
- return;
- }
+ /* If the gateway crashed, close all open connections... */
+ ksocknal_close_matching_conns(id, 0);
+ return;
- /* ...otherwise do nothing. We can only establish new connections
- * if we have autroutes, and these connect on demand. */
+ /* We can only establish new connections
+ * if we have autroutes, and these connect on demand. */
}
void
the_ksocklnd.lnd_ctl = ksocknal_ctl;
the_ksocklnd.lnd_send = ksocknal_send;
the_ksocklnd.lnd_recv = ksocknal_recv;
- the_ksocklnd.lnd_notify = ksocknal_notify;
+ the_ksocklnd.lnd_notify_peer_down = ksocknal_notify_gw_down;
the_ksocklnd.lnd_query = ksocknal_query;
the_ksocklnd.lnd_accept = ksocknal_accept;