From: Chris Horn Date: Fri, 11 Sep 2020 19:13:32 +0000 (-0500) Subject: LU-13571 lnd: Use NETWORK_TIMEOUT for some conn failures X-Git-Tag: 2.13.57~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=12333c1fecc00ed67597f189715a68cbfea7b287;ds=sidebyside LU-13571 lnd: Use NETWORK_TIMEOUT for some conn failures For -EHOSTUNREACH and -ETIMEDOUT we cannot tell whether the connnection failure was due to a problem with the remote or local NI, so we should return the LNET_MSG_STATUS_NETWORK_TIMEOUT to LNet in these cases. HPE-bug-id: LUS-9342 Signed-off-by: Chris Horn Change-Id: I9036f5698061ce74fe29683b8249b8f9a05f3433 Reviewed-on: https://review.whamcloud.com/39900 Reviewed-by: Amir Shehata Reviewed-by: Serguei Smirnov Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index 70ec9e8..a7ededd 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2209,8 +2209,12 @@ kiblnd_peer_connect_failed(struct kib_peer_ni *peer_ni, int active, CNETERR("Deleting messages for %s: connection failed\n", libcfs_nid2str(peer_ni->ibp_nid)); - kiblnd_txlist_done(&zombies, error, - LNET_MSG_STATUS_LOCAL_DROPPED); + if (error == -EHOSTUNREACH || error == -ETIMEDOUT) + kiblnd_txlist_done(&zombies, error, + LNET_MSG_STATUS_NETWORK_TIMEOUT); + else + kiblnd_txlist_done(&zombies, error, + LNET_MSG_STATUS_LOCAL_DROPPED); } static void