You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

There is a set of subcases that are not handled properly by the selection algorithm. These all relate to dealing with routers:

  1. MR node/MR router/Non-MR peer
  2. MR node/Non-MR router/Non-MR peer
  3. MR node/Non-MR router/MR peer

There is a rule that when dealing with a non-MR node we should always use the same local interface. However, routers are an exception to that rule. The router doesn't look at the src NID. It simply forwards the message. It's the final destination that cares about the src NID.

MR node/MR router/Non-MR peer

  • MR node should use the same local NI because the final destination is Non-MR
  • MR node can send to the different NIs of the MR router

MR node/Non-MR router/Non-MR peer

  • MR node should use the same local NI because the final destination is Non-MR
  • There is only one interface for the router so MR node will send to that by default

MR node/Non-MR router/MR peer (This is considered a new feature and will be implemented separately)

  • MR node can use different local NIs even if the router is Non-MR because the router doesn't care.
  • MR node can send to different MR peer NIs because that's allowed

Detailed Design

peer = lnet_find_or_create_peer_locked(dst_nid, cpt);
if (!peer->lp_multi-rail && peer_not_local) {
	best_gw = lnet_find_route()
	if (best_gw) {
		/* Don't overwrite the final destination peer */
 		gw_peer = best_gw->lpn_peer;
	}
}

/*
 * at this point we can be keeping track of two peers
 * 1. The peer for the gateway router (gw_peer)
 * 2. The peer for the final destination (peer)
 */

/* Let's deal with the case where the final destination is Non-MR */
if (!peer->lp_multi_rail) {
	/*
     * if the final destination peer is non-MR then
	 * check if we have a preferred local NI associated with the final destination peer
	 * if yes then my best_ni will be the preferred NI of the peer.
	 * if I don't have a best_ni then I'll need to pick one, and stick with it going forward
	 * to pick one we need to look at the gw_peer.
	 * if the gw_peer is MR then in order to know that we must've looked up a best_gw
	 * set the preferred local NI for the final destination peer based on the net_id of that best_gw NID.
	 * 		NOTE: Currently we do not support having different gateways reach the same final destination network.
	 * 		IE: tcp1 <gw1>@tcp
 	 * 			tcp1 <gw2>@tcp2
	 *		That's not supported at this point, although there is a ticket opened for it.
	 *		Either way, we'll need to stick with only one preferred NI, so we just pick the first one we come up with.
	 * Use the preferred NI to send the message to the non-MR peer
	 * goto the pick_peer tag to select one of the router's NIs.
	 *
	 * if the gw_peer is Non-MR then it only has one peer NI, so we use that to select the local NI based on the net_id of the gateway's NID.
	 * Store that preferred NI in the peer.
	 * Use the preferred NI to send the message to the non-MR peer via the single peer NI of the gateway.
	 */
}
  • No labels