Thread (20 messages) 20 messages, 3 authors, 2021-07-21

Re: [PATCH rdma-next 7/7] RDMA/core: Create clean QP creations interface for uverbs

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-07-21 06:50:14
Also in: lkml

+struct ib_qp *ib_create_qp_user(struct ib_device *dev, struct ib_pd *pd,
+				struct ib_qp_init_attr *attr,
+				struct ib_udata *udata,
+				struct ib_uqp_object *uobj, const char *caller);
+static inline struct ib_qp *ib_create_qp_uverbs(struct ib_device *dev,
+						struct ib_pd *pd,
+						struct ib_qp_init_attr *attr,
+						struct ib_udata *udata,
+						struct ib_uqp_object *uobj)
+{
+	if (attr->qp_type == IB_QPT_XRC_TGT)
+		return ib_create_qp_user(dev, pd, attr, NULL, uobj,
+					 KBUILD_MODNAME);
+
+	return ib_create_qp_user(dev, pd, attr, udata, uobj, NULL);
Why not always pass along the udata and caller and just not use them
in the low-level code?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help