struct bnxt_re_srq *srq;
srq = container_of(init_attr->srq, struct bnxt_re_srq, ib_srq);
- if (!srq) {
- ibdev_err(&rdev->ibdev, "SRQ not found");
- return -EINVAL;
- }
qplqp->srq = &srq->qplib_srq;
rq->max_wqe = 0;
} else {
/* Setup CQs */
if (init_attr->send_cq) {
cq = container_of(init_attr->send_cq, struct bnxt_re_cq, ib_cq);
- if (!cq) {
- ibdev_err(&rdev->ibdev, "Send CQ not found");
- rc = -EINVAL;
- goto out;
- }
qplqp->scq = &cq->qplib_cq;
qp->scq = cq;
}
if (init_attr->recv_cq) {
cq = container_of(init_attr->recv_cq, struct bnxt_re_cq, ib_cq);
- if (!cq) {
- ibdev_err(&rdev->ibdev, "Receive CQ not found");
- rc = -EINVAL;
- goto out;
- }
qplqp->rcq = &cq->qplib_cq;
qp->rcq = cq;
}
((struct bnxt_qplib_qp *)
(unsigned long)(cqe->qp_handle),
struct bnxt_re_qp, qplib_qp);
- if (!qp) {
- ibdev_err(&cq->rdev->ibdev, "POLL CQ : bad QP handle");
- continue;
- }
wc->qp = &qp->ib_qp;
wc->ex.imm_data = cqe->immdata;
wc->src_qp = cqe->src_qp;