+++ /dev/null
-Bottom: f67dd30619c82020cf45a3f4cd33ae7e5560bf9c
-Top: 26fbabe3d69eaf5e74b801809e905c98972c1df7
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2012-09-25 15:59:33 -0700
-
-Refresh of xrcd
-
----
-
-diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
-index 95e93c1..79ae6eb 100644
---- a/include/infiniband/verbs.h
-+++ b/include/infiniband/verbs.h
-@@ -736,9 +736,12 @@ struct verbs_context {
- int (*drv_new_func1) (); new corresponding provider call of func1
- int (*lib_new_func1) (); New library call func1
- */
-- struct verbs_xrcd * (*open_xrcd)(struct verbs_context *context,
-+ struct ibv_xrcd * (*open_xrcd)(struct ibv_context *context,
- int fd, int oflags);
-- int (*close_xrcd)(struct verbs_xrcd *xrcd);
-+// struct ibv_xrcd * (*lib_open_xrcd)(struct ibv_context *context,
-+// int fd, int oflags);
-+ int (*close_xrcd)(struct ibv_xrcd *xrcd);
-+// int (*lib_close_xrcd)(struct ibv_xrcd *xrcd);
- size_t sz; /* Set by library on struct allocation,must be
- * located right before struct ibv_context
- */
-@@ -873,12 +876,21 @@ 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);
-+struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
-+{
-+ struct verbs_context vctx = verbs_get_ctx(xrcd->context);
-+
-+ if (!vctx || vctx->sz
-+}
-
- /**
- * ibv_close_xrcd - Close an extended connection domain
- */
--int ibv_close_xrcd(struct ibv_xrcd *xrcd);
-+int ibv_close_xrcd(struct ibv_xrcd *xrcd)
-+{
-+ struct verbs_context vctx = verbs_get_ctx(xrcd->context);
-+ return vctx->close_xrcd(xrcd);
-+}
-
- /**
- * ibv_reg_mr - Register a memory region
-diff --git a/src/verbs.c b/src/verbs.c
-index f1fe37d..d2479e8 100644
---- a/src/verbs.c
-+++ b/src/verbs.c
-@@ -157,7 +157,7 @@ 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 ibv_xrcd *xrcd;
-+ struct verbs_xrcd *xrcd;
-
- if (!context_ex->open_xrcd) {
- errno = ENOSYS;
-@@ -166,17 +166,18 @@ struct ibv_xrcd *__ibv_open_xrcd(struct ibv_context *context, int fd, int oflags
-
- xrcd = context_ex->open_xrcd(context, fd, oflags);
- if (xrcd)
-- xrcd->context = context;
-+ xrcd->xrcd.context = context;
-
-- return xrcd;
-+ 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(xrcd);
-+ return context_ex->close_xrcd(vxrcd);
- }
- default_symver(__ibv_close_xrcd, ibv_close_xrcd);
Bottom: b2b2b839d978bb240b0641dff8459eaee9553d17
-Top: f67dd30619c82020cf45a3f4cd33ae7e5560bf9c
+Top: 26fbabe3d69eaf5e74b801809e905c98972c1df7
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2012-09-07 14:38:07 -0700
struct ibv_destroy_cq_v1 {
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
-index a2577d8..95e93c1 100644
+index a2577d8..79ae6eb 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -1,6 +1,6 @@
enum ibv_rereg_mr_flags {
IBV_REREG_MR_CHANGE_TRANSLATION = (1 << 0),
IBV_REREG_MR_CHANGE_PD = (1 << 1),
-@@ -728,11 +732,13 @@ struct ibv_context {
+@@ -728,11 +732,16 @@ struct ibv_context {
};
struct verbs_context {
int (*drv_new_func1) (); new corresponding provider call of func1
int (*lib_new_func1) (); New library call func1
*/
-+ struct verbs_xrcd * (*open_xrcd)(struct verbs_context *context,
++ struct ibv_xrcd * (*open_xrcd)(struct ibv_context *context,
+ int fd, int oflags);
-+ int (*close_xrcd)(struct verbs_xrcd *xrcd);
++// struct ibv_xrcd * (*lib_open_xrcd)(struct ibv_context *context,
++// int fd, int oflags);
++ int (*close_xrcd)(struct ibv_xrcd *xrcd);
++// int (*lib_close_xrcd)(struct ibv_xrcd *xrcd);
size_t sz; /* Set by library on struct allocation,must be
* located right before struct ibv_context
*/
-@@ -832,7 +838,7 @@ static inline int ___ibv_query_port(struct ibv_context *context,
+@@ -832,7 +841,7 @@ static inline int ___ibv_query_port(struct ibv_context *context,
uint8_t port_num,
struct ibv_port_attr *port_attr)
{
port_attr->link_layer = IBV_LINK_LAYER_UNSPECIFIED;
port_attr->reserved = 0;
-@@ -865,6 +871,16 @@ struct ibv_pd *ibv_alloc_pd(struct ibv_context *context);
+@@ -865,6 +874,25 @@ struct ibv_pd *ibv_alloc_pd(struct ibv_context *context);
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);
++struct ibv_xrcd *ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
++{
++ struct verbs_context vctx = verbs_get_ctx(xrcd->context);
++
++ if (!vctx || vctx->sz
++}
+
+/**
+ * ibv_close_xrcd - Close an extended connection domain
+ */
-+int ibv_close_xrcd(struct ibv_xrcd *xrcd);
++int ibv_close_xrcd(struct ibv_xrcd *xrcd)
++{
++ struct verbs_context vctx = verbs_get_ctx(xrcd->context);
++ return vctx->close_xrcd(xrcd);
++}
+
+/**
* ibv_reg_mr - Register a memory region
+
} IBVERBS_1.0;
diff --git a/src/verbs.c b/src/verbs.c
-index b5938f2..f1fe37d 100644
+index b5938f2..d2479e8 100644
--- a/src/verbs.c
+++ b/src/verbs.c
-@@ -154,6 +154,32 @@ int __ibv_dealloc_pd(struct ibv_pd *pd)
+@@ -154,6 +154,33 @@ 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 ibv_xrcd *xrcd;
++ struct verbs_xrcd *xrcd;
+
+ if (!context_ex->open_xrcd) {
+ errno = ENOSYS;
+
+ xrcd = context_ex->open_xrcd(context, fd, oflags);
+ if (xrcd)
-+ xrcd->context = context;
++ xrcd->xrcd.context = context;
+
-+ return xrcd;
++ 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(xrcd);
++ return context_ex->close_xrcd(vxrcd);
+}
+default_symver(__ibv_close_xrcd, ibv_close_xrcd);
+