aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2011-05-23 16:31:36 -0700
committerRoland Dreier <roland@purestorage.com>2011-10-13 09:13:26 -0700
commit96104eda01695a26da2c8f7423ec0ba3509c8c97 (patch)
tree04e38bfe564245ebd9a62738d54a111b2d24da4a /drivers/infiniband/core
parent59991f94eb32e954aa767f659eb642461e9e8b37 (diff)
RDMA/core: Add SRQ type field
Currently, there is only a single ("basic") type of SRQ, but with XRC support we will add a second. Prepare for this by defining an SRQ type and setting all current users to IB_SRQT_BASIC. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c1
-rw-r--r--drivers/infiniband/core/verbs.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index c42699285f8..48d21d09afe 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -2013,6 +2013,7 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file,
attr.event_handler = ib_uverbs_srq_event_handler;
attr.srq_context = file;
+ attr.srq_type = IB_SRQT_BASIC;
attr.attr.max_wr = cmd.max_wr;
attr.attr.max_sge = cmd.max_sge;
attr.attr.srq_limit = cmd.srq_limit;
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 5e03ab78fc8..cbe85ddaf89 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -250,6 +250,7 @@ struct ib_srq *ib_create_srq(struct ib_pd *pd,
srq->uobject = NULL;
srq->event_handler = srq_init_attr->event_handler;
srq->srq_context = srq_init_attr->srq_context;
+ srq->srq_type = srq_init_attr->srq_type;
atomic_inc(&pd->usecnt);
atomic_set(&srq->usecnt, 0);
}