Whamcloud - gitweb
LU-14954 socklnd: fix link state detection
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Mon, 23 Aug 2021 19:58:51 +0000 (12:58 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 2 Sep 2021 02:15:22 +0000 (02:15 +0000)
commit03a0bee0bcc54adc962da5936af27312aafabded
treebdb08fce4aa5915978237b73ed9bc53b8853f291
parent2fb30305fbeeecf316a2f64c7254dd84e912f13c
LU-14954 socklnd: fix link state detection

Due to matching only the device index, link detection implemented
in LU-14742 has issues with confusing the link events for the
virtual interfaces with the link events for the interface that
LNet was actually configured to use. Fix this by improving
the identification of the event source: use both device name and
device index.

Also, to make sure the link fatal state is cleared only when
the device is bound to the IP address used at NI creation,
subscribe to inetaddr events in addition to the netdev events.

Lustre-change: https://review.whamcloud.com/44732
Lustre-commit: TBD (from d4dbbf3cfd692ed548c82e2dda9fdcadae052a62)

Test-Parameters: trivial
Fixes: b842fb6fd5 ("LU-14742: detect link state to set fatal error")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ib1996c66a8ae2596970d66e3d920702190851e3f
Reviewed-on: https://review.whamcloud.com/44787
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/klnds/socklnd/socklnd.c