From: Chris Horn Date: Tue, 22 Oct 2019 00:35:42 +0000 (-0500) Subject: LU-12756 lnet: Avoid comparing route to itself X-Git-Tag: 2.13.51~17 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2b8d9d12d182fc91d671558434cc0b652c1ade21 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 --- 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 */