Lines Matching refs:qpn
44 void hns_roce_qp_event(struct hns_roce_dev *hr_dev, u32 qpn, int event_type) in hns_roce_qp_event() argument
52 qp = __hns_roce_qp_lookup(hr_dev, qpn); in hns_roce_qp_event()
59 dev_warn(dev, "Async event for bogus QP %08x\n", qpn); in hns_roce_qp_event()
105 type, hr_qp->qpn); in hns_roce_ib_qp_event()
140 static int hns_roce_gsi_qp_alloc(struct hns_roce_dev *hr_dev, unsigned long qpn, in hns_roce_gsi_qp_alloc() argument
146 if (!qpn) in hns_roce_gsi_qp_alloc()
149 hr_qp->qpn = qpn; in hns_roce_gsi_qp_alloc()
153 hr_qp->qpn & (hr_dev->caps.num_qps - 1), hr_qp); in hns_roce_gsi_qp_alloc()
170 static int hns_roce_qp_alloc(struct hns_roce_dev *hr_dev, unsigned long qpn, in hns_roce_qp_alloc() argument
177 if (!qpn) in hns_roce_qp_alloc()
180 hr_qp->qpn = qpn; in hns_roce_qp_alloc()
183 ret = hns_roce_table_get(hr_dev, &qp_table->qp_table, hr_qp->qpn); in hns_roce_qp_alloc()
190 ret = hns_roce_table_get(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_alloc()
198 hr_qp->qpn & (hr_dev->caps.num_qps - 1), hr_qp); in hns_roce_qp_alloc()
211 hns_roce_table_put(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_alloc()
214 hns_roce_table_put(hr_dev, &qp_table->qp_table, hr_qp->qpn); in hns_roce_qp_alloc()
227 hr_qp->qpn & (hr_dev->caps.num_qps - 1)); in hns_roce_qp_remove()
240 hns_roce_table_put(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_free()
241 hns_roce_table_put(hr_dev, &qp_table->qp_table, hr_qp->qpn); in hns_roce_qp_free()
396 unsigned long qpn = 0; in hns_roce_create_qp_common() local
516 qpn = sqpn; in hns_roce_create_qp_common()
519 ret = hns_roce_reserve_range_qp(hr_dev, 1, 1, &qpn); in hns_roce_create_qp_common()
527 ret = hns_roce_gsi_qp_alloc(hr_dev, qpn, hr_qp); in hns_roce_create_qp_common()
533 ret = hns_roce_qp_alloc(hr_dev, qpn, hr_qp); in hns_roce_create_qp_common()
543 hr_qp->doorbell_qpn = cpu_to_le64(hr_qp->qpn); in hns_roce_create_qp_common()
551 hns_roce_release_range_qp(hr_dev, qpn, 1); in hns_roce_create_qp_common()
594 hr_qp->ibqp.qp_num = hr_qp->qpn; in hns_roce_create_qp()