Skip to content

Commit ae2d929

Browse files
Sean HeftyRoland Dreier
authored andcommitted
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>
1 parent b72c409 commit ae2d929

File tree

1 file changed

+1
-0
lines changed
  • drivers/infiniband/core

1 file changed

+1
-0
lines changed

drivers/infiniband/core/cma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id,
16831683
}
16841684

16851685
memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
1686+
id->route.num_paths = num_paths;
16861687
return 0;
16871688
err:
16881689
cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);

0 commit comments

Comments
 (0)