opensm/osm_req.c: In req_determine_mkey, fix DR algorithm
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
@@ -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
Hi Hal,
Quoted 6 lines · Hal Rosenstock
so that it works regardless of SM port type
Now works on switch port 0 as well as CA and router ports---
Applied the series, thanks.
--
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