Lines Matching refs:recv
70 struct rds_iw_recv_work *recv) in rds_iw_recv_unmap_page() argument
72 struct rds_page_frag *frag = recv->r_frag; in rds_iw_recv_unmap_page()
74 rdsdebug("recv %p frag %p page %p\n", recv, frag, frag->f_page); in rds_iw_recv_unmap_page()
84 struct rds_iw_recv_work *recv; in rds_iw_recv_init_ring() local
87 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) { in rds_iw_recv_init_ring()
90 recv->r_iwinc = NULL; in rds_iw_recv_init_ring()
91 recv->r_frag = NULL; in rds_iw_recv_init_ring()
93 recv->r_wr.next = NULL; in rds_iw_recv_init_ring()
94 recv->r_wr.wr_id = i; in rds_iw_recv_init_ring()
95 recv->r_wr.sg_list = recv->r_sge; in rds_iw_recv_init_ring()
96 recv->r_wr.num_sge = RDS_IW_RECV_SGE; in rds_iw_recv_init_ring()
98 sge = rds_iw_data_sge(ic, recv->r_sge); in rds_iw_recv_init_ring()
103 sge = rds_iw_header_sge(ic, recv->r_sge); in rds_iw_recv_init_ring()
111 struct rds_iw_recv_work *recv) in rds_iw_recv_clear_one() argument
113 if (recv->r_iwinc) { in rds_iw_recv_clear_one()
114 rds_inc_put(&recv->r_iwinc->ii_inc); in rds_iw_recv_clear_one()
115 recv->r_iwinc = NULL; in rds_iw_recv_clear_one()
117 if (recv->r_frag) { in rds_iw_recv_clear_one()
118 rds_iw_recv_unmap_page(ic, recv); in rds_iw_recv_clear_one()
119 if (recv->r_frag->f_page) in rds_iw_recv_clear_one()
120 rds_iw_frag_drop_page(recv->r_frag); in rds_iw_recv_clear_one()
121 rds_iw_frag_free(recv->r_frag); in rds_iw_recv_clear_one()
122 recv->r_frag = NULL; in rds_iw_recv_clear_one()
138 struct rds_iw_recv_work *recv, in rds_iw_recv_refill_one() argument
146 if (!recv->r_iwinc) { in rds_iw_recv_refill_one()
151 recv->r_iwinc = kmem_cache_alloc(rds_iw_incoming_slab, in rds_iw_recv_refill_one()
153 if (!recv->r_iwinc) { in rds_iw_recv_refill_one()
157 INIT_LIST_HEAD(&recv->r_iwinc->ii_frags); in rds_iw_recv_refill_one()
158 rds_inc_init(&recv->r_iwinc->ii_inc, conn, conn->c_faddr); in rds_iw_recv_refill_one()
161 if (!recv->r_frag) { in rds_iw_recv_refill_one()
162 recv->r_frag = kmem_cache_alloc(rds_iw_frag_slab, kptr_gfp); in rds_iw_recv_refill_one()
163 if (!recv->r_frag) in rds_iw_recv_refill_one()
165 INIT_LIST_HEAD(&recv->r_frag->f_item); in rds_iw_recv_refill_one()
166 recv->r_frag->f_page = NULL; in rds_iw_recv_refill_one()
189 recv->r_frag->f_page = ic->i_frag.f_page; in rds_iw_recv_refill_one()
190 recv->r_frag->f_offset = ic->i_frag.f_offset; in rds_iw_recv_refill_one()
191 recv->r_frag->f_mapped = dma_addr; in rds_iw_recv_refill_one()
193 sge = rds_iw_data_sge(ic, recv->r_sge); in rds_iw_recv_refill_one()
197 sge = rds_iw_header_sge(ic, recv->r_sge); in rds_iw_recv_refill_one()
198 sge->addr = ic->i_recv_hdrs_dma + (recv - ic->i_recvs) * sizeof(struct rds_header); in rds_iw_recv_refill_one()
201 get_page(recv->r_frag->f_page); in rds_iw_recv_refill_one()
228 struct rds_iw_recv_work *recv; in rds_iw_recv_refill() local
243 recv = &ic->i_recvs[pos]; in rds_iw_recv_refill()
244 ret = rds_iw_recv_refill_one(conn, recv, kptr_gfp, page_gfp); in rds_iw_recv_refill()
251 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); in rds_iw_recv_refill()
252 rdsdebug("recv %p iwinc %p page %p addr %lu ret %d\n", recv, in rds_iw_recv_refill()
253 recv->r_iwinc, recv->r_frag->f_page, in rds_iw_recv_refill()
254 (long) recv->r_frag->f_mapped, ret); in rds_iw_recv_refill()
635 struct rds_iw_recv_work *recv, u32 byte_len, in rds_iw_process_recv() argument
644 rdsdebug("ic %p iwinc %p recv %p byte len %u\n", ic, iwinc, recv, in rds_iw_process_recv()
657 ihdr = &ic->i_recv_hdrs[recv - ic->i_recvs]; in rds_iw_process_recv()
694 rds_iw_frag_drop_page(recv->r_frag); in rds_iw_process_recv()
705 iwinc = recv->r_iwinc; in rds_iw_process_recv()
706 recv->r_iwinc = NULL; in rds_iw_process_recv()
729 list_add_tail(&recv->r_frag->f_item, &iwinc->ii_frags); in rds_iw_process_recv()
730 recv->r_frag = NULL; in rds_iw_process_recv()
785 struct rds_iw_recv_work *recv; in rds_poll_cq() local
793 recv = &ic->i_recvs[rds_iw_ring_oldest(&ic->i_recv_ring)]; in rds_poll_cq()
795 rds_iw_recv_unmap_page(ic, recv); in rds_poll_cq()
805 rds_iw_process_recv(conn, recv, wc.byte_len, state); in rds_poll_cq()