Whamcloud - gitweb
LU-14954 socklnd: fix link state detection 32/44732/4
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Mon, 23 Aug 2021 19:58:51 +0000 (12:58 -0700)
committerSerguei Smirnov <ssmirnov@whamcloud.com>
Tue, 24 Aug 2021 19:32:28 +0000 (12:32 -0700)
commitd4dbbf3cfd692ed548c82e2dda9fdcadae052a62
tree3446f602e348e00206736bd006e32c28dc87dd14
parentd8204f903a4f9400b3799504cd53b615b4bacdfc
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.

Test-Parameters: trivial
Fixes: fc2df80e96dc ("LU-14742: detect link state to set fatal error")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ib1996c66a8ae2596970d66e3d920702190851e3f
lnet/klnds/socklnd/socklnd.c