Lines Matching refs:recv

49 	struct rds_ib_recv_work *recv;
52 for (i = 0, recv = ic->i_recvs; i < ic->i_recv_ring.w_nr; i++, recv++) {
55 recv->r_ibinc = NULL;
56 recv->r_frag = NULL;
58 recv->r_wr.next = NULL;
59 recv->r_wr.wr_id = i;
60 recv->r_wr.sg_list = recv->r_sge;
61 recv->r_wr.num_sge = RDS_IB_RECV_SGE;
63 sge = &recv->r_sge[0];
68 sge = &recv->r_sge[1];
191 /* Recycle frag and attached recv buffer f_sg */
224 struct rds_ib_recv_work *recv)
226 if (recv->r_ibinc) {
227 rds_inc_put(&recv->r_ibinc->ii_inc);
228 recv->r_ibinc = NULL;
230 if (recv->r_frag) {
231 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE);
232 rds_ib_frag_free(ic, recv->r_frag);
233 recv->r_frag = NULL;
308 struct rds_ib_recv_work *recv, gfp_t gfp)
327 * ibinc was taken from recv if recv contained the start of a message.
330 if (!recv->r_ibinc) {
331 recv->r_ibinc = rds_ib_refill_one_inc(ic, slab_mask);
332 if (!recv->r_ibinc)
336 WARN_ON(recv->r_frag); /* leak! */
337 recv->r_frag = rds_ib_refill_one_frag(ic, slab_mask, page_mask);
338 if (!recv->r_frag)
341 ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg,
345 sge = &recv->r_sge[0];
346 sge->addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs];
349 sge = &recv->r_sge[1];
350 sge->addr = sg_dma_address(&recv->r_frag->f_sg);
351 sge->length = sg_dma_len(&recv->r_frag->f_sg);
385 struct rds_ib_recv_work *recv;
407 recv = &ic->i_recvs[pos];
408 ret = rds_ib_recv_refill_one(conn, recv, gfp);
414 rdsdebug("recv %p ibinc %p page %p addr %lu\n", recv,
415 recv->r_ibinc, sg_page(&recv->r_frag->f_sg),
416 (long)sg_dma_address(&recv->r_frag->f_sg));
419 ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, NULL);
421 rds_ib_conn_error(conn, "recv post on "
466 * We want to recycle several types of recv allocations, like incs and frags.
695 * 1. We call rds_ib_attempt_ack from the recv completion handler
728 * When we get here, we're called from the recv queue handler.
849 struct rds_ib_recv_work *recv, u32 data_len,
855 dma_addr_t dma_addr = ic->i_recv_hdrs_dma[recv - ic->i_recvs];
859 rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv,
872 ihdr = ic->i_recv_hdrs[recv - ic->i_recvs];
904 * page ref ourselves. We can't just leave the page on the recv
905 * because that confuses the dma mapping of pages and each recv's use
910 rds_ib_frag_free(ic, recv->r_frag);
911 recv->r_frag = NULL;
922 ibinc = recv->r_ibinc;
923 recv->r_ibinc = NULL;
950 list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags);
951 recv->r_frag = NULL;
988 struct rds_ib_recv_work *recv;
996 recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)];
997 ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1,
1001 * to get a recv completion _before_ the rdmacm ESTABLISHED
1005 rds_ib_process_recv(conn, recv, wc->byte_len, state);
1009 rds_ib_conn_error(conn, "recv completion on <%pI6c,%pI6c, %d> had status %u (%s), vendor err 0x%x, disconnecting and reconnecting\n",
1023 if (recv->r_frag) {
1024 rds_ib_frag_free(ic, recv->r_frag);
1025 recv->r_frag = NULL;
1061 /* Default to 30% of all available RAM for recv memory */