The destination NI is fixed for all source-specified sends. Thus, in
order for a source-specified send to be considered "local", i.e. a
send that does not require a route, the destination NID must be on
the same net as the specified source.
HPE-bug-id: LUS-10303
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I4847db1d393bbc36def65123f260b928ebbf944e
Reviewed-on: https://review.whamcloud.com/44728
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/*
* Identify the different send cases
*/
- if (src_nid == LNET_NID_ANY)
+ if (src_nid == LNET_NID_ANY) {
send_case |= SRC_ANY;
- else
+ if (lnet_get_net_locked(LNET_NIDNET(dst_nid)))
+ send_case |= LOCAL_DST;
+ else
+ send_case |= REMOTE_DST;
+ } else {
send_case |= SRC_SPEC;
-
- if (lnet_get_net_locked(LNET_NIDNET(dst_nid)))
- send_case |= LOCAL_DST;
- else
- send_case |= REMOTE_DST;
+ if (LNET_NIDNET(src_nid) == LNET_NIDNET(dst_nid))
+ send_case |= LOCAL_DST;
+ else
+ send_case |= REMOTE_DST;
+ }
final_hop = false;
if (msg->msg_routing && (send_case & LOCAL_DST))
npings=$(($npings * 2))
done
+ # Ping from nid1 to nid2 should fail
+ do_lnetctl ping --source $nid1 $nid2 &&
+ error "ping from $nid1 to $nid2 should fail"
+
+ # Ping from nid2 to nid1 should fail
+ do_lnetctl ping --source $nid2 $nid1 &&
+ error "ping from $nid2 to $nid1 should fail"
+
return 0
}
run_test 215 "Test lnetctl ping --source option"