Whamcloud - gitweb
LU-16836 lnet: ensure dev notification on lnd startup 57/51057/6
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Fri, 19 May 2023 02:12:19 +0000 (19:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Jun 2023 21:48:46 +0000 (21:48 +0000)
commit09c6e2b872287c847d15620788f6cf50b3a9f30b
treed7e3b28b55dde7d2c23e5ab08024b4505f4d45c9
parent3b7a02ee4d656b7b3e044713681da2f56dddb152
LU-16836 lnet: ensure dev notification on lnd startup

Look up device and link state on lnd startup so that
the initial NI state may be set properly.

Reduce code duplication by adding lnet_set_link_fatal_state() and
lnet_get_link_status() functions which are shared across LNDs.
LND-specific versions of these are removed.

This fixes the issue with adding LNet NI using an interface with
cable unplugged which results in the NI state initialized as "up".

Fixes: da230373bd ("LU-16563 lnet: use discovered ni status")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I16084092cc21a4e42dfef4624adfbf57eb4fdecb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51057
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/config.c