Separate user/kernel QP creation logic
Subsystems (2)
cover Separate user/kernel QP creation logic
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Dropped ib_create_qp_uverbs() wrapper in favour of direct call.
* Moved kernel-doc to the actual ib_create_qp() function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]
---------------------------------------------------------------------------
Hi,
The "QP allocation" series shows clearly how convoluted the create QP flow and especially XRC_TGT flow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.
This series is a small step to make clean XRC_TGT flow by providing more clean user/kernel create QP verb separation.
It is based on the "QP allocation" series.
Thanks
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbs
drivers/infiniband/core/core_priv.h | 59 +---- drivers/infiniband/core/uverbs_cmd.c | 31 +-- drivers/infiniband/core/uverbs_std_types_qp.c | 29 +-- drivers/infiniband/core/verbs.c | 208 +++++++++++------- drivers/infiniband/hw/mlx5/qp.c | 3 - include/rdma/ib_verbs.h | 16 +- 6 files changed, 157 insertions(+), 189 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/7 RDMA/mlx5: Delete not-available udata check
From: Leon Romanovsky <[email protected]>
XRC_TGT QPs are created through kernel verbs and don't have udata at all.
--- drivers/infiniband/hw/mlx5/qp.c | 3 --- 1 file changed, 3 deletions(-)
drivers/infiniband/hw/mlx5/qp.c +0 -3
@@ -1908,7 +1908,6 @@ static int get_atomic_mode(struct mlx5_ib_dev *dev,static int create_xrc_tgt_qp (struct mlx5_ib_dev *dev,struct mlx5_ib_qp *qp,struct mlx5_create_qp_params *params) { -struct mlx5_ib_create_qp *ucmd = params->ucmd;struct ib_qp_init_attr *attr = params->attr;u32 uidx = params->uidx;struct mlx5_ib_resources *devr = &dev->devr;
@@ -1928,8 +1927,6 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,if (!in)return -ENOMEM ; -if (MLX5_CAP_GEN (mdev, ece_support) && ucmd) -MLX5_SET (create_qp_in, in, ece, ucmd->ece_options); qpc =MLX5_ADDR_OF (create_qp_in, in, qpc);MLX5_SET (qpc, qpc, st,MLX5_QP_ST_XRC );
Signature · 1 line
2.31.1
PATCH 2/7 RDMA/core: Delete duplicated and unreachable code
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
The ib_create_named_qp() is kernel verb and no kernel users exist that use XRC_INI QP. Hence such QP path is not reachable. In addition, delete duplicated assignments of QP attributes from the initialization structure.
--- drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/verbs.c | 22 ++++------------------ 2 files changed, 5 insertions(+), 18 deletions(-)
drivers/infiniband/core/core_priv.h +1 -0
@@ -342,6 +342,7 @@ _ib_create_qp(struct ib_device *dev, struct ib_pd *pd, qp->rwq_ind_tbl = attr->rwq_ind_tbl; qp->event_handler = attr->event_handler; qp->port = attr->port_num; + qp->qp_context = attr->qp_context;spin_lock_init (&qp->mr_lock);INIT_LIST_HEAD (&qp->rdma_mrs);
drivers/infiniband/core/verbs.c +4 -18
@@ -1257,28 +1257,14 @@ struct ib_qp *ib_create_named_qp(struct ib_pd *pd,return xrc_qp; } - qp->event_handler = qp_init_attr->event_handler; - qp->qp_context = qp_init_attr->qp_context; -if (qp_init_attr->qp_type ==IB_QPT_XRC_INI ) { - qp->recv_cq =NULL ; - qp->srq =NULL ; - }else { - qp->recv_cq = qp_init_attr->recv_cq; -if (qp_init_attr->recv_cq) -atomic_inc (&qp_init_attr->recv_cq->usecnt); - qp->srq = qp_init_attr->srq; -if (qp->srq) -atomic_inc (&qp_init_attr->srq->usecnt); - } - - qp->send_cq = qp_init_attr->send_cq; - qp->xrcd =NULL ; +if (qp_init_attr->recv_cq) +atomic_inc (&qp_init_attr->recv_cq->usecnt); +if (qp->srq) +atomic_inc (&qp_init_attr->srq->usecnt);atomic_inc (&pd->usecnt);if (qp_init_attr->send_cq)atomic_inc (&qp_init_attr->send_cq->usecnt); -if (qp_init_attr->rwq_ind_tbl) -atomic_inc (&qp->rwq_ind_tbl->usecnt);if (qp_init_attr->cap.max_rdma_ctxs) { ret =rdma_rw_init_mrs (qp, qp_init_attr);
Signature · 1 line
2.31.1
PATCH 3/7 RDMA/core: Remove protection from wrong in-kernel API usage
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
The ib_create_named_qp() is kernel verb that is not used for user supplied attributes. In such case, it is ULP responsibility to provide valid QP attributes.
In-kernel API shouldn't check it, exactly like other functions that don't check device capabilities.
--- drivers/infiniband/core/verbs.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/infiniband/core/verbs.c +0 -10
@@ -1219,16 +1219,6 @@ struct ib_qp *ib_create_named_qp(struct ib_pd *pd,struct ib_qp *qp;int ret; -if (qp_init_attr->rwq_ind_tbl && - (qp_init_attr->recv_cq || - qp_init_attr->srq || qp_init_attr->cap.max_recv_wr || - qp_init_attr->cap.max_recv_sge)) -return ERR_PTR (-EINVAL ); - -if ((qp_init_attr->create_flags &IB_QP_CREATE_INTEGRITY_EN ) && - !(device->attrs.device_cap_flags &IB_DEVICE_INTEGRITY_HANDOVER )) -return ERR_PTR (-EINVAL ); -/* * If the callers is using the RDMA API calculate the resources * needed for the RDMA READ/WRITE operations.
Signature · 1 line
2.31.1
PATCH 7/7 RDMA/core: Create clean QP creations interface for uverbs
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
Unify create QP creation interface to make clean approach to create XRC_TGT and regular QPs.
--- drivers/infiniband/core/core_priv.h | 9 +-- drivers/infiniband/core/uverbs_cmd.c | 13 +--- drivers/infiniband/core/uverbs_std_types_qp.c | 10 +-- drivers/infiniband/core/verbs.c | 72 +++++++++++-------- 4 files changed, 52 insertions(+), 52 deletions(-)
drivers/infiniband/core/core_priv.h +5 -4
@@ -316,10 +316,11 @@ struct ib_device *ib_device_get_by_index(const struct net *net, u32 index);void nldev_init (void );void nldev_exit (void ); -struct ib_qp *_ib_create_qp (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); +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); +void ib_qp_usecnt_inc (struct ib_qp *qp);void ib_qp_usecnt_dec (struct ib_qp *qp);
drivers/infiniband/core/uverbs_cmd.c +2 -11
@@ -1435,23 +1435,14 @@ static int create_qp(struct uverbs_attr_bundle *attrs, attr.source_qpn = cmd->source_qpn; } -if (cmd->qp_type ==IB_QPT_XRC_TGT ) - qp =ib_create_qp (pd, &attr); -else - qp =_ib_create_qp (device, pd, &attr, &attrs->driver_udata, obj, -NULL ); - + qp =ib_create_qp_user (device, pd, &attr, &attrs->driver_udata, obj, +KBUILD_MODNAME );if (IS_ERR (qp)) { ret =PTR_ERR (qp); goto err_put; }ib_qp_usecnt_inc (qp); -if (cmd->qp_type ==IB_QPT_XRC_TGT ) { -/* It is done in _ib_create_qp for other QP types */ - qp->uobject = obj; - } - obj->uevent.uobject.object = qp; obj->uevent.event_file =READ_ONCE (attrs->ufile->default_async_file);if (obj->uevent.event_file)
drivers/infiniband/core/uverbs_std_types_qp.c +2 -8
@@ -248,12 +248,8 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QP_CREATE)(set_caps (&attr, &cap, true);mutex_init (&obj->mcast_lock); -if (attr.qp_type ==IB_QPT_XRC_TGT ) - qp =ib_create_qp (pd, &attr); -else - qp =_ib_create_qp (device, pd, &attr, &attrs->driver_udata, obj, -NULL ); - + qp =ib_create_qp_user (device, pd, &attr, &attrs->driver_udata, obj, +KBUILD_MODNAME );if (IS_ERR (qp)) { ret =PTR_ERR (qp); goto err_put;
@@ -264,8 +260,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QP_CREATE)( obj->uxrcd = container_of(xrcd_uobj, struct ib_uxrcd_object, uobject);atomic_inc (&obj->uxrcd->refcnt); -/* It is done in _ib_create_qp for other QP types */ - qp->uobject = obj; } obj->uevent.uobject.object = qp;
drivers/infiniband/core/verbs.c +43 -29
99 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 5/7 RDMA/core: Configure selinux QP during creation
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
All QP creation flows called ib_create_qp_security(), but differently. This caused to the need to provide exclusion conditions for the XRC_TGT, because such QP already had selinux configuration call.
In order to fix it, move ib_create_qp_security() to the general QP creation routine.
--- drivers/infiniband/core/uverbs_cmd.c | 7 ------- drivers/infiniband/core/uverbs_std_types_qp.c | 6 ------ drivers/infiniband/core/verbs.c | 11 +++++++---- 3 files changed, 7 insertions(+), 17 deletions(-)
drivers/infiniband/core/uverbs_cmd.c +0 -7
@@ -1447,10 +1447,6 @@ static int create_qp(struct uverbs_attr_bundle *attrs, }if (cmd->qp_type !=IB_QPT_XRC_TGT ) { - ret =ib_create_qp_security (qp, device); -if (ret) - goto err_cb; -atomic_inc (&pd->usecnt);if (attr.send_cq)atomic_inc (&attr.send_cq->usecnt);
@@ -1502,9 +1498,6 @@ static int create_qp(struct uverbs_attr_bundle *attrs, resp.response_length =uverbs_response_length (attrs,sizeof (resp));return uverbs_response (attrs, &resp,sizeof (resp)); -err_cb: -ib_destroy_qp_user (qp,uverbs_get_cleared_udata (attrs)); - err_put:if (!IS_ERR (xrcd_uobj))uobj_put_read (xrcd_uobj);
drivers/infiniband/core/uverbs_std_types_qp.c +0 -6
@@ -280,12 +280,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QP_CREATE)( obj->uevent.uobject.object = qp;uverbs_finalize_uobj_create (attrs,UVERBS_ATTR_CREATE_QP_HANDLE ); -if (attr.qp_type !=IB_QPT_XRC_TGT ) { - ret =ib_create_qp_security (qp, device); -if (ret) -return ret; - } -set_caps (&attr, &cap, false); ret = uverbs_copy_to_struct_or_zero(attrs, UVERBS_ATTR_CREATE_QP_RESP_CAP, &cap,
drivers/infiniband/core/verbs.c +7 -4
@@ -1216,6 +1216,7 @@ struct ib_qp *_ib_create_qp(struct ib_device *dev, struct ib_pd *pd, struct ib_udata *udata, struct ib_uqp_object *uobj, const char *caller) { + struct ib_udata dummy = {};struct ib_qp *qp;int ret;
@@ -1257,9 +1258,15 @@ struct ib_qp *_ib_create_qp(struct ib_device *dev, struct ib_pd *pd, qp->send_cq = attr->send_cq; qp->recv_cq = attr->recv_cq; + ret =ib_create_qp_security (qp, dev); +if (ret) + goto err_security; +rdma_restrack_add (&qp->res);return qp; +err_security: + qp->device->ops.destroy_qp (qp, udata ? &dummy :NULL ); err_create:rdma_restrack_put (&qp->res);kfree (qp);
@@ -1289,10 +1296,6 @@ struct ib_qp *ib_create_qp_kernel(struct ib_pd *pd,if (IS_ERR (qp))return qp; - ret =ib_create_qp_security (qp, device); -if (ret) - goto err; -if (qp_init_attr->qp_type ==IB_QPT_XRC_TGT ) {struct ib_qp *xrc_qp =create_xrc_qp_user (qp, qp_init_attr);
Signature · 1 line
2.31.1
PATCH 6/7 RDMA/core: Properly increment and decrement QP usecnts
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
The QP usecnts were incremented through QP attributes structure while decreased through QP itself. Rely on the ib_creat_qp_user() code that initialized all QP parameters prior returning to the user and increment exactly like destroy does.
--- drivers/infiniband/core/core_priv.h | 2 + drivers/infiniband/core/uverbs_cmd.c | 13 +--- drivers/infiniband/core/uverbs_std_types_qp.c | 13 +--- drivers/infiniband/core/verbs.c | 60 ++++++++++--------- 4 files changed, 39 insertions(+), 49 deletions(-)
drivers/infiniband/core/core_priv.h +2 -0
@@ -320,6 +320,8 @@ struct ib_qp *_ib_create_qp(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); +void ib_qp_usecnt_inc (struct ib_qp *qp); +void ib_qp_usecnt_dec (struct ib_qp *qp);struct rdma_dev_addr ; int rdma_resolve_ip_route(struct sockaddr *src_addr,
drivers/infiniband/core/uverbs_cmd.c +2 -11
@@ -1445,18 +1445,9 @@ static int create_qp(struct uverbs_attr_bundle *attrs, ret =PTR_ERR (qp); goto err_put; } +ib_qp_usecnt_inc (qp); -if (cmd->qp_type !=IB_QPT_XRC_TGT ) { -atomic_inc (&pd->usecnt); -if (attr.send_cq) -atomic_inc (&attr.send_cq->usecnt); -if (attr.recv_cq) -atomic_inc (&attr.recv_cq->usecnt); -if (attr.srq) -atomic_inc (&attr.srq->usecnt); -if (ind_tbl) -atomic_inc (&ind_tbl->usecnt); - }else { +if (cmd->qp_type ==IB_QPT_XRC_TGT ) {/* It is done in _ib_create_qp for other QP types */ qp->uobject = obj; }
drivers/infiniband/core/uverbs_std_types_qp.c +2 -11
@@ -258,18 +258,9 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QP_CREATE)( ret =PTR_ERR (qp); goto err_put; } +ib_qp_usecnt_inc (qp); -if (attr.qp_type !=IB_QPT_XRC_TGT ) { -atomic_inc (&pd->usecnt); -if (attr.send_cq) -atomic_inc (&attr.send_cq->usecnt); -if (attr.recv_cq) -atomic_inc (&attr.recv_cq->usecnt); -if (attr.srq) -atomic_inc (&attr.srq->usecnt); -if (attr.rwq_ind_tbl) -atomic_inc (&attr.rwq_ind_tbl->usecnt); - }else { +if (attr.qp_type ==IB_QPT_XRC_TGT ) { obj->uxrcd = container_of(xrcd_uobj, struct ib_uxrcd_object, uobject);atomic_inc (&obj->uxrcd->refcnt);
drivers/infiniband/core/verbs.c +33 -27
90 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 4/7 RDMA/core: Reorganize create QP low-level functions
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
The low-level create QP function grew to be larger than any sensible inline function should be. The inline attribute is not really needed for that function and can be implemented as exported symbol.
--- drivers/infiniband/core/core_priv.h | 59 ++--------------------- drivers/infiniband/core/verbs.c | 75 +++++++++++++++++++++++++---- include/rdma/ib_verbs.h | 16 ++++-- 3 files changed, 82 insertions(+), 68 deletions(-)
drivers/infiniband/core/core_priv.h +4 -55
@@ -316,61 +316,10 @@ struct ib_device *ib_device_get_by_index(const struct net *net, u32 index);void nldev_init (void );void nldev_exit (void ); -static inline struct ib_qp * -_ib_create_qp (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) -{ -struct ib_qp *qp; -int ret; - -if (!dev->ops.create_qp) -return ERR_PTR (-EOPNOTSUPP ); - - qp =rdma_zalloc_drv_obj_numa (dev, ib_qp); -if (!qp) -return ERR_PTR (-ENOMEM ); - - qp->device = dev; - qp->pd = pd; - qp->uobject = uobj; - qp->real_qp = qp; - - qp->qp_type = attr->qp_type; - qp->rwq_ind_tbl = attr->rwq_ind_tbl; - qp->srq = attr->srq; - qp->rwq_ind_tbl = attr->rwq_ind_tbl; - qp->event_handler = attr->event_handler; - qp->port = attr->port_num; - qp->qp_context = attr->qp_context; - -spin_lock_init (&qp->mr_lock); -INIT_LIST_HEAD (&qp->rdma_mrs); -INIT_LIST_HEAD (&qp->sig_mrs); - -rdma_restrack_new (&qp->res,RDMA_RESTRACK_QP ); -WARN_ONCE (!udata && !caller,"Missing kernel QP owner" ); -rdma_restrack_set_name (&qp->res, udata ?NULL : caller); - ret = dev->ops.create_qp (qp, attr, udata); -if (ret) - goto err_create; - -/* -* TODO: The mlx4 internally overwrites send_cq and recv_cq. -* Unfortunately, it is not an easy task to fix that driver. -*/ - qp->send_cq = attr->send_cq; - qp->recv_cq = attr->recv_cq; - -rdma_restrack_add (&qp->res); -return qp; - -err_create: -rdma_restrack_put (&qp->res); -kfree (qp); -return ERR_PTR (ret); - -} +struct ib_qp *_ib_create_qp (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);struct rdma_dev_addr ; int rdma_resolve_ip_route(struct sockaddr *src_addr,
drivers/infiniband/core/verbs.c +66 -9
92 lines not on this page · raw message
include/rdma/ib_verbs.h +12 -4
@@ -3688,13 +3688,21 @@ static inline int ib_post_srq_recv(struct ib_srq *srq, bad_recv_wr ? : &dummy); } -struct ib_qp *ib_create_named_qp (struct ib_pd *pd, -struct ib_qp_init_attr *qp_init_attr, -const char *caller); +struct ib_qp *ib_create_qp_kernel (struct ib_pd *pd, +struct ib_qp_init_attr *qp_init_attr, +const char *caller); +/** +* ib_create_qp - Creates a kernel QP associated with the specific protection +* domain. +* @pd: The protection domain associated with the QP. +* @init_attr: A list of initial attributes required to create the +* QP. If QP creation succeeds, then the attributes are updated to +* the actual capabilities of the created QP. +*/ static inline struct ib_qp *ib_create_qp (struct ib_pd *pd,struct ib_qp_init_attr *init_attr) { -return ib_create_named_qp (pd, init_attr,KBUILD_MODNAME ); +return ib_create_qp_kernel (pd, init_attr,KBUILD_MODNAME ); }/**
Signature · 1 line
2.31.1
Leon Romanovsky
maintainerQuoted 32 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Droppedib_create_qp_uverbs()wrapper in favour of direct call.
* Moved kernel-doc to the actualib_create_qp()function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]---------------------------------------------------------------------------
Hi,The "QP allocation" series shows clearly how convoluted the create QP flow and especially
XRC_TGTflow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.This series is a small step to make clean
XRC_TGTflow by providing more clean user/kernel create QP verb separation.It is based on the "QP allocation" series.
Thanks
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbs
Quoted 7 lines
drivers/infiniband/core/core_priv.h | 59 +---- drivers/infiniband/core/uverbs_cmd.c | 31 +-- drivers/infiniband/core/uverbs_std_types_qp.c | 29 +-- drivers/infiniband/core/verbs.c | 208 +++++++++++------- drivers/infiniband/hw/mlx5/qp.c | 3 - include/rdma/ib_verbs.h | 16 +- 6 files changed, 157 insertions(+), 189 deletions(-)
Jason,
Can we progress with this series too?
Thanks
Quoted 4 lines
Signature · 2 lines
-- 2.31.1
Jason Gunthorpe
maintainerQuoted 40 lines · Leon Romanovsky
Quoted 31 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Droppedib_create_qp_uverbs()wrapper in favour of direct call.
* Moved kernel-doc to the actualib_create_qp()function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]Hi,
The "QP allocation" series shows clearly how convoluted the create QP flow and especially
XRC_TGTflow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.This series is a small step to make clean
XRC_TGTflow by providing more clean user/kernel create QP verb separation.It is based on the "QP allocation" series.
Thanks
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbsQuoted 7 lines
drivers/infiniband/core/core_priv.h | 59 +---- drivers/infiniband/core/uverbs_cmd.c | 31 +-- drivers/infiniband/core/uverbs_std_types_qp.c | 29 +-- drivers/infiniband/core/verbs.c | 208 +++++++++++------- drivers/infiniband/hw/mlx5/qp.c | 3 - include/rdma/ib_verbs.h | 16 +- 6 files changed, 157 insertions(+), 189 deletions(-)
Quoted 3 lines
Jason,
Can we progress with this series too?
It doesn't apply, can you resend it quickly?
Jason
Leon Romanovsky
maintainerQuoted 41 lines · Jason Gunthorpe
Quoted 40 lines · Leon Romanovsky
Quoted 38 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Droppedib_create_qp_uverbs()wrapper in favour of direct call.
* Moved kernel-doc to the actualib_create_qp()function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]Hi,
The "QP allocation" series shows clearly how convoluted the create QP flow and especially
XRC_TGTflow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.This series is a small step to make clean
XRC_TGTflow by providing more clean user/kernel create QP verb separation.It is based on the "QP allocation" series.
Thanks
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbsdrivers/infiniband/core/core_priv.h | 59 +---- drivers/infiniband/core/uverbs_cmd.c | 31 +-- drivers/infiniband/core/uverbs_std_types_qp.c | 29 +-- drivers/infiniband/core/verbs.c | 208 +++++++++++------- drivers/infiniband/hw/mlx5/qp.c | 3 - include/rdma/ib_verbs.h | 16 +- 6 files changed, 157 insertions(+), 189 deletions(-)
Quoted 5 lines
Quoted 3 lines
Jason,
Can we progress with this series too?
It doesn't apply, can you resend it quickly?
Why?
It is in my tree and it was on top of QP allocation patches.
Thanks
Quoted 2 lines
Jason
Leon Romanovsky
maintainerQuoted 44 lines · Leon Romanovsky
Quoted 43 lines · Jason Gunthorpe
Quoted 42 lines · Leon Romanovsky
Quoted 31 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Droppedib_create_qp_uverbs()wrapper in favour of direct call.
* Moved kernel-doc to the actualib_create_qp()function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]Hi,
The "QP allocation" series shows clearly how convoluted the create QP flow and especially
XRC_TGTflow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.This series is a small step to make clean
XRC_TGTflow by providing more clean user/kernel create QP verb separation.It is based on the "QP allocation" series.
Thanks
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbsQuoted 7 lines
drivers/infiniband/core/core_priv.h | 59 +---- drivers/infiniband/core/uverbs_cmd.c | 31 +-- drivers/infiniband/core/uverbs_std_types_qp.c | 29 +-- drivers/infiniband/core/verbs.c | 208 +++++++++++------- drivers/infiniband/hw/mlx5/qp.c | 3 - include/rdma/ib_verbs.h | 16 +- 6 files changed, 157 insertions(+), 189 deletions(-)Jason,
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Can we progress with this series too?
It doesn't apply, can you resend it quickly?
Why?
It is in my tree and it was on top of QP allocation patches.
I resent the series.
Thanks
Quoted 6 lines
Thanks
Quoted 2 lines
Jason
Jason Gunthorpe
maintainerQuoted 9 lines · Leon Romanovsky
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Can we progress with this series too?
It doesn't apply, can you resend it quickly?
Why?
It is in my tree and it was on top of QP allocation patches.
I resent the series.
That one applied
Jason
Quoted 22 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Changelog:
iv1:
* Fixed typo: incline -> inline/
* Droppedib_create_qp_uverbs()wrapper in favour of direct call.
* Moved kernel-doc to the actualib_create_qp()function that users will use.
v0: https://lore.kernel.org/lkml/[email protected]Hi,
The "QP allocation" series shows clearly how convoluted the create QP flow and especially
XRC_TGTflow, where it calls to kernel verb just to pass some parameters as NULL to the user create QP verb.This series is a small step to make clean
XRC_TGTflow by providing more clean user/kernel create QP verb separation.It is based on the "QP allocation" series.
Thanks
Quoted 8 lines
Leon Romanovsky (7):
RDMA/mlx5: Delete not-available udata check RDMA/core: Delete duplicated and unreachable code RDMA/core: Remove protection from wrong in-kernel API usage RDMA/core: Reorganize create QP low-level functions RDMA/core: Configure selinux QP during creation RDMA/core: Properly increment and decrement QP usecnts RDMA/core: Create clean QP creations interface for uverbs
Applied to for-next, thanks
Jason