[lustre-devel] [PATCH 19/32] lnet: asym route inconsistency warning

James Simmons jsimmons at infradead.org
Wed Aug 3 18:38:04 PDT 2022


From: Gian-Carlo DeFazio <defazio1 at llnl.gov>

lnet_check_route_inconsistency() checks for inconsistency between
the lr_hops and lr_single_hop values of a route.

A warning is currently emitted if the route is not single hop
and the hop count is either 1 or LNET_UNDEFINED_HOPS.

To emit the warning, add the requirement that
avoid_asym_router_failure is enabled.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14555
Lustre-commit: 6ab060e58e6b3f38b ("LU-14555 lnet: asym route inconsistency warning")
Signed-off-by: Gian-Carlo DeFazio <defazio1 at llnl.gov>
Reviewed-on: https://review.whamcloud.com/46918
Reviewed-by: Olaf Faaland-LLNL <faaland1 at llnl.gov>
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/router.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/lnet/lnet/router.c b/net/lnet/lnet/router.c
index bbef2b3..b684243 100644
--- a/net/lnet/lnet/router.c
+++ b/net/lnet/lnet/router.c
@@ -369,7 +369,8 @@ bool lnet_is_route_alive(struct lnet_route *route)
 lnet_check_route_inconsistency(struct lnet_route *route)
 {
 	if (!route->lr_single_hop &&
-	    (route->lr_hops == 1 || route->lr_hops == LNET_UNDEFINED_HOPS)) {
+	    (route->lr_hops == 1 || route->lr_hops == LNET_UNDEFINED_HOPS) &&
+	    avoid_asym_router_failure) {
 		CWARN("route %s->%s is detected to be multi-hop but hop count is set to %d\n",
 		      libcfs_net2str(route->lr_net),
 		      libcfs_nidstr(&route->lr_gateway->lp_primary_nid),
-- 
1.8.3.1



More information about the lustre-devel mailing list