Whamcloud - gitweb
LU-16836 lnet: ensure dev notification on lnd startup
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Fri, 19 May 2023 02:12:19 +0000 (19:12 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 1 Jul 2023 10:03:51 +0000 (10:03 +0000)
commit11bbe287e85838b105d88e36129164c99360daca
tree19539715af120ea4a1b45c6a92af2ec98f27fcdc
parent3f649b5afae42347f763cd4fe247bfea82e0e8a3
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".

Lustre-change: https://review.whamcloud.com/51057
Lustre-commit: 09c6e2b872287c847d15620788f6cf50b3a9f30b

Fixes: c4df48116d ("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/ex/lustre-release/+/51310
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/config.c