Whamcloud - gitweb
LU-12756 lnet: Avoid comparing route to itself 35/36535/4
authorChris Horn <hornc@cray.com>
Tue, 22 Oct 2019 00:35:42 +0000 (19:35 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 Jan 2020 07:41:41 +0000 (07:41 +0000)
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 <hornc@cray.com>
Change-Id: I1a51b04b248dbaa9a47a7a69e2995c21e515fb2b
Reviewed-on: https://review.whamcloud.com/36535
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c

index c151430..f735355 100644 (file)
@@ -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 */