Lines Matching refs:rdma_dev_res
65 RdmaDeviceResources *rdma_dev_res = user_data; in free_cqe_ctx() local
68 bctx = rdma_rm_get_cqe_ctx(rdma_dev_res, cqe_ctx_id); in free_cqe_ctx()
70 rdma_rm_dealloc_cqe_ctx(rdma_dev_res, cqe_ctx_id); in free_cqe_ctx()
71 qatomic_dec(&rdma_dev_res->stats.missing_cqe); in free_cqe_ctx()
84 qatomic_inc(&backend_dev->rdma_dev_res->stats.missing_cqe); in clean_recv_mads()
86 backend_dev->rdma_dev_res); in clean_recv_mads()
91 static int rdma_poll_cq(RdmaDeviceResources *rdma_dev_res, struct ibv_cq *ibcq) in rdma_poll_cq() argument
98 WITH_QEMU_LOCK_GUARD(&rdma_dev_res->lock) { in rdma_poll_cq()
105 bctx = rdma_rm_get_cqe_ctx(rdma_dev_res, wc[i].wr_id); in rdma_poll_cq()
121 rdma_rm_dealloc_cqe_ctx(rdma_dev_res, wc[i].wr_id); in rdma_poll_cq()
126 qatomic_sub(&rdma_dev_res->stats.missing_cqe, total_ne); in rdma_poll_cq()
133 rdma_dev_res->stats.completions += total_ne; in rdma_poll_cq()
164 backend_dev->rdma_dev_res->stats.poll_cq_ppoll_to++; in comp_handler_thread()
182 backend_dev->rdma_dev_res->stats.poll_cq_from_bk++; in comp_handler_thread()
183 rdma_poll_cq(backend_dev->rdma_dev_res, ev_cq); in comp_handler_thread()
312 void rdma_backend_poll_cq(RdmaDeviceResources *rdma_dev_res, RdmaBackendCQ *cq) in rdma_backend_poll_cq() argument
316 rdma_dev_res->stats.poll_cq_from_guest++; in rdma_backend_poll_cq()
317 polled = rdma_poll_cq(rdma_dev_res, cq->ibcq); in rdma_backend_poll_cq()
319 rdma_dev_res->stats.poll_cq_from_guest_empty++; in rdma_backend_poll_cq()
381 static int build_host_sge_array(RdmaDeviceResources *rdma_dev_res, in build_host_sge_array() argument
389 mr = rdma_rm_get_mr(rdma_dev_res, sge[idx].lkey); in build_host_sge_array()
404 static inline int build_host_sge_array(RdmaDeviceResources *rdma_dev_res, in build_host_sge_array() argument
506 backend_dev->rdma_dev_res->stats.mad_tx_err++; in rdma_backend_post_send()
509 backend_dev->rdma_dev_res->stats.mad_tx++; in rdma_backend_post_send()
519 rc = rdma_rm_alloc_cqe_ctx(backend_dev->rdma_dev_res, &bctx_id, bctx); in rdma_backend_post_send()
527 rc = build_host_sge_array(backend_dev->rdma_dev_res, sge, num_sge, in rdma_backend_post_send()
528 &backend_dev->rdma_dev_res->stats.tx_len); in rdma_backend_post_send()
558 qatomic_inc(&backend_dev->rdma_dev_res->stats.missing_cqe); in rdma_backend_post_send()
559 backend_dev->rdma_dev_res->stats.tx++; in rdma_backend_post_send()
564 backend_dev->rdma_dev_res->stats.tx_err++; in rdma_backend_post_send()
565 rdma_rm_dealloc_cqe_ctx(backend_dev->rdma_dev_res, bctx_id); in rdma_backend_post_send()
591 rc = rdma_rm_alloc_cqe_ctx(backend_dev->rdma_dev_res, &bctx_id, bctx); in save_mad_recv_buffer()
623 backend_dev->rdma_dev_res->stats.mad_rx_bufs_err++; in rdma_backend_post_recv()
625 backend_dev->rdma_dev_res->stats.mad_rx_bufs++; in rdma_backend_post_recv()
635 rc = rdma_rm_alloc_cqe_ctx(backend_dev->rdma_dev_res, &bctx_id, bctx); in rdma_backend_post_recv()
643 rc = build_host_sge_array(backend_dev->rdma_dev_res, sge, num_sge, in rdma_backend_post_recv()
644 &backend_dev->rdma_dev_res->stats.rx_bufs_len); in rdma_backend_post_recv()
661 qatomic_inc(&backend_dev->rdma_dev_res->stats.missing_cqe); in rdma_backend_post_recv()
662 backend_dev->rdma_dev_res->stats.rx_bufs++; in rdma_backend_post_recv()
667 backend_dev->rdma_dev_res->stats.rx_bufs_err++; in rdma_backend_post_recv()
668 rdma_rm_dealloc_cqe_ctx(backend_dev->rdma_dev_res, bctx_id); in rdma_backend_post_recv()
687 rc = rdma_rm_alloc_cqe_ctx(backend_dev->rdma_dev_res, &bctx_id, bctx); in rdma_backend_post_srq_recv()
695 rc = build_host_sge_array(backend_dev->rdma_dev_res, sge, num_sge, in rdma_backend_post_srq_recv()
696 &backend_dev->rdma_dev_res->stats.rx_bufs_len); in rdma_backend_post_srq_recv()
713 qatomic_inc(&backend_dev->rdma_dev_res->stats.missing_cqe); in rdma_backend_post_srq_recv()
714 backend_dev->rdma_dev_res->stats.rx_bufs++; in rdma_backend_post_srq_recv()
715 backend_dev->rdma_dev_res->stats.rx_srq++; in rdma_backend_post_srq_recv()
720 backend_dev->rdma_dev_res->stats.rx_bufs_err++; in rdma_backend_post_srq_recv()
721 rdma_rm_dealloc_cqe_ctx(backend_dev->rdma_dev_res, bctx_id); in rdma_backend_post_srq_recv()
1121 bctx = rdma_rm_get_cqe_ctx(backend_dev->rdma_dev_res, cqe_ctx_id); in process_incoming_mad_req()
1124 backend_dev->rdma_dev_res->stats.mad_rx_err++; in process_incoming_mad_req()
1131 backend_dev->rdma_dev_res->stats.mad_rx_err++; in process_incoming_mad_req()
1146 backend_dev->rdma_dev_res->stats.mad_rx++; in process_incoming_mad_req()
1151 rdma_rm_dealloc_cqe_ctx(backend_dev->rdma_dev_res, cqe_ctx_id); in process_incoming_mad_req()
1283 RdmaDeviceResources *rdma_dev_res, in rdma_backend_init() argument
1296 backend_dev->rdma_dev_res = rdma_dev_res; in rdma_backend_init()