“c0a991c8740b413559bfc894aa5ae1d5ed3704b5”上不存在“...fluid/tests/git@gitcode.net:Crayonxin2000/Paddle.git”
提交 20e2bcc4 编写于 作者: L Leon Romanovsky 提交者: Jason Gunthorpe

RDMA/core: Remove protection from wrong in-kernel API usage

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.

Link: https://lore.kernel.org/r/b9b9e981d1af148b750750196e686199dbbf61f8.1628014762.git.leonro@nvidia.comSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 8fc3beeb
...@@ -1219,16 +1219,6 @@ struct ib_qp *ib_create_named_qp(struct ib_pd *pd, ...@@ -1219,16 +1219,6 @@ struct ib_qp *ib_create_named_qp(struct ib_pd *pd,
struct ib_qp *qp; struct ib_qp *qp;
int ret; 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 * If the callers is using the RDMA API calculate the resources
* needed for the RDMA READ/WRITE operations. * needed for the RDMA READ/WRITE operations.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册