Home
last modified time | relevance | path

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

/linux/drivers/infiniband/hw/hns/
H A Dhns_roce_qp.c64 struct hns_roce_qp *hr_qp = container_of(flush_work, in flush_work_handle() local
74 if (test_and_clear_bit(HNS_ROCE_FLUSH_FLAG, &hr_qp->flush_flag)) { in flush_work_handle()
75 ret = hns_roce_modify_qp(&hr_qp->ibqp, &attr, attr_mask, NULL); in flush_work_handle()
85 if (refcount_dec_and_test(&hr_qp->refcount)) in flush_work_handle()
86 complete(&hr_qp->free); in flush_work_handle()
89 void init_flush_work(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp) in init_flush_work() argument
91 struct hns_roce_work *flush_work = &hr_qp->flush_work; in init_flush_work()
94 spin_lock_irqsave(&hr_qp->flush_lock, flags); in init_flush_work()
96 if (test_bit(HNS_ROCE_STOP_FLUSH_FLAG, &hr_qp->flush_flag)) { in init_flush_work()
97 spin_unlock_irqrestore(&hr_qp->flush_lock, flags); in init_flush_work()
[all …]
H A Dhns_roce_restrack.c63 struct hns_roce_qp *hr_qp = to_hr_qp(ib_qp); in hns_roce_fill_res_qp_entry() local
70 if (rdma_nl_put_driver_u32_hex(msg, "sq_wqe_cnt", hr_qp->sq.wqe_cnt)) in hns_roce_fill_res_qp_entry()
73 if (rdma_nl_put_driver_u32_hex(msg, "sq_max_gs", hr_qp->sq.max_gs)) in hns_roce_fill_res_qp_entry()
76 if (rdma_nl_put_driver_u32_hex(msg, "rq_wqe_cnt", hr_qp->rq.wqe_cnt)) in hns_roce_fill_res_qp_entry()
79 if (rdma_nl_put_driver_u32_hex(msg, "rq_max_gs", hr_qp->rq.max_gs)) in hns_roce_fill_res_qp_entry()
82 if (rdma_nl_put_driver_u32_hex(msg, "ext_sge_sge_cnt", hr_qp->sge.sge_cnt)) in hns_roce_fill_res_qp_entry()
98 struct hns_roce_qp *hr_qp = to_hr_qp(ib_qp); in hns_roce_fill_res_qp_entry_raw() local
103 u32 sccn = hr_qp->qpn; in hns_roce_fill_res_qp_entry_raw()
109 ret = hr_dev->hw->query_qpc(hr_dev, hr_qp->qpn, &context.qpc); in hns_roce_fill_res_qp_entry_raw()
120 if (hr_qp->cong_type == CONG_TYPE_DIP) { in hns_roce_fill_res_qp_entry_raw()
[all …]
H A Dhns_roce_hw_v2.c377 struct hns_roce_qp *hr_qp) in check_send_valid() argument
379 if (unlikely(hr_qp->state == IB_QPS_RESET || in check_send_valid()
380 hr_qp->state == IB_QPS_INIT || in check_send_valid()
381 hr_qp->state == IB_QPS_RTR)) in check_send_valid()
776 struct hns_roce_qp *hr_qp) in check_recv_valid() argument
781 if (hr_qp->state == IB_QPS_RESET) in check_recv_valid()
814 static void fill_rq_wqe(struct hns_roce_qp *hr_qp, const struct ib_recv_wr *wr, in fill_rq_wqe() argument
819 wqe = hns_roce_get_recv_wqe(hr_qp, wqe_idx); in fill_rq_wqe()
820 fill_recv_sge_to_wqe(wr, wqe, max_sge, hr_qp->rq.rsv_sge); in fill_rq_wqe()
822 trace_hns_rq_wqe(hr_qp->qpn, wqe_idx, wqe, 1 << hr_qp->rq.wqe_shift, in fill_rq_wqe()
[all …]
H A Dhns_roce_main.c1127 struct hns_roce_qp *hr_qp; in hns_roce_handle_device_err() local
1136 list_for_each_entry(hr_qp, &hr_dev->qp_list, node) { in hns_roce_handle_device_err()
1137 spin_lock_irqsave(&hr_qp->sq.lock, flags_qp); in hns_roce_handle_device_err()
1138 if (hr_qp->sq.tail != hr_qp->sq.head) in hns_roce_handle_device_err()
1139 check_and_get_armed_cq(&cq_list, hr_qp->ibqp.send_cq); in hns_roce_handle_device_err()
1140 spin_unlock_irqrestore(&hr_qp->sq.lock, flags_qp); in hns_roce_handle_device_err()
1142 spin_lock_irqsave(&hr_qp->rq.lock, flags_qp); in hns_roce_handle_device_err()
1143 if ((!hr_qp->ibqp.srq) && (hr_qp->rq.tail != hr_qp->rq.head)) in hns_roce_handle_device_err()
1144 check_and_get_armed_cq(&cq_list, hr_qp->ibqp.recv_cq); in hns_roce_handle_device_err()
1145 spin_unlock_irqrestore(&hr_qp->rq.lock, flags_qp); in hns_roce_handle_device_err()
H A Dhns_roce_device.h950 struct hns_roce_qp *hr_qp);
1280 void init_flush_work(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp);
1281 void *hns_roce_get_recv_wqe(struct hns_roce_qp *hr_qp, unsigned int n);
1282 void *hns_roce_get_send_wqe(struct hns_roce_qp *hr_qp, unsigned int n);
1283 void *hns_roce_get_extend_sge(struct hns_roce_qp *hr_qp, unsigned int n);
1290 void hns_roce_qp_remove(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp);
1291 void hns_roce_qp_destroy(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,