RDMA/core: Reorganize create QP low-level functions

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.

Link: https://lore.kernel.org/r/2c08709d86f876c3dfb77684357b2a939e570ca4.1628014762.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Leon Romanovsky
2021-08-03 21:20:35 +03:00
committed by Jason Gunthorpe
parent 20e2bcc4c2
commit 8da9fe4e4f
3 changed files with 81 additions and 67 deletions

View File

@ -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);
}
/**