]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 21:13:39 +0000 (14:13 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 21:13:39 +0000 (14:13 -0700)
meta
patches/open_qp
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index d5ab7aac97155277c2bbdfc2444a02030f445b8c..139192d3f90b1f7ecd30b1a9e4f8da7a8aabb320 100644 (file)
--- a/meta
+++ b/meta
@@ -1,13 +1,12 @@
 Version: 1
-Previous: 817586ec3cbf34aa9f5ed4db5d202eed89a49e6d
-Head: 20918b0e2de8a59ff6e49437617426b4d89aec18
+Previous: d77b44df5d85700e00b80a18e3bfae6b48b8016b
+Head: 11a9a8325dd527b7722190e2127cd7359ff29a94
 Applied:
   verbs-ext: b3d744f488bc97442df7e6cef8536d3b0352a786
   xrcd: 07cc711dd4091666de3c99545c64578ce6472da7
   srq_ex: 9698473fabcdee089e866558fb1bfc9dbc867609
   xrc_qp: db63132ca115254044900ae234e123e8c963e8ee
-  open_qp: c5fee3d4706c13375b5aab3edd138e0f1e4ff29b
-  refresh-temp: 20918b0e2de8a59ff6e49437617426b4d89aec18
+  open_qp: 11a9a8325dd527b7722190e2127cd7359ff29a94
 Unapplied:
   compat-ex: 81b9e1927e19f096b0c34a461b5a0f102b672d43
   open_qp_man: 6cf6dc5761417ce54613251a1f16131b443da5ca
index a2ac59adfb140ae339927454b175f26d995cce53..69612b126ec607dae62ec430bc005eae045eb6f1 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: b66e97fee148aae0ef83ec03c25a6d56d444f6ea
-Top:    6959e49c2b6f7ac0f35d98c0dccbcba4838f0d5d
+Top:    1a16e3381c4b7dbc2761fffbde96a85542425f8d
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2012-09-19 09:19:59 -0700
 
@@ -17,15 +17,15 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 ---
 
 diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
-index 6afd93b..b47a510 100644
+index 6afd93b..7c551b8 100644
 --- a/include/infiniband/driver.h
 +++ b/include/infiniband/driver.h
 @@ -164,6 +164,10 @@ int ibv_cmd_create_qp_ex(struct verbs_context *context,
                         struct verbs_qp *qp, struct ibv_qp_init_attr_ex *attr_ex,
                         struct ibv_create_qp *cmd, size_t cmd_size,
                         struct ibv_create_qp_resp *resp, size_t resp_size);
-+int ibv_cmd_open_qp(struct ibv_xrcd *xrcd,
-+                  struct ibv_qp *qp, struct ibv_qp_open_attr *attr,
++int ibv_cmd_open_qp(struct verbs_xrcd *xrcd,
++                  struct verbs_qp *qp, struct ibv_qp_open_attr *attr,
 +                  struct ibv_open_qp *cmd, size_t cmd_size,
 +                  struct ibv_create_qp_resp *resp, size_t resp_size);
  int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *qp_attr,
@@ -77,7 +77,7 @@ index b6d5ce9..e24fa4f 100644
  
  struct ibv_destroy_cq_v1 {
 diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
-index 799822d..3c4cbe8 100644
+index 799822d..d0c3e1d 100644
 --- a/include/infiniband/verbs.h
 +++ b/include/infiniband/verbs.h
 @@ -484,6 +484,20 @@ struct ibv_qp_init_attr_ex {
@@ -120,28 +120,36 @@ index 799822d..3c4cbe8 100644
        struct ibv_qp *         (*create_qp_ex)(struct ibv_context *context,
                                                struct ibv_qp_init_attr_ex *qp_init_attr_ex);
        uint32_t                (*get_srq_num)(struct ibv_srq *srq);
-@@ -1160,6 +1177,12 @@ ibv_create_qp_ex(struct ibv_context *context, struct ibv_qp_init_attr_ex *qp_ini
+@@ -1160,6 +1177,20 @@ ibv_create_qp_ex(struct ibv_context *context, struct ibv_qp_init_attr_ex *qp_ini
  }
  
  /**
 + * ibv_open_qp - Open a shareable queue pair.
 + */
-+struct ibv_qp *ibv_open_qp(struct ibv_xrcd *xrcd,
-+                         struct ibv_qp_open_attr *qp_open_attr);
++static inline struct ibv_qp *
++ibv_open_qp(struct ibv_xrcd *xrcd, struct ibv_qp_open_attr *qp_open_attr);
++{
++      struct verbs_context *vctx = verbs_get_ctx_op(xrcd->context, open_qp);
++      if (!vctx) {
++              errno = ENOSYS;
++              return NULL;
++      }
++      return vctx->open_qp(context, qp_open_attr);
++}
 +
 +/**
   * ibv_modify_qp - Modify a queue pair.
   */
  int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 diff --git a/src/cmd.c b/src/cmd.c
-index 3bde238..75afdc2 100644
+index 3bde238..da13177 100644
 --- a/src/cmd.c
 +++ b/src/cmd.c
-@@ -797,6 +797,28 @@ int ibv_cmd_create_qp(struct ibv_pd *pd,
+@@ -797,6 +797,41 @@ int ibv_cmd_create_qp(struct ibv_pd *pd,
        return 0;
  }
  
-+int ibv_cmd_open_qp(struct ibv_xrcd *xrcd, struct ibv_qp *qp,
++int ibv_cmd_open_qp(struct verbs_xrcd *xrcd, struct verbs_qp *qp,
 +                  struct ibv_qp_open_attr *attr,
 +                  struct ibv_open_qp *cmd, size_t cmd_size,
 +                  struct ibv_create_qp_resp *resp, size_t resp_size)
@@ -158,7 +166,20 @@ index 3bde238..75afdc2 100644
 +
 +      VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
 +
-+      qp->handle     = resp->qp_handle;
++      qp->qp.handle     = resp->qp_handle;
++      qp->qp.context    = xrcd->xrcd.context;
++      qp->qp.qp_context = qp_open_attr->qp_context;
++      qp->qp.pd         = NULL;
++      qp->qp.send_cq    = qp->qp.recv_cq = NULL;
++      qp->qp.srq        = NULL;
++      qp->qp.qp_num     = qp_open_attr->qp_num;
++      qp->qp.qp_type    = qp_open_attr->qp_type;
++      qp->qp.state      = IBV_QPS_UNKNOWN;
++      qp->qp.events_completed = 0;
++      pthread_mutex_init(&qp->qp.mutex, NULL);
++      pthread_cond_init(&qp->qp.cond, NULL);
++      qp->comp_mask     = IBV_QP_XRCD;
++      qp->xrcd          = xrcd;
 +
 +      return 0;
 +}
@@ -167,61 +188,13 @@ index 3bde238..75afdc2 100644
                     int attr_mask,
                     struct ibv_qp_init_attr *init_attr,
 diff --git a/src/libibverbs.map b/src/libibverbs.map
-index 4249793..c9b29c6 100644
+index 4249793..5ad8312 100644
 --- a/src/libibverbs.map
 +++ b/src/libibverbs.map
-@@ -102,5 +102,7 @@ IBVERBS_1.1 {
+@@ -102,5 +102,6 @@ IBVERBS_1.1 {
                ibv_cmd_close_xrcd;
                ibv_cmd_create_srq_ex;
                ibv_cmd_create_qp_ex;
-+              ibv_open_qp;
 +              ibv_cmd_open_qp;
                
  } IBVERBS_1.0;
-diff --git a/src/verbs.c b/src/verbs.c
-index b5938f2..dbb2210 100644
---- a/src/verbs.c
-+++ b/src/verbs.c
-@@ -418,6 +418,42 @@ struct ibv_qp *__ibv_create_qp(struct ibv_pd *pd,
- }
- default_symver(__ibv_create_qp, ibv_create_qp);
-+struct ibv_qp *__ibv_open_qp(struct ibv_xrcd *xrcd,
-+                           struct ibv_qp_open_attr *qp_open_attr)
-+{
-+      struct verbs_context *context_ex;
-+      struct ibv_qp *qp;
-+
-+      context_ex = verbs_get_ctx(xrcd->context);
-+      if (!context_ex->open_qp ||
-+          qp_open_attr->comp_mask >= IBV_QP_OPEN_ATTR_RESERVED) {
-+              errno = ENOSYS;
-+              return NULL;
-+      }
-+
-+      qp = context_ex->open_qp(xrcd, qp_open_attr);
-+      if (qp) {
-+              qp->context    = xrcd->context;
-+              qp->qp_context = qp_open_attr->qp_context;
-+
-+              qp->pd = NULL;
-+              qp->send_cq = qp->recv_cq = NULL;
-+              qp->srq = NULL;
-+              qp->comp_mask |= IBV_QP_XRCD;
-+              qp->xrcd = xrcd;
-+
-+              qp->qp_num  = qp_open_attr->qp_num;
-+              qp->qp_type = qp_open_attr->qp_type;
-+              qp->state   = IBV_QPS_UNKNOWN;
-+              qp->events_completed = 0;
-+              pthread_mutex_init(&qp->mutex, NULL);
-+              pthread_cond_init(&qp->cond, NULL);
-+      }
-+
-+      return qp;
-+}
-+default_symver(__ibv_open_qp, ibv_open_qp);
-+
- int __ibv_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
-                  int attr_mask,
-                  struct ibv_qp_init_attr *init_attr)
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index be26197..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-Bottom: 6959e49c2b6f7ac0f35d98c0dccbcba4838f0d5d
-Top:    1a16e3381c4b7dbc2761fffbde96a85542425f8d
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2012-09-26 14:13:38 -0700
-
-Refresh of open_qp
-
----
-
-diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
-index b47a510..7c551b8 100644
---- a/include/infiniband/driver.h
-+++ b/include/infiniband/driver.h
-@@ -164,8 +164,8 @@ int ibv_cmd_create_qp_ex(struct verbs_context *context,
-                        struct verbs_qp *qp, struct ibv_qp_init_attr_ex *attr_ex,
-                        struct ibv_create_qp *cmd, size_t cmd_size,
-                        struct ibv_create_qp_resp *resp, size_t resp_size);
--int ibv_cmd_open_qp(struct ibv_xrcd *xrcd,
--                  struct ibv_qp *qp, struct ibv_qp_open_attr *attr,
-+int ibv_cmd_open_qp(struct verbs_xrcd *xrcd,
-+                  struct verbs_qp *qp, struct ibv_qp_open_attr *attr,
-                   struct ibv_open_qp *cmd, size_t cmd_size,
-                   struct ibv_create_qp_resp *resp, size_t resp_size);
- int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *qp_attr,
-diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
-index 3c4cbe8..d0c3e1d 100644
---- a/include/infiniband/verbs.h
-+++ b/include/infiniband/verbs.h
-@@ -1179,8 +1179,16 @@ ibv_create_qp_ex(struct ibv_context *context, struct ibv_qp_init_attr_ex *qp_ini
- /**
-  * ibv_open_qp - Open a shareable queue pair.
-  */
--struct ibv_qp *ibv_open_qp(struct ibv_xrcd *xrcd,
--                         struct ibv_qp_open_attr *qp_open_attr);
-+static inline struct ibv_qp *
-+ibv_open_qp(struct ibv_xrcd *xrcd, struct ibv_qp_open_attr *qp_open_attr);
-+{
-+      struct verbs_context *vctx = verbs_get_ctx_op(xrcd->context, open_qp);
-+      if (!vctx) {
-+              errno = ENOSYS;
-+              return NULL;
-+      }
-+      return vctx->open_qp(context, qp_open_attr);
-+}
- /**
-  * ibv_modify_qp - Modify a queue pair.
-diff --git a/src/cmd.c b/src/cmd.c
-index 75afdc2..da13177 100644
---- a/src/cmd.c
-+++ b/src/cmd.c
-@@ -797,7 +797,7 @@ int ibv_cmd_create_qp(struct ibv_pd *pd,
-       return 0;
- }
--int ibv_cmd_open_qp(struct ibv_xrcd *xrcd, struct ibv_qp *qp,
-+int ibv_cmd_open_qp(struct verbs_xrcd *xrcd, struct verbs_qp *qp,
-                   struct ibv_qp_open_attr *attr,
-                   struct ibv_open_qp *cmd, size_t cmd_size,
-                   struct ibv_create_qp_resp *resp, size_t resp_size)
-@@ -814,7 +814,20 @@ int ibv_cmd_open_qp(struct ibv_xrcd *xrcd, struct ibv_qp *qp,
-       VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
--      qp->handle     = resp->qp_handle;
-+      qp->qp.handle     = resp->qp_handle;
-+      qp->qp.context    = xrcd->xrcd.context;
-+      qp->qp.qp_context = qp_open_attr->qp_context;
-+      qp->qp.pd         = NULL;
-+      qp->qp.send_cq    = qp->qp.recv_cq = NULL;
-+      qp->qp.srq        = NULL;
-+      qp->qp.qp_num     = qp_open_attr->qp_num;
-+      qp->qp.qp_type    = qp_open_attr->qp_type;
-+      qp->qp.state      = IBV_QPS_UNKNOWN;
-+      qp->qp.events_completed = 0;
-+      pthread_mutex_init(&qp->qp.mutex, NULL);
-+      pthread_cond_init(&qp->qp.cond, NULL);
-+      qp->comp_mask     = IBV_QP_XRCD;
-+      qp->xrcd          = xrcd;
-       return 0;
- }
-diff --git a/src/libibverbs.map b/src/libibverbs.map
-index c9b29c6..5ad8312 100644
---- a/src/libibverbs.map
-+++ b/src/libibverbs.map
-@@ -102,7 +102,6 @@ IBVERBS_1.1 {
-               ibv_cmd_close_xrcd;
-               ibv_cmd_create_srq_ex;
-               ibv_cmd_create_qp_ex;
--              ibv_open_qp;
-               ibv_cmd_open_qp;
-               
- } IBVERBS_1.0;
-diff --git a/src/verbs.c b/src/verbs.c
-index dbb2210..b5938f2 100644
---- a/src/verbs.c
-+++ b/src/verbs.c
-@@ -418,42 +418,6 @@ struct ibv_qp *__ibv_create_qp(struct ibv_pd *pd,
- }
- default_symver(__ibv_create_qp, ibv_create_qp);
--struct ibv_qp *__ibv_open_qp(struct ibv_xrcd *xrcd,
--                           struct ibv_qp_open_attr *qp_open_attr)
--{
--      struct verbs_context *context_ex;
--      struct ibv_qp *qp;
--
--      context_ex = verbs_get_ctx(xrcd->context);
--      if (!context_ex->open_qp ||
--          qp_open_attr->comp_mask >= IBV_QP_OPEN_ATTR_RESERVED) {
--              errno = ENOSYS;
--              return NULL;
--      }
--
--      qp = context_ex->open_qp(xrcd, qp_open_attr);
--      if (qp) {
--              qp->context    = xrcd->context;
--              qp->qp_context = qp_open_attr->qp_context;
--
--              qp->pd = NULL;
--              qp->send_cq = qp->recv_cq = NULL;
--              qp->srq = NULL;
--              qp->comp_mask |= IBV_QP_XRCD;
--              qp->xrcd = xrcd;
--
--              qp->qp_num  = qp_open_attr->qp_num;
--              qp->qp_type = qp_open_attr->qp_type;
--              qp->state   = IBV_QPS_UNKNOWN;
--              qp->events_completed = 0;
--              pthread_mutex_init(&qp->mutex, NULL);
--              pthread_cond_init(&qp->cond, NULL);
--      }
--
--      return qp;
--}
--default_symver(__ibv_open_qp, ibv_open_qp);
--
- int __ibv_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
-                  int attr_mask,
-                  struct ibv_qp_init_attr *init_attr)