@@ -374,8 +374,10 @@ struct ksock_tx *
tx->tx_hstatus = LNET_MSG_STATUS_LOCAL_TIMEOUT;
else if (error == -ENETDOWN ||
error == -EHOSTUNREACH ||
- error == -ENETUNREACH)
- tx->tx_hstatus = LNET_MSG_STATUS_LOCAL_DROPPED;
+ error == -ENETUNREACH ||
+ error == -ECONNREFUSED ||
+ error == -ECONNRESET)
+ tx->tx_hstatus = LNET_MSG_STATUS_REMOTE_DROPPED;
/* for all other errors we don't want to
* retransmit
*/
@@ -901,6 +903,7 @@ struct ksock_route *
/* NB Routes may be ignored if connections to them failed recently */
CNETERR("No usable routes to %s\n", libcfs_id2str(id));
+ tx->tx_hstatus = LNET_MSG_STATUS_REMOTE_ERROR;
return -EHOSTUNREACH;
}
@@ -986,6 +989,7 @@ struct ksock_route *
if (!rc)
return 0;
+ lntmsg->msg_health_status = tx->tx_hstatus;
ksocknal_free_tx(tx);
return -EIO;
}
@@ -770,10 +770,9 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
CNETERR("Dropping message for %s: peer not alive\n",
libcfs_id2str(msg->msg_target));
- if (do_send) {
- msg->msg_health_status = LNET_MSG_STATUS_LOCAL_DROPPED;
+ msg->msg_health_status = LNET_MSG_STATUS_LOCAL_DROPPED;
+ if (do_send)
lnet_finalize(msg, -EHOSTUNREACH);
- }
lnet_net_lock(cpt);
return -EHOSTUNREACH;