Whamcloud - gitweb
LU-13461 lnet: restrict gateway selection 98/38298/5
authorAmir Shehata <ashehata@whamcloud.com>
Tue, 21 Apr 2020 01:36:42 +0000 (18:36 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:41:08 +0000 (05:41 +0000)
commitceb92c5512bad844b7f741ff6fb37c62c652e66f
treee3f9f6a119678c2182f98d40e17de63f92ea26ba
parent46ed28c0d10ab2edeb95e6e0f50b254fb98fa8c6
LU-13461 lnet: restrict gateway selection

This patch fixes a conflict between
LU-13026 lnet: MR selection of gateway ni
and
LU-12919 lnet: Fix source specified route selection

LU-12919 patch relied on lnet_find_best_lpni_on_net() to restrict
lpni selection on a specific network. However, it is necessary
to allow lpni selection on any network if the src net is not
specified. LU-13026 removed the restriction imposed by
lnet_find_best_lpni_on_net(), which broke the restriction
on the source net selection in some configuration setups.

This patch renames lnet_find_best_lpni_on_net() to
lnet_find_best_lpni(). If passed a peer_net it will find the
best lpni on the peer_net or return NULL if none is available.
If passed 'any' net, then it'll find the best reachable lpni
on any available net.

Fixes: e5614b45793 ("LU-13026 lnet: MR selection of gateway ni")
Fixes: f0aa632d425 ("LU-12919 lnet: Fix source specified route selection")
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Ia2a655a6efcbdd1ac067bd622b030bb677b813cd
Reviewed-on: https://review.whamcloud.com/38298
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c