Commit ae2d9293 authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier

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: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b72c4094
...@@ -1683,6 +1683,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id, ...@@ -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); memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
id->route.num_paths = num_paths;
return 0; return 0;
err: err:
cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED); cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment