- } else if ((distance <= shortest_distance &&
- distance < lnet_get_numa_range()) ||
- distance == shortest_distance) {
- /*
- * This NI is either within range or it's
- * equidistant. In both of these cases we
- * would want to select the NI based on
- * its available credits first, and then
- * via Round Robin.
- */
- if (distance <= shortest_distance &&
- distance < lnet_get_numa_range()) {
- /*
- * If this is the first NI that's
- * within range, then set the
- * shortest distance to the range
- * specified by the user. In
- * effect we're saying that all
- * NIs that fall within this NUMA
- * range shall be dealt with as
- * having equal NUMA weight. Which
- * will mean that we should select
- * through that set by their
- * available credits first
- * followed by Round Robin.
- *
- * And since this is the first NI
- * in the range, let's just set it
- * as our best_ni for now. The
- * following NIs found in the
- * range will be dealt with as
- * mentioned previously.
- */
- shortest_distance = lnet_get_numa_range();
- if (!found_ir) {
- found_ir = true;
- goto set_ni;
- }
- }
- /*
- * This NI is NUMA equidistant let's
- * select using credits followed by Round
- * Robin.
- */
- if (ni_credits < best_credits) {