Whamcloud - gitweb
LU-14649 lnet: Correct distance calculation of local NIDs 98/43498/3
authorChris Horn <chris.horn@hpe.com>
Wed, 28 Apr 2021 16:33:40 +0000 (11:33 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 21 Jun 2021 22:16:36 +0000 (22:16 +0000)
commit3b263dd80ee56efae922e2cfcab375dbe2cb273a
treeca517c6c101558e1b866a13dc2357896a0e272cc
parent356248c8a14571049d0ae9eb09c5107397b92d65
LU-14649 lnet: Correct distance calculation of local NIDs

Multi-rail peers can have multiple local NIDs on the same net, but
LNetDist() may only identify a NID as local if it is the first one
returned by lnet_get_next_ni_locked().

We need to check all local NIs to find a match for the target NID
in LNetDist().

Add test to check LNetDist() calculation of local NIDs for a peer with
multiple NIDs on the same net.

HPE-bug-id: LUS-9964
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Ic8855f7798a90972c69d89d039d0bba882d8aed1
Reviewed-on: https://review.whamcloud.com/43498
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c
lustre/tests/sanity-lnet.sh