public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [for-2.6.34] rdma/cm: set num_paths when manually assigning path records
@ 2010-03-25 19:12 Sean Hefty
       [not found] ` <3946EFA63D2D4C2A93F45CF7CD715B5C-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Hefty @ 2010-03-25 19:12 UTC (permalink / raw)
  To: linux-rdma, Roland Dreier

When manually assigning the path records to use for a connection,
save the number of paths that were saved.  Otherwise, checks
against num_path will show 0, even though path record data is
available.

This was discovered by manually setting the path records from
user space, then querying the kernel to see if the correct
path records were assigned, only to discover that the kernel
returned 0 path records to the query.

Signed-off-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 drivers/infiniband/core/cma.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 42d51b5..38906f2 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1783,6 +1783,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id,
 	}
 
 	memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
+	id->route.num_paths = num_paths;
 	return 0;
 err:
 	cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [for-2.6.34] rdma/cm: set num_paths when manually assigning path records
       [not found] ` <3946EFA63D2D4C2A93F45CF7CD715B5C-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
@ 2010-04-07 21:14   ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2010-04-07 21:14 UTC (permalink / raw)
  To: Sean Hefty; +Cc: linux-rdma

thanks, applied
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-07 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 19:12 [PATCH] [for-2.6.34] rdma/cm: set num_paths when manually assigning path records Sean Hefty
     [not found] ` <3946EFA63D2D4C2A93F45CF7CD715B5C-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-04-07 21:14   ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox