summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2010-03-25 19:12:36 +0000
committerRoland Dreier <rolandd@cisco.com>2010-04-07 14:13:22 -0700
commitae2d9293d7cfba70f44f59cfedb44122828c73b8 (patch)
treecd894c7c14c5cb0b8860873c1d4272747c9403db /drivers/infiniband
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
downloadlinux-3.10-ae2d9293d7cfba70f44f59cfedb44122828c73b8.tar.gz
linux-3.10-ae2d9293d7cfba70f44f59cfedb44122828c73b8.tar.bz2
linux-3.10-ae2d9293d7cfba70f44f59cfedb44122828c73b8.zip
RDMA/cm: Set num_paths when manually assigning path records
When manually assigning the path records to use for a connection, save the number of paths that were set. 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@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 875e34e0b23..09b4b13fdbe 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1683,6 +1683,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);