• Home
  • Raw
  • Download

Lines Matching refs:recv

48 	struct rds_ib_recv_work *recv;  in rds_ib_recv_init_ring()  local
51 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) { in rds_ib_recv_init_ring()
54 recv->r_ibinc = NULL; in rds_ib_recv_init_ring()
55 recv->r_frag = NULL; in rds_ib_recv_init_ring()
57 recv->r_wr.next = NULL; in rds_ib_recv_init_ring()
58 recv->r_wr.wr_id = i; in rds_ib_recv_init_ring()
59 recv->r_wr.sg_list = recv->r_sge; in rds_ib_recv_init_ring()
60 recv->r_wr.num_sge = RDS_IB_RECV_SGE; in rds_ib_recv_init_ring()
62 sge = &recv->r_sge[0]; in rds_ib_recv_init_ring()
67 sge = &recv->r_sge[1]; in rds_ib_recv_init_ring()
220 struct rds_ib_recv_work *recv) in rds_ib_recv_clear_one() argument
222 if (recv->r_ibinc) { in rds_ib_recv_clear_one()
223 rds_inc_put(&recv->r_ibinc->ii_inc); in rds_ib_recv_clear_one()
224 recv->r_ibinc = NULL; in rds_ib_recv_clear_one()
226 if (recv->r_frag) { in rds_ib_recv_clear_one()
227 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); in rds_ib_recv_clear_one()
228 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_recv_clear_one()
229 recv->r_frag = NULL; in rds_ib_recv_clear_one()
300 struct rds_ib_recv_work *recv, int prefill) in rds_ib_recv_refill_one() argument
322 if (!recv->r_ibinc) { in rds_ib_recv_refill_one()
323 recv->r_ibinc = rds_ib_refill_one_inc(ic, slab_mask); in rds_ib_recv_refill_one()
324 if (!recv->r_ibinc) in rds_ib_recv_refill_one()
328 WARN_ON(recv->r_frag); /* leak! */ in rds_ib_recv_refill_one()
329 recv->r_frag = rds_ib_refill_one_frag(ic, slab_mask, page_mask); in rds_ib_recv_refill_one()
330 if (!recv->r_frag) in rds_ib_recv_refill_one()
333 ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, in rds_ib_recv_refill_one()
337 sge = &recv->r_sge[0]; in rds_ib_recv_refill_one()
338 sge->addr = ic->i_recv_hdrs_dma + (recv - ic->i_recvs) * sizeof(struct rds_header); in rds_ib_recv_refill_one()
341 sge = &recv->r_sge[1]; in rds_ib_recv_refill_one()
342 sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg); in rds_ib_recv_refill_one()
343 sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg); in rds_ib_recv_refill_one()
360 struct rds_ib_recv_work *recv; in rds_ib_recv_refill() local
374 recv = &ic->i_recvs[pos]; in rds_ib_recv_refill()
375 ret = rds_ib_recv_refill_one(conn, recv, prefill); in rds_ib_recv_refill()
381 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); in rds_ib_recv_refill()
382 rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, in rds_ib_recv_refill()
383 recv->r_ibinc, sg_page(&recv->r_frag->f_sg), in rds_ib_recv_refill()
386 &recv->r_frag->f_sg), in rds_ib_recv_refill()
819 struct rds_ib_recv_work *recv, u32 data_len, in rds_ib_process_recv() argument
828 rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv, in rds_ib_process_recv()
841 ihdr = &ic->i_recv_hdrs[recv - ic->i_recvs]; in rds_ib_process_recv()
877 rds_ib_frag_free(ic, recv->r_frag); in rds_ib_process_recv()
878 recv->r_frag = NULL; in rds_ib_process_recv()
889 ibinc = recv->r_ibinc; in rds_ib_process_recv()
890 recv->r_ibinc = NULL; in rds_ib_process_recv()
913 list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags); in rds_ib_process_recv()
914 recv->r_frag = NULL; in rds_ib_process_recv()
969 struct rds_ib_recv_work *recv; in rds_poll_cq() local
978 recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)]; in rds_poll_cq()
980 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); in rds_poll_cq()
988 rds_ib_process_recv(conn, recv, wc.byte_len, state); in rds_poll_cq()