Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
if (msg->msg_type == LNET_MSG_REPLY ||
    msg->msg_type == LNET_MSG_ACK ||
    !lnet_peer_is_multi_rail(peer) ||
    best_ni) {
	...
	if (best_lpni && !lnet_get_net_locked(LNET_NIDNET(dst_nid))) {
		...
		gw_peer = best_gw->lpni_peer_net->lpn_peer;
		/* use the gw_peer to deal with the router for now */
		...
	}
	...

	if (!lnet_peer_is_multi_rail(peer)) {
		__u32 net_id;
		/* if gw_peer is not NULL, then we must have a best_gw */
		if (gw_peer) (
			net_id = LNET_NIDNET(best_gw->lpni_nid);
		else
			net_id = LNET_NIDNET(best_lpni->lpni_nid);
		...
		if (!best_ni) {
			...
			if (final_dst_lpni->lpni_pref_nnids == 1) {
				best_ni = lnet_nid2ni_locked(final_dst_lpni->lpni_pref.nid, cpt);
			} else
				peer_net = lnet_peer_get_net_locked((gw_peer) ? gw_peer : peer, net);
				...
		}
		if (!best_ni) {
			/* if we're routing then we want to look at the gw */
			struct lnet_lpni lpni_use = (gw_peer) ? best_gw : best_lpni;
			best_ni = lnet_net2ni_locked(net_id, cpt);
			/* update the code to use lpni_use instead of best_lpni */
			...
		    /* now we need to pick the lpni for which we will update it's preferred local_ni */
			if (!gw_peer)
				/* continue doing what the code does now */
		}
		/* Set preferred NI if necessary. */
		if (gw_peer)
			if (final_dst_lpni->lpni_pref_nnids == 0)
				/* set preferred ni */
		else
			if (lpni->lpni_pref_nnids == 0)
				/* set preferred ni */
	}

	/* deal with the gw directly */
	if (gw_peer)
		peer = gw_peer
}

Caveat

One thing to be aware of is that if the entire system is MR, but the config doesn't tell the node and the peer that the other is MR, then that will cause the node to only use one of its interfaces when talking to that peer. Even though it'll use all the interfaces of the MR router and the router will use all of its interfaces and the final destination interfaces, there would still be a performance drop, because the local node is not using the entire bandwidth available to it.

With the Dynamic Discovery this will not be a problem since DD will discover the final destination MR status and will deal with it as MR.

However, in 2.10 the configuration described above will have a performance impact.