[ofa-general] ***SPAM*** [PATCH 1/1] librdmacm: add support for create qp expanded
ronli at voltaire.com
ronli at voltaire.com
Mon Jul 21 13:28:47 PDT 2008
Adds a new function: int rdma_create_qp_expanded
which uses the ibv_create_qp_expanded function in libibverbs and uses
it similarly to ibv_create_qp, with the difference of creation flags.
Signed-off-by: Ron Livne <ronli at voltaire.com>
diff --git a/include/rdma/rdma_cma.h b/include/rdma/rdma_cma.h
index a516ab8..34c6b9f 100644
--- a/include/rdma/rdma_cma.h
+++ b/include/rdma/rdma_cma.h
@@ -296,6 +296,10 @@ int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms);
int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd,
struct ibv_qp_init_attr *qp_init_attr);
+int rdma_create_qp_expanded(struct rdma_cm_id *id, struct ibv_pd *pd,
+ struct ibv_qp_init_attr *qp_init_attr,
+ uint32_t create_flags);
+
/**
* rdma_destroy_qp - Deallocate a QP.
* @id: RDMA identifier.
diff --git a/src/cma.c b/src/cma.c
index ecb41bc..92064c8 100644
--- a/src/cma.c
+++ b/src/cma.c
@@ -786,6 +786,13 @@ static int ucma_init_ud_qp(struct cma_id_private *id_priv, struct ibv_qp *qp)
int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd,
struct ibv_qp_init_attr *qp_init_attr)
{
+ return rdma_create_qp_expanded(id, pd, qp_init_attr, 0);
+}
+
+int rdma_create_qp_expanded(struct rdma_cm_id *id, struct ibv_pd *pd,
+ struct ibv_qp_init_attr *qp_init_attr,
+ uint32_t create_flags)
+{
struct cma_id_private *id_priv;
struct ibv_qp *qp;
int ret;
@@ -794,7 +801,7 @@ int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd,
if (id->verbs != pd->context)
return -EINVAL;
- qp = ibv_create_qp(pd, qp_init_attr);
+ qp = ibv_create_qp_expanded(pd, qp_init_attr, create_flags);
if (!qp)
return -ENOMEM;
diff --git a/src/librdmacm.map b/src/librdmacm.map
index cb94efe..b237eda 100644
--- a/src/librdmacm.map
+++ b/src/librdmacm.map
@@ -28,5 +28,6 @@ RDMACM_1.0 {
rdma_get_local_addr;
rdma_get_peer_addr;
rdma_migrate_id;
+ rdma_create_qp_expanded;
local: *;
};
More information about the general
mailing list