Lines Matching refs:rm
80 static void rds_ib_send_complete(struct rds_message *rm, in rds_ib_send_complete() argument
82 void (*complete)(struct rds_message *rm, int status)) in rds_ib_send_complete() argument
102 complete(rm, notify_status); in rds_ib_send_complete()
169 struct rds_message *rm = container_of(op, struct rds_message, data); in rds_ib_send_unmap_data() local
176 if (rm->rdma.op_active && rm->data.op_notify) in rds_ib_send_unmap_data()
177 rds_ib_send_unmap_rdma(ic, &rm->rdma, wc_status); in rds_ib_send_unmap_data()
191 struct rds_message *rm = NULL; in rds_ib_send_unmap_op() local
197 rm = container_of(send->s_op, struct rds_message, data); in rds_ib_send_unmap_op()
204 rm = container_of(send->s_op, struct rds_message, rdma); in rds_ib_send_unmap_op()
211 rm = container_of(send->s_op, struct rds_message, atomic); in rds_ib_send_unmap_op()
224 return rm; in rds_ib_send_unmap_op()
283 struct rds_message *rm = NULL; in rds_ib_send_cq_comp_handler() local
321 rm = rds_ib_send_unmap_op(ic, send, wc.status); in rds_ib_send_cq_comp_handler()
327 if (send->s_op == rm->m_final_op) { in rds_ib_send_cq_comp_handler()
330 rds_message_unmapped(rm); in rds_ib_send_cq_comp_handler()
332 rds_message_put(rm); in rds_ib_send_cq_comp_handler()
530 int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm, in rds_ib_xmit() argument
557 && rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) { in rds_ib_xmit()
559 scat = &rm->data.op_sg[sg]; in rds_ib_xmit()
565 if (be32_to_cpu(rm->m_inc.i_hdr.h_len) == 0) in rds_ib_xmit()
568 i = ceil(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE); in rds_ib_xmit()
596 if (rm->data.op_nents) { in rds_ib_xmit()
597 rm->data.op_count = ib_dma_map_sg(dev, in rds_ib_xmit()
598 rm->data.op_sg, in rds_ib_xmit()
599 rm->data.op_nents, in rds_ib_xmit()
601 rdsdebug("ic %p mapping rm %p: %d\n", ic, rm, rm->data.op_count); in rds_ib_xmit()
602 if (rm->data.op_count == 0) { in rds_ib_xmit()
609 rm->data.op_count = 0; in rds_ib_xmit()
612 rds_message_addref(rm); in rds_ib_xmit()
613 ic->i_data_op = &rm->data; in rds_ib_xmit()
616 if (test_bit(RDS_MSG_ACK_REQUIRED, &rm->m_flags)) in rds_ib_xmit()
617 rm->m_inc.i_hdr.h_flags |= RDS_FLAG_ACK_REQUIRED; in rds_ib_xmit()
618 if (test_bit(RDS_MSG_RETRANSMITTED, &rm->m_flags)) in rds_ib_xmit()
619 rm->m_inc.i_hdr.h_flags |= RDS_FLAG_RETRANSMITTED; in rds_ib_xmit()
623 if (rm->rdma.op_active) { in rds_ib_xmit()
626 ext_hdr.h_rdma_rkey = cpu_to_be32(rm->rdma.op_rkey); in rds_ib_xmit()
627 rds_message_add_extension(&rm->m_inc.i_hdr, in rds_ib_xmit()
630 if (rm->m_rdma_cookie) { in rds_ib_xmit()
631 rds_message_add_rdma_dest_extension(&rm->m_inc.i_hdr, in rds_ib_xmit()
632 rds_rdma_cookie_key(rm->m_rdma_cookie), in rds_ib_xmit()
633 rds_rdma_cookie_offset(rm->m_rdma_cookie)); in rds_ib_xmit()
640 rm->m_inc.i_hdr.h_ack = cpu_to_be64(rds_ib_piggyb_ack(ic)); in rds_ib_xmit()
641 rds_message_make_checksum(&rm->m_inc.i_hdr); in rds_ib_xmit()
659 if (rm->rdma.op_active && rm->rdma.op_fence) in rds_ib_xmit()
683 memcpy(&ic->i_send_hdrs[pos], &rm->m_inc.i_hdr, sizeof(struct rds_header)); in rds_ib_xmit()
687 && scat != &rm->data.op_sg[rm->data.op_count]) { in rds_ib_xmit()
735 && scat != &rm->data.op_sg[rm->data.op_count]); in rds_ib_xmit()
743 if (scat == &rm->data.op_sg[rm->data.op_count]) { in rds_ib_xmit()