Fixed the selection algorithm to work properly with > 1 local
networks. The behavior now is to iterate through all interfaces
on all networks
Also removed the health variable from struct lnet_peer_net since
it's never used.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ib91748e80446585b6a9e1bc0f3af6894599d8aaa
Reviewed-on: http://review.whamcloud.com/20890
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
/* Net ID */
__u32 lpn_net_id;
-
- /* health flag */
- bool lpn_healthy;
};
/* peer hash size */
* b. Iterate through each of the peer_nets/nis to decide
* the best peer/local_ni pair to use
*/
+ shortest_distance = INT_MAX;
+ best_credits = INT_MIN;
list_for_each_entry(peer_net, &peer->lp_peer_nets, lpn_on_peer_list) {
if (!lnet_is_peer_net_healthy_locked(peer_net))
continue;
* 2. NI available credits
* 3. Round Robin
*/
- shortest_distance = INT_MAX;
- best_credits = INT_MIN;
ni = NULL;
while ((ni = lnet_get_next_ni_locked(local_net, ni))) {
int ni_credits;