Whamcloud - gitweb
LU-10391 lnet: extend rspt_next_hop_nid in lnet_rsp_tracker
[fs/lustre-release.git] / lnet / lnet / lib-move.c
index 9479cfa..67ab256 100644 (file)
@@ -1511,7 +1511,7 @@ lnet_find_route_locked(struct lnet_remotenet *rnet, __u32 src_net,
        list_for_each_entry(route, &rnet->lrn_routes, lr_list) {
                if (!lnet_is_route_alive(route))
                        continue;
-               gw_pnid = route->lr_gateway->lp_primary_nid;
+               gw_pnid = lnet_nid_to_nid4(&route->lr_gateway->lp_primary_nid);
 
                /* no protection on below fields, but it's harmless */
                if (last_route && (last_route->lr_seq - route->lr_seq < 0))
@@ -1950,9 +1950,9 @@ lnet_handle_send(struct lnet_send_data *sd)
                rspt = msg->msg_md->md_rspt_ptr;
                if (rspt) {
                        rspt->rspt_next_hop_nid =
-                               lnet_nid_to_nid4(&msg->msg_txpeer->lpni_nid);
+                               msg->msg_txpeer->lpni_nid;
                        CDEBUG(D_NET, "rspt_next_hop_nid = %s\n",
-                              libcfs_nid2str(rspt->rspt_next_hop_nid));
+                              libcfs_nidstr(&rspt->rspt_next_hop_nid));
                }
        }
 
@@ -2137,7 +2137,7 @@ lnet_initiate_peer_discovery(struct lnet_peer_ni *lpni, struct lnet_msg *msg,
        lnet_peer_ni_decref_locked(new_lpni);
 
        CDEBUG(D_NET, "msg %p delayed. %s pending discovery\n",
-              msg, libcfs_nid2str(peer->lp_primary_nid));
+              msg, libcfs_nidstr(&peer->lp_primary_nid));
 
        return LNET_DC_WAIT;
 }
@@ -3220,7 +3220,7 @@ lnet_finalize_expired_responses(void)
                        if (ktime_compare(now, rspt->rspt_deadline) >= 0 ||
                            the_lnet.ln_mt_state == LNET_MT_STATE_SHUTDOWN) {
                                struct lnet_peer_ni *lpni;
-                               lnet_nid_t nid;
+                               struct lnet_nid nid;
 
                                md = lnet_handle2md(&rspt->rspt_mdh);
                                if (!md) {
@@ -3278,7 +3278,7 @@ lnet_finalize_expired_responses(void)
 
                                CDEBUG(D_NET,
                                       "Response timeout: md = %p: nid = %s\n",
-                                      md, libcfs_nid2str(nid));
+                                      md, libcfs_nidstr(&nid));
 
                                /*
                                 * If there is a timeout on the response
@@ -3286,7 +3286,7 @@ lnet_finalize_expired_responses(void)
                                 * value so that we don't use it
                                 */
                                lnet_net_lock(0);
-                               lpni = lnet_find_peer_ni_locked(nid);
+                               lpni = lnet_peer_ni_find_locked(&nid);
                                if (lpni) {
                                        lnet_handle_remote_failure_locked(lpni);
                                        lnet_peer_ni_decref_locked(lpni);
@@ -4567,7 +4567,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_nid_t from_nid,
                        return -EPROTO;
                }
 
-               if (lnet_islocalnid(dest_nid)) {
+               if (lnet_islocalnid4(dest_nid)) {
                        /* dest is another local NI; sender should have used
                         * this node's NID on its own network */
                        CERROR("%s, src %s: Bad dest nid %s "
@@ -5104,7 +5104,8 @@ lnet_create_reply_msg(struct lnet_ni *ni, struct lnet_msg *getmsg)
               libcfs_nidstr(&ni->ni_nid), libcfs_id2str(peer_id), getmd);
 
        /* setup information for lnet_build_msg_event */
-       msg->msg_initiator = getmsg->msg_txpeer->lpni_peer_net->lpn_peer->lp_primary_nid;
+       msg->msg_initiator =
+               lnet_nid_to_nid4(&getmsg->msg_txpeer->lpni_peer_net->lpn_peer->lp_primary_nid);
        msg->msg_from = peer_id.nid;
        msg->msg_type = LNET_MSG_GET; /* flag this msg as an "optimized" GET */
        msg->msg_hdr.src_nid = peer_id.nid;