From 2b8d9d12d182fc91d671558434cc0b652c1ade21 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Mon, 21 Oct 2019 19:35:42 -0500 Subject: [PATCH] LU-12756 lnet: Avoid comparing route to itself The first iteration of the route selection loop compares the first route in the list with itself. Test-Parameters: trivial Signed-off-by: Chris Horn Change-Id: I1a51b04b248dbaa9a47a7a69e2995c21e515fb2b Reviewed-on: https://review.whamcloud.com/36535 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko Reviewed-by: Alexey Lyashkov Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin --- lnet/lnet/lib-move.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index c151430..f735355 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -1538,6 +1538,12 @@ lnet_find_route_locked(struct lnet_net *net, __u32 remote_net, if (lp_best == NULL) { best_route = last_route = route; lp_best = lp; + best_gw_ni = lnet_find_best_lpni_on_net(NULL, + LNET_NID_ANY, + route->lr_gateway, + route->lr_lnet); + LASSERT(best_gw_ni); + continue; } /* no protection on below fields, but it's harmless */ -- 1.8.3.1