]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 00:06:45 +0000 (17:06 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 00:06:45 +0000 (17:06 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 23cdbe07c5a1927a15f021e8da1f34b256b27ece..a4af8b58d9c63463edee41a0f519c46481c89527 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,10 @@
 Version: 1
-Previous: 31ffda5bc8460bc2add9c08197f60e7dbce3d251
-Head: db97a56a3eb222bd2ffb9f80837046ebc5b460d5
+Previous: a8957df45e38469bb572c0ba9fba2aadb31b0ca2
+Head: 1c14a1be69449d063fe8bb1c9b346b72fcf68f5c
 Applied:
   verbs-ext: b3d744f488bc97442df7e6cef8536d3b0352a786
   xrcd: db97a56a3eb222bd2ffb9f80837046ebc5b460d5
+  refresh-temp: 1c14a1be69449d063fe8bb1c9b346b72fcf68f5c
 Unapplied:
   compat-ex: 7cb34472bd00bc286569b726c7d38c6dd0dfe3b0
   srq_ex: da1d11f2b334ccc50cbdbd0ddf15ec792a9f2ee3
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..e9f3e3b
--- /dev/null
@@ -0,0 +1,99 @@
+Bottom: 1fa77650f2788754537a66b65d04b92e0d2cf336
+Top:    a7eb036ce81df0952f752cdb37435c99fc278e0f
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2012-09-25 17:06:45 -0700
+
+Refresh of xrcd
+
+---
+
+diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
+index 317e725..186bcec 100644
+--- a/include/infiniband/verbs.h
++++ b/include/infiniband/verbs.h
+@@ -757,11 +757,10 @@ static inline struct verbs_context *verbs_get_ctx(
+       return container_of(ctx, struct verbs_context, context);
+ }
+-#define verbs_get_ctx_op(ctx, op) { \
+-      struct verbs_context *vctx = verbs_get_ctx(xrcd->context); \
+-      return (!vctx || \
+-              (vctx->sz < sizeof(*vctx) - offsetof(struct verbs_context, op)) || \
+-              !vctx->op) ? NULL : vctx; }
++#define verbs_get_ctx_op(ctx, op) ({ \
++      struct verbs_context *vctx = verbs_get_ctx(ctx); \
++      (!vctx || (vctx->sz < sizeof(*vctx) - offsetof(struct verbs_context, op)) || \
++       !vctx->op) ? NULL : vctx; })
+ static inline struct verbs_device *verbs_get_device(
+                                       const struct ibv_device *dev)
+@@ -882,7 +881,8 @@ int ibv_dealloc_pd(struct ibv_pd *pd);
+ /**
+  * ibv_open_xrcd - Open an extended connection domain
+  */
+-struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
++static inline struct ibv_xrcd *
++ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
+ {
+       struct verbs_context *vctx = verbs_get_ctx_op(context, open_xrcd);
+       return vctx ? vctx->open_xrcd(context, fd, oflags) : NULL;
+@@ -891,7 +891,7 @@ struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
+ /**
+  * ibv_close_xrcd - Close an extended connection domain
+  */
+-int ibv_close_xrcd(struct ibv_xrcd *xrcd)
++static inline int ibv_close_xrcd(struct ibv_xrcd *xrcd)
+ {
+       struct verbs_context *vctx = verbs_get_ctx(xrcd->context);
+       return vctx->close_xrcd(xrcd);
+diff --git a/src/cmd.c b/src/cmd.c
+index ae8a239..14ffbac 100644
+--- a/src/cmd.c
++++ b/src/cmd.c
+@@ -208,7 +208,7 @@ int ibv_cmd_open_xrcd(struct verbs_context *context, struct verbs_xrcd *xrcd,
+       VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
+-      xrcd->xrcd.context = context;
++      xrcd->xrcd.context = &context->context;
+       xrcd->comp_mask = IBV_XRCD_HANDLE;
+       xrcd->handle  = resp->xrcd_handle;
+diff --git a/src/verbs.c b/src/verbs.c
+index d2479e8..b5938f2 100644
+--- a/src/verbs.c
++++ b/src/verbs.c
+@@ -154,33 +154,6 @@ int __ibv_dealloc_pd(struct ibv_pd *pd)
+ }
+ default_symver(__ibv_dealloc_pd, ibv_dealloc_pd);
+-struct ibv_xrcd *__ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
+-{
+-      struct verbs_context *context_ex = verbs_get_ctx(context);
+-      struct verbs_xrcd *xrcd;
+-
+-      if (!context_ex->open_xrcd) {
+-              errno = ENOSYS;
+-              return NULL;
+-      }
+-
+-      xrcd = context_ex->open_xrcd(context, fd, oflags);
+-      if (xrcd)
+-              xrcd->xrcd.context = context;
+-
+-      return &xrcd.xrcd;
+-}
+-default_symver(__ibv_open_xrcd, ibv_open_xrcd);
+-
+-int __ibv_close_xrcd(struct ibv_xrcd *xrcd)
+-{
+-      struct verbs_context *context_ex = verbs_get_ctx(xrcd->context);
+-      struct verbs_xrcd *vxrcd = container_of(xrcd, struct verbs_xrcc, xrcd);
+-
+-      return context_ex->close_xrcd(vxrcd);
+-}
+-default_symver(__ibv_close_xrcd, ibv_close_xrcd);
+-
+ struct ibv_mr *__ibv_reg_mr(struct ibv_pd *pd, void *addr,
+                           size_t length, int access)
+ {