Commit 42690246 authored by Chuck Lever's avatar Chuck Lever Committed by Jason Gunthorpe

RDMA/core: Document CM @event_handler function

Code audit suggests that the RDMA CM event handler callback function is
_always_ invoked in a context that is safe to block. That's important for
consumer implementers to know, so document that in the comment before
rdma_create_id (where the handler function is set up by the consumer).
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 27399350
...@@ -152,7 +152,11 @@ struct rdma_cm_id *__rdma_create_id(struct net *net, ...@@ -152,7 +152,11 @@ struct rdma_cm_id *__rdma_create_id(struct net *net,
* @ps: RDMA port space. * @ps: RDMA port space.
* @qp_type: type of queue pair associated with the id. * @qp_type: type of queue pair associated with the id.
* *
* The id holds a reference on the network namespace until it is destroyed. * Returns a new rdma_cm_id. The id holds a reference on the network
* namespace until it is destroyed.
*
* The event handler callback serializes on the id's mutex and is
* allowed to sleep.
*/ */
#define rdma_create_id(net, event_handler, context, ps, qp_type) \ #define rdma_create_id(net, event_handler, context, ps, qp_type) \
__rdma_create_id((net), (event_handler), (context), (ps), (qp_type), \ __rdma_create_id((net), (event_handler), (context), (ps), (qp_type), \
......
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