summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/srq.c
diff options
context:
space:
mode:
authorDennis Dalessandro2016-02-14 21:10:29 +0100
committerDoug Ledford2016-03-11 02:38:08 +0100
commit90793f7179478df19ac4b2244cfd9764b28e4b38 (patch)
treecdbad7af7b4899bade80236891d381e8fd310c47 /drivers/infiniband/sw/rdmavt/srq.c
parentstaging/rdma/hfi1: Put QPs into error state after SL->SC table changes (diff)
downloadkernel-qcow2-linux-90793f7179478df19ac4b2244cfd9764b28e4b38.tar.gz
kernel-qcow2-linux-90793f7179478df19ac4b2244cfd9764b28e4b38.tar.xz
kernel-qcow2-linux-90793f7179478df19ac4b2244cfd9764b28e4b38.zip
IB/rdmavt: Clean up comments and add more documentation
Add, remove, and otherwise clean up existing comments that are leftover from the initial code postings of rdmavt. Many of the comments were added to provide an idea on the direction we were thinking of going. Now that the design is solidified make a pass over and clean everything up. Also add details where lacking. Ensure all non static functions have nano comments. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/srq.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/srq.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/srq.c b/drivers/infiniband/sw/rdmavt/srq.c
index 4960a89f91b2..98c492797c53 100644
--- a/drivers/infiniband/sw/rdmavt/srq.c
+++ b/drivers/infiniband/sw/rdmavt/srq.c
@@ -51,7 +51,10 @@
#include "srq.h"
-/*
+/**
+ * rvt_driver_srq_init - init srq resources on a per driver basis
+ * @rdi: rvt dev structure
+ *
* Do any initialization needed when a driver registers with rdmavt.
*/
void rvt_driver_srq_init(struct rvt_dev_info *rdi)
@@ -65,6 +68,8 @@ void rvt_driver_srq_init(struct rvt_dev_info *rdi)
* @ibpd: the protection domain of the SRQ to create
* @srq_init_attr: the attributes of the SRQ
* @udata: data from libibverbs when creating a user SRQ
+ *
+ * Return: Allocated srq object
*/
struct ib_srq *rvt_create_srq(struct ib_pd *ibpd,
struct ib_srq_init_attr *srq_init_attr,
@@ -168,6 +173,8 @@ bail_srq:
* @attr: the new attributes of the SRQ
* @attr_mask: indicates which attributes to modify
* @udata: user data for libibverbs.so
+ *
+ * Return: 0 on success
*/
int rvt_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
enum ib_srq_attr_mask attr_mask,
@@ -305,6 +312,12 @@ bail_free:
return ret;
}
+/** rvt_query_srq - query srq data
+ * @ibsrq: srq to query
+ * @attr: return info in attr
+ *
+ * Return: always 0
+ */
int rvt_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
{
struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
@@ -315,6 +328,12 @@ int rvt_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
return 0;
}
+/**
+ * rvt_destroy_srq - destory an srq
+ * @ibsrq: srq object to destroy
+ *
+ * Return always 0
+ */
int rvt_destroy_srq(struct ib_srq *ibsrq)
{
struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);