From 275016fcae729f8467dc09aa15aa2b4bb2690875 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Thu, 16 Jan 2020 13:25:29 -0600 Subject: [PATCH] Revert "LU-12222 lnet: Check if we're sending to ourselves" This reverts commit e4af756e1f428a9f7883bf883f66941defb1447f. Commit e4af756 causes an assert when combined with patch https://review.whamcloud.com/36512 LU-12889 lnet: Do not assume peers are MR capable Since the 36512 patch is fixing a more serious bug, this patch is reverted to allow that fix to land. Signed-off-by: Chris Horn Change-Id: I6f3c1e7f7b2858f4aa330b53880fbcc815c1e2c7 Reviewed-on: https://review.whamcloud.com/37259 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin --- lnet/lnet/lib-move.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index cc4453f..615d755 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -2652,20 +2652,13 @@ lnet_select_pathway(lnet_nid_t src_nid, lnet_nid_t dst_nid, again: /* - * If we're sending to ourselves then there is no need to go through - * any selection. We can shortcut the entire process and send over - * lolnd. - * - * However, we make two exceptions to this rule: - * 1. If the src_nid is specified then our API defines that we must send - * via that interface. - * 2. Recovery messages must be sent to the lnet_ni that is being - * recovered. + * If we're being asked to send to the loopback interface, there + * is no need to go through any selection. We can just shortcut + * the entire process and send over lolnd */ send_data.sd_msg = msg; send_data.sd_cpt = cpt; - if (src_nid == LNET_NID_ANY && !msg->msg_recovery && - lnet_nid2ni_locked(dst_nid, cpt)) { + if (LNET_NETTYP(LNET_NIDNET(dst_nid)) == LOLND) { rc = lnet_handle_lo_send(&send_data); lnet_net_unlock(cpt); return rc; -- 1.8.3.1