Commit 12c8fc25 authored by Chris Horn's avatar Chris Horn Committed by Oleg Drokin
Browse files

LU-13278 lnet: Reconcile discovery push and reply handling



Reconcile the logic for updating the multi-rail flag of a peer when
processing a discovery PUSH with the logic used when processing a
discovery REPLY.

Cray-bug-id: LUS-8516
Signed-off-by: default avatarChris Horn <hornc@cray.com>
Change-Id: Idfb4c3729822d03b71f9440ac66176ae6b886022
Reviewed-on: https://review.whamcloud.com/37674

Tested-by: default avatarjenkins <devops@whamcloud.com>
Tested-by: default avatarMaloo <maloo@whamcloud.com>
Reviewed-by: default avatarShaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: default avatarSerguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: default avatarStephen Champion <stephen.champion@hpe.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/39575

Reviewed-by: default avatarChris Horn <chris.horn@hpe.com>
parent 137f4267
......@@ -1917,20 +1917,6 @@ void lnet_peer_push_event(struct lnet_event *ev)
goto out;
}
/*
* Check the MULTIRAIL flag. Complain if the peer was DLC
* configured without it.
*/
if (!(lp->lp_state & LNET_PEER_MULTI_RAIL)) {
if (lp->lp_state & LNET_PEER_CONFIGURED) {
CERROR("Push says %s is Multi-Rail, DLC says not\n",
libcfs_nid2str(lp->lp_primary_nid));
} else {
lp->lp_state |= LNET_PEER_MULTI_RAIL;
lnet_peer_clr_non_mr_pref_nids(lp);
}
}
/*
* The peer may have discovery disabled at its end. Set
* NO_DISCOVERY as appropriate.
......@@ -1945,6 +1931,31 @@ void lnet_peer_push_event(struct lnet_event *ev)
lp->lp_state &= ~LNET_PEER_NO_DISCOVERY;
}
/*
* Update the MULTI_RAIL flag based on the push. If the peer
* was configured with DLC then the setting should match what
* DLC put in.
* NB: We verified above that the MR feature bit is set in pi_features
*/
if (lp->lp_state & LNET_PEER_MULTI_RAIL) {
CDEBUG(D_NET, "peer %s(%p) is MR\n",
libcfs_nid2str(lp->lp_primary_nid), lp);
} else if (lp->lp_state & LNET_PEER_CONFIGURED) {
CWARN("Push says %s is Multi-Rail, DLC says not\n",
libcfs_nid2str(lp->lp_primary_nid));
} else if (lnet_peer_discovery_disabled) {
CDEBUG(D_NET, "peer %s(%p) not MR: DD disabled locally\n",
libcfs_nid2str(lp->lp_primary_nid), lp);
} else if (lp->lp_state & LNET_PEER_NO_DISCOVERY) {
CDEBUG(D_NET, "peer %s(%p) not MR: DD disabled remotely\n",
libcfs_nid2str(lp->lp_primary_nid), lp);
} else {
CDEBUG(D_NET, "peer %s(%p) is MR capable\n",
libcfs_nid2str(lp->lp_primary_nid), lp);
lp->lp_state |= LNET_PEER_MULTI_RAIL;
lnet_peer_clr_non_mr_pref_nids(lp);
}
/*
* Check for truncation of the Put message. Clear the
* NIDS_UPTODATE flag and set FORCE_PING to trigger a ping,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment