Whamcloud - gitweb
LU-12955 lnet: fix routed final dest selection 16/36916/9
authorAmir Shehata <ashehata@whamcloud.com>
Fri, 29 Nov 2019 04:51:27 +0000 (20:51 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Mar 2020 05:15:34 +0000 (05:15 +0000)
commit8cedafff9d46c8067385d698b645bb1d0343cd57
tree8bd76fc6b3a5e20e6c027c052b118c0f80f6146a
parented2c88b78c88b13f9cbcb3430909350915363ae5
LU-12955 lnet: fix routed final dest selection

The final hop gateway should rely on the message initiator to
select the final destination NID. IE if gateway is handing off
the message to the final destination, always use the NID provided
in the message.

If the initiator has discovery off, then it'll always pick the
same destination NID.

Otherwise if the initiator has discovery on && there exists a route to
each of the interfaces on the destination, the initiator will select
these interfaces in round robin

This will work for both single-hop and multi-hop cases. The logic
on the routers will be:

if destination NID in the message is local then
   send the message to the destination NID
else if destination NID is remote && there exists a route
   if router is MR then
      select NI according to selection criteria

Test-parameters: trivial

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Ifd8dd65fe7695d69609ac4c1af5102429d8aa379
Reviewed-on: https://review.whamcloud.com/36916
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c