Whamcloud - gitweb
LU-18063 lnet: restore LNet NI dropped information 75/55975/5
authorJames Simmons <jsimmons@infradead.org>
Thu, 8 Aug 2024 18:48:11 +0000 (12:48 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:03:19 +0000 (22:03 +0000)
commit3c02fc1d4c5113169b68fadc3ecc3386fb1634c4
tree8dbeb88e9621c562b4e6c8a8147802b9d5f26a23
parentea4cfe08cfc34a887985741a737ee4c5ae3a6d98
LU-18063 lnet: restore LNet NI dropped information

In testing setting up 2 different LNet nets, tcp1 and tcp2,
revealed two bugs.

The first network was setup using the interface and defaults
to the specified net (tcp1) and the second was setup with a
specific NID (xxx@tcp2). In the case of setup with a specific
NID no interface was provided and it was not found. This was
due to checking only for NULL interface names. Adding checks
for zero length strings also ensures an interface will always
be set for NI.

The next bug observed was the loss of lnd tunable information
with multiple LNet nets. This information is contained in
struct lnet_lnd for each specific LND driver. In the current
code while looping over all the nets we check if the struct
lnet_lnd has changed. It was clearing the local lnd pointer
on no change to avoid sending the same key table multiple
times. We want to only send a new key table if the lnet_lnd
has changed. Later in the inner loop we use the same
struct lnet_lnd to enquire about LND specific information but
since it was set to NULL earlier we can't collect this data.
Introduce a flag instead to avoid sending the key table and
keep around the lnd for data collection.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: d15bfca078 ("LU-10391 lnet: migrate full LNet NI information collection")
Fixes: fff650726b ("LU-13642 lnet: Allow dynamic IP specification")
Change-Id: Ibeb908b106ff0331e1c09249811b3a8a2d7f345e
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55975
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/gnilnd/gnilnd.c
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/api-ni.c
lnet/lnet/config.c
lustre/tests/sanity-lnet.sh