goto err;\r
}\r
\r
+ if (id_priv->qp_init_attr) {\r
+ ret = rdma_create_qp(event->id, id_priv->pd, id_priv->qp_init_attr);\r
+ if (ret)\r
+ goto err;\r
+ }\r
+\r
*id = event->id;\r
(*id)->event = event;\r
return 0;\r
return 0;\r
}\r
\r
-static int ucma_passive_ep(struct rdma_cm_id *id, struct rdma_addrinfo *res,
- struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)
-{
- struct cma_id_private *id_priv;
- int ret;
-
- ret = rdma_bind_addr(id, res->ai_src_addr);
- if (ret)
- return ret;
-
- id_priv = CONTAINING_RECORD(id, struct cma_id_private, id);
- id_priv->pd = pd;
-
- if (qp_init_attr) {
- id_priv->qp_init_attr = new struct ibv_qp_init_attr;
- if (!id_priv->qp_init_attr)
- return rdma_seterrno(ENOMEM);
-
- *id_priv->qp_init_attr = *qp_init_attr;
- id_priv->qp_init_attr->qp_type = (enum ibv_qp_type) res->ai_qp_type;
- }
-
- return 0;
-}
+static int ucma_passive_ep(struct rdma_cm_id *id, struct rdma_addrinfo *res,\r
+ struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)\r
+{\r
+ struct cma_id_private *id_priv;\r
+ int ret;\r
+\r
+ ret = rdma_bind_addr(id, res->ai_src_addr);\r
+ if (ret)\r
+ return ret;\r
+\r
+ id_priv = CONTAINING_RECORD(id, struct cma_id_private, id);\r
+ id_priv->pd = pd;\r
+\r
+ if (qp_init_attr) {\r
+ id_priv->qp_init_attr = new struct ibv_qp_init_attr;\r
+ if (!id_priv->qp_init_attr)\r
+ return rdma_seterrno(ENOMEM);\r
+\r
+ *id_priv->qp_init_attr = *qp_init_attr;\r
+ id_priv->qp_init_attr->qp_type = (enum ibv_qp_type) res->ai_qp_type;\r
+ }\r
+\r
+ return 0;\r
+}\r
\r
int rdma_create_ep(struct rdma_cm_id **id, struct rdma_addrinfo *res,\r
struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)\r