Lines Matching refs:recv

50 	struct rds_ib_recv_work *recv;  in rds_ib_recv_init_ring()  local
53 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) { in rds_ib_recv_init_ring()
56 recv->r_ibinc = NULL; in rds_ib_recv_init_ring()
57 recv->r_frag = NULL; in rds_ib_recv_init_ring()
59 recv->r_wr.next = NULL; in rds_ib_recv_init_ring()
60 recv->r_wr.wr_id = i; in rds_ib_recv_init_ring()
61 recv->r_wr.sg_list = recv->r_sge; in rds_ib_recv_init_ring()
62 recv->r_wr.num_sge = RDS_IB_RECV_SGE; in rds_ib_recv_init_ring()
64 sge = &recv->r_sge[0]; in rds_ib_recv_init_ring()
69 sge = &recv->r_sge[1]; in rds_ib_recv_init_ring()
225 struct rds_ib_recv_work *recv) in rds_ib_recv_clear_one() argument
227 if (recv->r_ibinc) { in rds_ib_recv_clear_one()
228 rds_inc_put(&recv->r_ibinc->ii_inc); in rds_ib_recv_clear_one()
229 recv->r_ibinc = NULL; in rds_ib_recv_clear_one()
231 if (recv->r_frag) { in rds_ib_recv_clear_one()
232 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); in rds_ib_recv_clear_one()
233 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_recv_clear_one()
234 recv->r_frag = NULL; in rds_ib_recv_clear_one()
309 struct rds_ib_recv_work *recv, gfp_t gfp) in rds_ib_recv_refill_one() argument
331 if (!recv->r_ibinc) { in rds_ib_recv_refill_one()
332 recv->r_ibinc = rds_ib_refill_one_inc(ic, slab_mask); in rds_ib_recv_refill_one()
333 if (!recv->r_ibinc) in rds_ib_recv_refill_one()
337 WARN_ON(recv->r_frag); /* leak! */ in rds_ib_recv_refill_one()
338 recv->r_frag = rds_ib_refill_one_frag(ic, slab_mask, page_mask); in rds_ib_recv_refill_one()
339 if (!recv->r_frag) in rds_ib_recv_refill_one()
342 ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, in rds_ib_recv_refill_one()
346 sge = &recv->r_sge[0]; in rds_ib_recv_refill_one()
347 sge->addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs]; in rds_ib_recv_refill_one()
350 sge = &recv->r_sge[1]; in rds_ib_recv_refill_one()
351 sge->addr = sg_dma_address(&recv->r_frag->f_sg); in rds_ib_recv_refill_one()
352 sge->length = sg_dma_len(&recv->r_frag->f_sg); in rds_ib_recv_refill_one()
386 struct rds_ib_recv_work *recv; in rds_ib_recv_refill() local
408 recv = &ic->i_recvs[pos]; in rds_ib_recv_refill()
409 ret = rds_ib_recv_refill_one(conn, recv, gfp); in rds_ib_recv_refill()
415 rdsdebug("recv %p ibinc %p page %p addr %lu\n", recv, in rds_ib_recv_refill()
416 recv->r_ibinc, sg_page(&recv->r_frag->f_sg), in rds_ib_recv_refill()
417 (long)sg_dma_address(&recv->r_frag->f_sg)); in rds_ib_recv_refill()
420 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, NULL); in rds_ib_recv_refill()
850 struct rds_ib_recv_work *recv, u32 data_len, in rds_ib_process_recv() argument
856 dma_addr_t dma_addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs]; in rds_ib_process_recv()
860 rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv, in rds_ib_process_recv()
873 ihdr = ic->i_recv_hdrs[recv - ic->i_recvs]; in rds_ib_process_recv()
911 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_process_recv()
912 recv->r_frag = NULL; in rds_ib_process_recv()
923 ibinc = recv->r_ibinc; in rds_ib_process_recv()
924 recv->r_ibinc = NULL; in rds_ib_process_recv()
951 list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags); in rds_ib_process_recv()
952 recv->r_frag = NULL; in rds_ib_process_recv()
989 struct rds_ib_recv_work *recv; in rds_ib_recv_cqe_handler() local
997 recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)]; in rds_ib_recv_cqe_handler()
998 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, in rds_ib_recv_cqe_handler()
1006 rds_ib_process_recv(conn, recv, wc->byte_len, state); in rds_ib_recv_cqe_handler()
1024 if (recv->r_frag) { in rds_ib_recv_cqe_handler()
1025 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_recv_cqe_handler()
1026 recv->r_frag = NULL; in rds_ib_recv_cqe_handler()