]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ib_{uverbs/core}: add new ib_create_qp_ex with udata arg
authorKnut Omang <knut.omang@oracle.com>
Tue, 21 Apr 2015 10:20:07 +0000 (12:20 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 8 Jul 2015 01:11:00 +0000 (18:11 -0700)
Necessary to get device specific arguments through to XRC QPs.
Added new local header file to serve as support interface
between ib_core and ib_uverbs.

Right now there is a lot of duplicate setup code in uverbs_cmd.c
on the ib_uverbs side and verbs.c on the ib_core side. This commit
is a quick fix to have XRC support working, but similar calls
can be added to consolidate the code for other parts of the API.

Orabug: 20930262

Signed-off-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c

index 87d1936f5c1caa93e188af91e9aefb1e6484902b..01cd259aa4bd2d2b73a8b7631c4619edce604430 100644 (file)
@@ -51,4 +51,9 @@ void ib_cache_cleanup(void);
 
 int ib_resolve_eth_l2_attrs(struct ib_qp *qp,
                            struct ib_qp_attr *qp_attr, int *qp_attr_mask);
+
+struct ib_qp *ib_create_qp_ex(struct ib_pd *pd,
+                       struct ib_qp_init_attr *qp_init_attr,
+                       struct ib_udata *udata);
+
 #endif /* _CORE_PRIV_H */
index f341cf99d1641bab7f7ffc925b7539c32947cca4..0694210e9a8949f11af25ba1dbb2b85c36e09e62 100644 (file)
@@ -1722,7 +1722,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
        INIT_LIST_HEAD(&obj->mcast_list);
 
        if (cmd.qp_type == IB_QPT_XRC_TGT)
-               qp = ib_create_qp(pd, &attr);
+               qp = ib_create_qp_ex(pd, &attr, &udata);
        else
                qp = device->create_qp(pd, &attr, &udata);
 
index 4632272e41aa819339569055749d3a6101197769..3c0549449cac05fe6637208cac51ce885a5be9f2 100644 (file)
@@ -439,14 +439,15 @@ struct ib_qp *ib_open_qp(struct ib_xrcd *xrcd,
 }
 EXPORT_SYMBOL(ib_open_qp);
 
-struct ib_qp *ib_create_qp(struct ib_pd *pd,
-                          struct ib_qp_init_attr *qp_init_attr)
+struct ib_qp *ib_create_qp_ex(struct ib_pd *pd,
+                       struct ib_qp_init_attr *qp_init_attr,
+                       struct ib_udata *udata)
 {
        struct ib_qp *qp, *real_qp;
        struct ib_device *device;
 
        device = pd ? pd->device : qp_init_attr->xrcd->device;
-       qp = device->create_qp(pd, qp_init_attr, NULL);
+       qp = device->create_qp(pd, qp_init_attr, udata);
 
        if (!IS_ERR(qp)) {
                qp->device     = device;
@@ -497,6 +498,14 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
 
        return qp;
 }
+EXPORT_SYMBOL(ib_create_qp_ex);
+
+
+struct ib_qp *ib_create_qp(struct ib_pd *pd,
+                          struct ib_qp_init_attr *qp_init_attr)
+{
+       return ib_create_qp_ex(pd, qp_init_attr,NULL);
+}
 EXPORT_SYMBOL(ib_create_qp);
 
 static const struct {