Version: 1
-Previous: 1f8c5066e13f4a2cbe43f2355445ee7ed9ba76b6
-Head: 2881e8cd99b0a71921b86fb1235b822a270b06b9
+Previous: 41eb422debae676edf51983ea7b0f631d6a40934
+Head: 88f3d1b829978da812f29ea664b7976c76bf8846
Applied:
verbs-ext: 6fbf2b29ca68fc10b7ee47dc0c09f54db0b32320
compat-ex: fb8aa3e0b8ed628564d7d774907fd17a72a23522
xrcd: 71fa003681345f671bdef05c9548263252e949de
srq_ex: 2881e8cd99b0a71921b86fb1235b822a270b06b9
+ refresh-temp: 88f3d1b829978da812f29ea664b7976c76bf8846
Unapplied:
xrc_qp: 71de751ac24904a7170258c7ce63c739d28c7a05
Hidden:
--- /dev/null
+Bottom: 115158d16c82c271835675f3638359c45d2b1ab8
+Top: 11941897032eb87737493328f3f37b7c3a43ee9c
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2012-09-17 21:18:26 -0700
+
+Refresh of srq_ex
+
+---
+
+diff --git a/src/verbs.c b/src/verbs.c
+index d08ee79..0964ccc 100644
+--- a/src/verbs.c
++++ b/src/verbs.c
+@@ -382,41 +382,25 @@ void __ibv_ack_cq_events(struct ibv_cq *cq, unsigned int nevents)
+ }
+ default_symver(__ibv_ack_cq_events, ibv_ack_cq_events);
+
+-struct ibv_srq *__ibv_create_srq(struct ibv_pd *pd,
+- struct ibv_srq_init_attr *srq_init_attr)
+-{
+- struct ibv_srq *srq;
+-
+- if (!pd->context->ops.create_srq)
+- return NULL;
+-
+- srq = pd->context->ops.create_srq(pd, srq_init_attr);
+- if (srq) {
+- srq->context = pd->context;
+- srq->srq_context = srq_init_attr->srq_context;
+- srq->pd = pd;
+- srq->events_completed = 0;
+- pthread_mutex_init(&srq->mutex, NULL);
+- pthread_cond_init(&srq->cond, NULL);
+- }
+-
+- return srq;
+-}
+-default_symver(__ibv_create_srq, ibv_create_srq);
+-
+ struct ibv_srq *__ibv_create_srq_ex(struct ibv_pd *pd,
+ struct ibv_srq_init_attr_ex *srq_init_attr_ex)
+ {
+ struct verbs_context *context_ex = verbs_get_ctx(pd->context);
+ struct ibv_srq *srq;
+
+- if (!context_ex->create_srq_ex ||
+- srq_init_attr_ex->comp_mask >= IBV_SRQ_INIT_ATTR_RESERVED) {
+- errno = ENOSYS;
+- return NULL;
++ if (srq_init_attr_ex->comp_mask) {
++ if (!context_ex->create_srq_ex ||
++ srq_init_attr_ex->comp_mask >= IBV_SRQ_INIT_ATTR_RESERVED) {
++ errno = ENOSYS;
++ return NULL;
++ }
++
++ srq = context_ex->create_srq_ex(pd, srq_init_attr_ex);
++ } else {
++ srq = pd->context->ops.create_srq(pd, (struct ibv_srq_init_attr *)
++ srq_init_attr_ex);
+ }
+
+- srq = context_ex->create_srq_ex(pd, srq_init_attr_ex);
+ if (srq) {
+ srq->context = pd->context;
+ srq->srq_context = srq_init_attr_ex->srq_context;
+@@ -442,6 +426,17 @@ struct ibv_srq *__ibv_create_srq_ex(struct ibv_pd *pd,
+ }
+ default_symver(__ibv_create_srq_ex, ibv_create_srq_ex);
+
++struct ibv_srq *__ibv_create_srq(struct ibv_pd *pd,
++ struct ibv_srq_init_attr *srq_init_attr)
++{
++ struct ibv_srq_init_attr_ex srq_init_attr_ex;
++
++ memcpy(&srq_init_attr_ex, srq_init_attr, sizeof *srq_init_attr);
++ srq_init_attr_ex.comp_mask = 0;
++ return ibv_create_srq_ex(pd, &srq_init_attr_ex);
++}
++default_symver(__ibv_create_srq, ibv_create_srq);
++
+ int __ibv_modify_srq(struct ibv_srq *srq,
+ struct ibv_srq_attr *srq_attr,
+ int srq_attr_mask)