Lines Matching refs:recv
49 struct rds_ib_recv_work *recv; in rds_ib_recv_init_ring() local
52 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) { in rds_ib_recv_init_ring()
55 recv->r_ibinc = NULL; in rds_ib_recv_init_ring()
56 recv->r_frag = NULL; in rds_ib_recv_init_ring()
58 recv->r_wr.next = NULL; in rds_ib_recv_init_ring()
59 recv->r_wr.wr_id = i; in rds_ib_recv_init_ring()
60 recv->r_wr.sg_list = recv->r_sge; in rds_ib_recv_init_ring()
61 recv->r_wr.num_sge = RDS_IB_RECV_SGE; in rds_ib_recv_init_ring()
63 sge = &recv->r_sge[0]; in rds_ib_recv_init_ring()
68 sge = &recv->r_sge[1]; in rds_ib_recv_init_ring()
224 struct rds_ib_recv_work *recv) in rds_ib_recv_clear_one() argument
226 if (recv->r_ibinc) { in rds_ib_recv_clear_one()
227 rds_inc_put(&recv->r_ibinc->ii_inc); in rds_ib_recv_clear_one()
228 recv->r_ibinc = NULL; in rds_ib_recv_clear_one()
230 if (recv->r_frag) { in rds_ib_recv_clear_one()
231 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); in rds_ib_recv_clear_one()
232 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_recv_clear_one()
233 recv->r_frag = NULL; in rds_ib_recv_clear_one()
308 struct rds_ib_recv_work *recv, gfp_t gfp) in rds_ib_recv_refill_one() argument
330 if (!recv->r_ibinc) { in rds_ib_recv_refill_one()
331 recv->r_ibinc = rds_ib_refill_one_inc(ic, slab_mask); in rds_ib_recv_refill_one()
332 if (!recv->r_ibinc) in rds_ib_recv_refill_one()
336 WARN_ON(recv->r_frag); /* leak! */ in rds_ib_recv_refill_one()
337 recv->r_frag = rds_ib_refill_one_frag(ic, slab_mask, page_mask); in rds_ib_recv_refill_one()
338 if (!recv->r_frag) in rds_ib_recv_refill_one()
341 ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, in rds_ib_recv_refill_one()
345 sge = &recv->r_sge[0]; in rds_ib_recv_refill_one()
346 sge->addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs]; in rds_ib_recv_refill_one()
349 sge = &recv->r_sge[1]; in rds_ib_recv_refill_one()
350 sge->addr = sg_dma_address(&recv->r_frag->f_sg); in rds_ib_recv_refill_one()
351 sge->length = sg_dma_len(&recv->r_frag->f_sg); in rds_ib_recv_refill_one()
385 struct rds_ib_recv_work *recv; in rds_ib_recv_refill() local
407 recv = &ic->i_recvs[pos]; in rds_ib_recv_refill()
408 ret = rds_ib_recv_refill_one(conn, recv, gfp); in rds_ib_recv_refill()
414 rdsdebug("recv %p ibinc %p page %p addr %lu\n", recv, in rds_ib_recv_refill()
415 recv->r_ibinc, sg_page(&recv->r_frag->f_sg), in rds_ib_recv_refill()
416 (long)sg_dma_address(&recv->r_frag->f_sg)); in rds_ib_recv_refill()
419 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, NULL); in rds_ib_recv_refill()
849 struct rds_ib_recv_work *recv, u32 data_len, in rds_ib_process_recv() argument
855 dma_addr_t dma_addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs]; in rds_ib_process_recv()
859 rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv, in rds_ib_process_recv()
872 ihdr = ic->i_recv_hdrs[recv - ic->i_recvs]; in rds_ib_process_recv()
910 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_process_recv()
911 recv->r_frag = NULL; in rds_ib_process_recv()
922 ibinc = recv->r_ibinc; in rds_ib_process_recv()
923 recv->r_ibinc = NULL; in rds_ib_process_recv()
950 list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags); in rds_ib_process_recv()
951 recv->r_frag = NULL; in rds_ib_process_recv()
988 struct rds_ib_recv_work *recv; in rds_ib_recv_cqe_handler() local
996 recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)]; in rds_ib_recv_cqe_handler()
997 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, in rds_ib_recv_cqe_handler()
1005 rds_ib_process_recv(conn, recv, wc->byte_len, state); in rds_ib_recv_cqe_handler()
1023 if (recv->r_frag) { in rds_ib_recv_cqe_handler()
1024 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_recv_cqe_handler()
1025 recv->r_frag = NULL; in rds_ib_recv_cqe_handler()