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>