From: Chris Horn Date: Wed, 22 Apr 2020 16:42:27 +0000 (-0500) Subject: LU-12222 lnet: Primary NID of lolnd NID is the lolnd NID X-Git-Tag: 2.13.54~133 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=33d2e44e5026f1e9162dd5e6b931085fdc035a34 LU-12222 lnet: Primary NID of lolnd NID is the lolnd NID We want Lustre traffic that is intended for the local peer to be sent and received over the lolnd. The function ptlrpc_uuid_to_peer() will currently resolve a NID to the lolnd NID, but ptlrpc_connection_get() will overwrite this selection with the result from LNetPrimaryNID(). Have LNetPrimaryNID return the lolnd NID when it is passed the lolnd NID. HPE-bug-id: LUS-8457 Signed-off-by: Chris Horn Change-Id: I02708bb45f8440091782ca7886bac7656efb0223 Reviewed-on: https://review.whamcloud.com/38313 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 8b32c2a..210a96b 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -1180,6 +1180,9 @@ LNetPrimaryNID(lnet_nid_t nid) int rc = 0; int cpt; + if (nid == LNET_NID_LO_0) + return LNET_NID_LO_0; + cpt = lnet_net_lock_current(); lpni = lnet_nid2peerni_locked(nid, LNET_NID_ANY, cpt); if (IS_ERR(lpni)) {