[lustre-devel] [PATCH 06/12] lnet: Fix source specified send to different net
James Simmons
jsimmons at infradead.org
Sun Dec 12 07:07:57 PST 2021
From: Chris Horn <chris.horn at hpe.com>
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
WC-bug-id: https://jira.whamcloud.com/browse/LU-14940
Lustre-commit: 3e3563f719ce89de2 ("LU-14940 lnet: Fix source specified send to different net")
Signed-off-by: Chris Horn <chris.horn at hpe.com>
Reviewed-on: https://review.whamcloud.com/44728
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
net/lnet/lnet/lib-move.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c
index 088a754..a411724 100644
--- a/net/lnet/lnet/lib-move.c
+++ b/net/lnet/lnet/lib-move.c
@@ -2733,15 +2733,19 @@ struct lnet_ni *
/* 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))
--
1.8.3.1
More information about the lustre-devel
mailing list