Whamcloud - gitweb
LU-16859 lnet: incorrect check for duplicate NI 18/52918/6
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Tue, 31 Oct 2023 21:11:54 +0000 (14:11 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 13 Dec 2023 12:21:28 +0000 (12:21 +0000)
commit7dcdb9eb0ded98e956fe417abbd835433a8de3f0
treeb0a1be7d8778a7e8159634b7dc3729e45980fc17
parentc744221a1fd55df33ca2b0e3e1b1ffd7ef3a986d
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.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I0d4047118e7d9982fa791a2e324a27aa5d4abaee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52918
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: Oleg Drokin <green@whamcloud.com>
lnet/lnet/config.c
lustre/tests/sanity-lnet.sh