Home
last modified time | relevance | path

Searched refs:hr_qp (Results 1 – 5 of 5) sorted by relevance

/Linux-v6.6/drivers/infiniband/hw/hns/
Dhns_roce_qp.c46 struct hns_roce_qp *hr_qp = container_of(flush_work, in flush_work_handle() local
56 if (test_and_clear_bit(HNS_ROCE_FLUSH_FLAG, &hr_qp->flush_flag)) { in flush_work_handle()
57 ret = hns_roce_modify_qp(&hr_qp->ibqp, &attr, attr_mask, NULL); in flush_work_handle()
67 if (refcount_dec_and_test(&hr_qp->refcount)) in flush_work_handle()
68 complete(&hr_qp->free); in flush_work_handle()
71 void init_flush_work(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp) in init_flush_work() argument
73 struct hns_roce_work *flush_work = &hr_qp->flush_work; in init_flush_work()
77 refcount_inc(&hr_qp->refcount); in init_flush_work()
128 static void hns_roce_ib_qp_event(struct hns_roce_qp *hr_qp, in hns_roce_ib_qp_event() argument
131 struct ib_qp *ibqp = &hr_qp->ibqp; in hns_roce_ib_qp_event()
[all …]
Dhns_roce_restrack.c64 struct hns_roce_qp *hr_qp = to_hr_qp(ib_qp); in hns_roce_fill_res_qp_entry() local
71 if (rdma_nl_put_driver_u32_hex(msg, "sq_wqe_cnt", hr_qp->sq.wqe_cnt)) in hns_roce_fill_res_qp_entry()
74 if (rdma_nl_put_driver_u32_hex(msg, "sq_max_gs", hr_qp->sq.max_gs)) in hns_roce_fill_res_qp_entry()
77 if (rdma_nl_put_driver_u32_hex(msg, "rq_wqe_cnt", hr_qp->rq.wqe_cnt)) in hns_roce_fill_res_qp_entry()
80 if (rdma_nl_put_driver_u32_hex(msg, "rq_max_gs", hr_qp->rq.max_gs)) in hns_roce_fill_res_qp_entry()
83 if (rdma_nl_put_driver_u32_hex(msg, "ext_sge_sge_cnt", hr_qp->sge.sge_cnt)) in hns_roce_fill_res_qp_entry()
99 struct hns_roce_qp *hr_qp = to_hr_qp(ib_qp); in hns_roce_fill_res_qp_entry_raw() local
106 ret = hr_dev->hw->query_qpc(hr_dev, hr_qp->qpn, &context); in hns_roce_fill_res_qp_entry_raw()
Dhns_roce_hw_v2.c373 struct hns_roce_qp *hr_qp) in check_send_valid() argument
377 if (unlikely(hr_qp->state == IB_QPS_RESET || in check_send_valid()
378 hr_qp->state == IB_QPS_INIT || in check_send_valid()
379 hr_qp->state == IB_QPS_RTR)) { in check_send_valid()
381 hr_qp->state); in check_send_valid()
766 struct hns_roce_qp *hr_qp) in check_recv_valid() argument
771 if (hr_qp->state == IB_QPS_RESET) in check_recv_valid()
804 static void fill_rq_wqe(struct hns_roce_qp *hr_qp, const struct ib_recv_wr *wr, in fill_rq_wqe() argument
809 wqe = hns_roce_get_recv_wqe(hr_qp, wqe_idx); in fill_rq_wqe()
810 fill_recv_sge_to_wqe(wr, wqe, max_sge, hr_qp->rq.rsv_sge); in fill_rq_wqe()
[all …]
Dhns_roce_main.c985 struct hns_roce_qp *hr_qp; in hns_roce_handle_device_err() local
994 list_for_each_entry(hr_qp, &hr_dev->qp_list, node) { in hns_roce_handle_device_err()
995 spin_lock_irqsave(&hr_qp->sq.lock, flags_qp); in hns_roce_handle_device_err()
996 if (hr_qp->sq.tail != hr_qp->sq.head) in hns_roce_handle_device_err()
997 check_and_get_armed_cq(&cq_list, hr_qp->ibqp.send_cq); in hns_roce_handle_device_err()
998 spin_unlock_irqrestore(&hr_qp->sq.lock, flags_qp); in hns_roce_handle_device_err()
1000 spin_lock_irqsave(&hr_qp->rq.lock, flags_qp); in hns_roce_handle_device_err()
1001 if ((!hr_qp->ibqp.srq) && (hr_qp->rq.tail != hr_qp->rq.head)) in hns_roce_handle_device_err()
1002 check_and_get_armed_cq(&cq_list, hr_qp->ibqp.recv_cq); in hns_roce_handle_device_err()
1003 spin_unlock_irqrestore(&hr_qp->rq.lock, flags_qp); in hns_roce_handle_device_err()
Dhns_roce_device.h903 struct hns_roce_qp *hr_qp);
1200 void init_flush_work(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp);
1201 void *hns_roce_get_recv_wqe(struct hns_roce_qp *hr_qp, unsigned int n);
1202 void *hns_roce_get_send_wqe(struct hns_roce_qp *hr_qp, unsigned int n);
1203 void *hns_roce_get_extend_sge(struct hns_roce_qp *hr_qp, unsigned int n);
1210 void hns_roce_qp_remove(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp);
1211 void hns_roce_qp_destroy(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,