Whamcloud - gitweb
LU-15595 lnet: Always use ping reply to set route lr_alive
authorChris Horn <chris.horn@hpe.com>
Wed, 27 Oct 2021 20:10:17 +0000 (20:10 +0000)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 29 Jul 2023 07:56:09 +0000 (07:56 +0000)
commit924f5e5c5121908b9864b12384cde1256cb8ff66
treed20b8a689816210e00cfbbcbc2bfd801d8315aed
parent8a60e19dcb2c05a7c2a4d33a0af242a732e6e2e7
LU-15595 lnet: Always use ping reply to set route lr_alive

We currently process discovery ping replies in different ways
depending on whether the gateway has discovery enabled or disabled
(or the local peer doing the processing has discovery enabled or
disabled).

When DD is disabled we process the ping reply to set the lr_alive
field of lnet_route because the peer objects for non-MR routers do
not contain all the information needed to calculate the route
aliveness when a message is being sent.

When DD is enabled then we don't do any special processing of the
ping reply. We simply let discovery update the NI status for the
GW's peer NIs and then we calculate the route aliveness on every
send.

We issue discovery pings to routers every alive_router_check_interval
seconds (default 60), but we calculate route aliveness on every send
to a remote network (1000s of times per seconds). Thus, it is better
to slightly duplicate the effort expended when we receive a discovery
reply so that we can avoid calculating route aliveness on every send.

Since both lr_alive and hop type are being set on each ping reply, for
both DD enabled and disabled cases, we can remove the code for
updating lr_alive and hop type from lnet_router_discovery_complete().

If discover encounters a fatal error, we still set the status of each
peer NI, as well as all routes, to down in
lnet_router_discovery_complete().

Lustre-change: https://review.whamcloud.com/46624
Lustre-commit: 1ea6c87d415144522a1c50c08063c9d30d585325

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: If4838c269a89885ba3763f62847e294804edf62e
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51663
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/peer.c
lnet/lnet/router.c