Lines Matching defs:recv

50 	struct rds_ib_recv_work *recv;
53 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) {
56 recv->r_ibinc = NULL;
57 recv->r_frag = NULL;
59 recv->r_wr.next = NULL;
60 recv->r_wr.wr_id = i;
61 recv->r_wr.sg_list = recv->r_sge;
62 recv->r_wr.num_sge = RDS_IB_RECV_SGE;
64 sge = &recv->r_sge[0];
69 sge = &recv->r_sge[1];
192 /* Recycle frag and attached recv buffer f_sg */
225 struct rds_ib_recv_work *recv)
227 if (recv->r_ibinc) {
228 rds_inc_put(&recv->r_ibinc->ii_inc);
229 recv->r_ibinc = NULL;
231 if (recv->r_frag) {
232 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE);
233 rds_ib_frag_free(ic, recv->r_frag);
234 recv->r_frag = NULL;
309 struct rds_ib_recv_work *recv, gfp_t gfp)
328 * ibinc was taken from recv if recv contained the start of a message.
331 if (!recv->r_ibinc) {
332 recv->r_ibinc = rds_ib_refill_one_inc(ic, slab_mask);
333 if (!recv->r_ibinc)
337 WARN_ON(recv->r_frag); /* leak! */
338 recv->r_frag = rds_ib_refill_one_frag(ic, slab_mask, page_mask);
339 if (!recv->r_frag)
342 ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg,
346 sge = &recv->r_sge[0];
347 sge->addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs];
350 sge = &recv->r_sge[1];
351 sge->addr = sg_dma_address(&recv->r_frag->f_sg);
352 sge->length = sg_dma_len(&recv->r_frag->f_sg);
386 struct rds_ib_recv_work *recv;
408 recv = &ic->i_recvs[pos];
409 ret = rds_ib_recv_refill_one(conn, recv, gfp);
415 rdsdebug("recv %p ibinc %p page %p addr %lu\n", recv,
416 recv->r_ibinc, sg_page(&recv->r_frag->f_sg),
417 (long)sg_dma_address(&recv->r_frag->f_sg));
420 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, NULL);
422 rds_ib_conn_error(conn, "recv post on "
467 * We want to recycle several types of recv allocations, like incs and frags.
696 * 1. We call rds_ib_attempt_ack from the recv completion handler
729 * When we get here, we're called from the recv queue handler.
850 struct rds_ib_recv_work *recv, u32 data_len,
856 dma_addr_t dma_addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs];
860 rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv,
873 ihdr = ic->i_recv_hdrs[recv - ic->i_recvs];
905 * page ref ourselves. We can't just leave the page on the recv
906 * because that confuses the dma mapping of pages and each recv's use
911 rds_ib_frag_free(ic, recv->r_frag);
912 recv->r_frag = NULL;
923 ibinc = recv->r_ibinc;
924 recv->r_ibinc = NULL;
951 list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags);
952 recv->r_frag = NULL;
989 struct rds_ib_recv_work *recv;
997 recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)];
998 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1,
1002 * to get a recv completion _before_ the rdmacm ESTABLISHED
1006 rds_ib_process_recv(conn, recv, wc->byte_len, state);
1010 rds_ib_conn_error(conn, "recv completion on <%pI6c,%pI6c, %d> had status %u (%s), vendor err 0x%x, disconnecting and reconnecting\n",
1024 if (recv->r_frag) {
1025 rds_ib_frag_free(ic, recv->r_frag);
1026 recv->r_frag = NULL;
1062 /* Default to 30% of all available RAM for recv memory */