Skip to contentSkip to conversation

opensm/osm_req.c: In req_determine_mkey, fix DR algorithm

PATCH In review Hal Rosenstock 2 participants 2 messages Dec 3, 2012 – Jan 30, 2013 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 opensm/osm_req.c: In req_determine_mkey, fix DR algorithm

so that it works regardless of SM port type
Now works on switch port 0 as well as CA and router ports

---
 opensm/osm_req.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
opensm/osm_req.c +8 -4
index 1f5db3f..b48be48 100644
@@ -87,16 +87,20 @@ static ib_net64_t req_determine_mkey(IN osm_sm_t * sm,
 		goto Remote_Guid;
 	}
 
-	if (p_sm_port)
+	if (p_sm_port) {
+		/* get the node for the SM */
+		p_node = p_sm_port->p_node;
 		p_physp = p_sm_port->p_physp;
+	}
 
-	/* hop_count == 1: outgoing physp is SM physp */
-	for (hop = 2; p_physp && hop <= p_path->hop_count; hop++) {
+	for (hop = 1; p_physp && hop <= p_path->hop_count; hop++) {
+		p_physp = osm_node_get_physp_ptr(p_node, p_path->path[hop]);
+		if (!p_physp)
+			break;
 		p_physp = p_physp->p_remote_physp;
 		if (!p_physp)
 			break;
 		p_node = p_physp->p_node;
-		p_physp = osm_node_get_physp_ptr(p_node, p_path->path[hop]);
 	}
 
 	/* At this point, p_physp points at the outgoing physp on the
Signature · 6 lines
1.7.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 50BCC458.1030305-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org