]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
RDMA/core: Document CM @event_handler function
authorChuck Lever <chuck.lever@oracle.com>
Tue, 4 Sep 2018 15:45:14 +0000 (11:45 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Sep 2018 15:21:36 +0000 (09:21 -0600)
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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/rdma/rdma_cm.h

index 5d71a7f51a9f6dba8ce087b86a5ba41215d5d22e..53d93c7d8e0148db988ba6fd09045ec5efeb364c 100644 (file)
@@ -152,7 +152,11 @@ struct rdma_cm_id *__rdma_create_id(struct net *net,
  * @ps: RDMA port space.
  * @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) \
        __rdma_create_id((net), (event_handler), (context), (ps), (qp_type), \