There are cases where the health status wasn't set properly.
Most notably in the tx_done we need to deal with a specific
set of errno: ENETDOWN, EHOSTUNREACH, ENETUNREACH, ECONNREFUSED,
ECONNRESET. In all those cases we can try and resend to other
available peer NIs.
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Ie8f0275582d434bda5e394fccc2a4d88dd538c69
Reviewed-on: https://review.whamcloud.com/33307
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LNET_MSG_STATUS_LOCAL_TIMEOUT;
else if (error == -ENETDOWN ||
error == -EHOSTUNREACH ||
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
/*
* for all other errors we don't want to
* retransmit
/* NB Routes may be ignored if connections to them failed recently */
CNETERR("No usable routes to %s\n", libcfs_id2str(id));
/* 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);
}
return (-EHOSTUNREACH);
}
+ lntmsg->msg_health_status = tx->tx_hstatus;
ksocknal_free_tx(tx);
return (-EIO);
}
ksocknal_free_tx(tx);
return (-EIO);
}
CNETERR("Dropping message for %s: peer not alive\n",
libcfs_id2str(msg->msg_target));
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_finalize(msg, -EHOSTUNREACH);
lnet_net_lock(cpt);
return -EHOSTUNREACH;
lnet_net_lock(cpt);
return -EHOSTUNREACH;