Lines Matching refs:qpn
46 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()
58 dev_warn(dev, "Async event for bogus QP %08x\n", qpn); in hns_roce_qp_event()
104 type, hr_qp->qpn); in hns_roce_ib_qp_event()
142 static int hns_roce_gsi_qp_alloc(struct hns_roce_dev *hr_dev, unsigned long qpn, in hns_roce_gsi_qp_alloc() argument
148 if (!qpn) in hns_roce_gsi_qp_alloc()
151 hr_qp->qpn = qpn; in hns_roce_gsi_qp_alloc()
155 ret = xa_err(xa_store_irq(xa, hr_qp->qpn & (hr_dev->caps.num_qps - 1), in hns_roce_gsi_qp_alloc()
163 static int hns_roce_qp_alloc(struct hns_roce_dev *hr_dev, unsigned long qpn, in hns_roce_qp_alloc() argument
170 if (!qpn) in hns_roce_qp_alloc()
173 hr_qp->qpn = qpn; in hns_roce_qp_alloc()
176 ret = hns_roce_table_get(hr_dev, &qp_table->qp_table, hr_qp->qpn); in hns_roce_qp_alloc()
183 ret = hns_roce_table_get(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_alloc()
192 hr_qp->qpn); in hns_roce_qp_alloc()
202 hr_qp->qpn); in hns_roce_qp_alloc()
209 ret = hns_roce_gsi_qp_alloc(hr_dev, qpn, hr_qp); in hns_roce_qp_alloc()
218 hr_qp->qpn); in hns_roce_qp_alloc()
222 hns_roce_table_put(hr_dev, &qp_table->trrl_table, hr_qp->qpn); in hns_roce_qp_alloc()
225 hns_roce_table_put(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_alloc()
228 hns_roce_table_put(hr_dev, &qp_table->qp_table, hr_qp->qpn); in hns_roce_qp_alloc()
240 __xa_erase(xa, hr_qp->qpn & (hr_dev->caps.num_qps - 1)); in hns_roce_qp_remove()
255 hr_qp->qpn); in hns_roce_qp_free()
256 hns_roce_table_put(hr_dev, &qp_table->irrl_table, hr_qp->qpn); in hns_roce_qp_free()
697 unsigned long qpn = 0; in hns_roce_create_qp_common() local
897 qpn = sqpn; in hns_roce_create_qp_common()
900 ret = hns_roce_reserve_range_qp(hr_dev, 1, 1, &qpn); in hns_roce_create_qp_common()
921 ret = hns_roce_gsi_qp_alloc(hr_dev, qpn, hr_qp); in hns_roce_create_qp_common()
927 ret = hns_roce_qp_alloc(hr_dev, qpn, hr_qp); in hns_roce_create_qp_common()
937 hr_qp->doorbell_qpn = (u32)hr_qp->qpn; in hns_roce_create_qp_common()
966 hns_roce_release_range_qp(hr_dev, qpn, 1); in hns_roce_create_qp_common()
1036 hr_qp->qpn, ret); in hns_roce_create_qp()
1041 hr_qp->ibqp.qp_num = hr_qp->qpn; in hns_roce_create_qp()