Whamcloud - gitweb
LU-16859 lnet: incorrect check for duplicate NI
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Tue, 31 Oct 2023 21:11:54 +0000 (14:11 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 29 Dec 2023 11:16:29 +0000 (11:16 +0000)
commitf378b3b9a4de048355ea2cd47d0f7ea7b8893a07
treeb84dd1e59bb1747d4298e016a2ee9de6d1dd4d6f
parenta431f6dd2f99773c3f430ebbbf194a7e88b3e76c
LU-16859 lnet: incorrect check for duplicate NI

When NI is being added to an existing LNet, checking against
existing NI interface names currently fails if the new NI
happens to use interface name which is a prefix of one used
by an existing NI.

The following example assumes ib0 and its alias ib0:1 are
configured:

lnetctl net add --net o2ib --if ib0:1
lnetctl net add --net o2ib --if ib0

Fix this by making sure interface strings are compared properly
regardless of relative length.

Lustre-change: https://review.whamcloud.com/52918
Lustre-commit: 7dcdb9eb0ded98e956fe417abbd835433a8de3f0

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I0d4047118e7d9982fa791a2e324a27aa5d4abaee
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53527
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/lnet/config.c
lustre/tests/sanity-lnet.sh