Whamcloud - gitweb
LU-11297 lnet: MR Routing Feature
[fs/lustre-release.git] / lnet / klnds / socklnd / socklnd.c
index 3409264..5d60a0a 100644 (file)
@@ -1521,8 +1521,8 @@ ksocknal_peer_failed(struct ksock_peer_ni *peer_ni)
        read_unlock(&ksocknal_data.ksnd_global_lock);
 
        if (notify)
        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
@@ -1781,7 +1781,7 @@ ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr)
 }
 
 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....
 {
        /* The router is telling me she's been notified of a change in
         * gateway state....
@@ -1791,17 +1791,14 @@ ksocknal_notify(struct lnet_ni *ni, lnet_nid_t gw_nid, int alive)
                .pid    = LNET_PID_ANY,
        };
 
                .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
 }
 
 void
@@ -2882,7 +2879,7 @@ static int __init ksocklnd_init(void)
        the_ksocklnd.lnd_ctl      = ksocknal_ctl;
        the_ksocklnd.lnd_send     = ksocknal_send;
        the_ksocklnd.lnd_recv     = ksocknal_recv;
        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;
 
        the_ksocklnd.lnd_query    = ksocknal_query;
        the_ksocklnd.lnd_accept   = ksocknal_accept;