During the first sweep we don't have yet dest physp object

Signed-off-by: Alex Netes <[email protected]>
---
 opensm/osm_req.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/opensm/osm_req.c b/opensm/osm_req.c
index 8ec4ac6..f9ffc81 100644
--- a/opensm/osm_req.c
+++ b/opensm/osm_req.c
@@ -93,7 +93,7 @@ static ib_net64_t req_determine_mkey(IN osm_sm_t * sm,
                p_physp = p_sm_port->p_physp;
        }
 
-       for (hop = 1; 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;
@@ -103,6 +103,8 @@ static ib_net64_t req_determine_mkey(IN osm_sm_t * sm,
                p_node = osm_physp_get_node_ptr(p_physp);
        }
 
+       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
           last hop, or NULL if we don't know it.
        */
-- 
1.7.1

--
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

Reply via email to