Lines Matching full:rm
611 int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, in rds_cmsg_rdma_args() argument
616 struct rm_rdma_op *op = &rm->rdma; in rds_cmsg_rdma_args()
626 || rm->rdma.op_active) in rds_cmsg_rdma_args()
672 op->op_sg = rds_message_alloc_sgs(rm, nr_pages); in rds_cmsg_rdma_args()
811 int rds_cmsg_rdma_dest(struct rds_sock *rs, struct rds_message *rm, in rds_cmsg_rdma_dest() argument
820 rm->m_rdma_cookie != 0) in rds_cmsg_rdma_dest()
823 memcpy(&rm->m_rdma_cookie, CMSG_DATA(cmsg), sizeof(rm->m_rdma_cookie)); in rds_cmsg_rdma_dest()
830 r_key = rds_rdma_cookie_key(rm->m_rdma_cookie); in rds_cmsg_rdma_dest()
843 rm->rdma.op_rdma_mr = mr; in rds_cmsg_rdma_dest()
851 * in rm->m_rdma_cookie. This causes it to be sent along to the peer
854 int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm, in rds_cmsg_rdma_map() argument
858 rm->m_rdma_cookie != 0) in rds_cmsg_rdma_map()
861 return __rds_rdma_map(rs, CMSG_DATA(cmsg), &rm->m_rdma_cookie, in rds_cmsg_rdma_map()
862 &rm->rdma.op_rdma_mr, rm->m_conn_path); in rds_cmsg_rdma_map()
868 int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, in rds_cmsg_atomic() argument
876 || rm->atomic.op_active) in rds_cmsg_atomic()
884 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
885 rm->atomic.op_m_fadd.add = args->fadd.add; in rds_cmsg_atomic()
886 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic()
889 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
890 rm->atomic.op_m_fadd.add = args->m_fadd.add; in rds_cmsg_atomic()
891 rm->atomic.op_m_fadd.nocarry_mask = args->m_fadd.nocarry_mask; in rds_cmsg_atomic()
894 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic()
895 rm->atomic.op_m_cswp.compare = args->cswp.compare; in rds_cmsg_atomic()
896 rm->atomic.op_m_cswp.swap = args->cswp.swap; in rds_cmsg_atomic()
897 rm->atomic.op_m_cswp.compare_mask = ~0; in rds_cmsg_atomic()
898 rm->atomic.op_m_cswp.swap_mask = ~0; in rds_cmsg_atomic()
901 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic()
902 rm->atomic.op_m_cswp.compare = args->m_cswp.compare; in rds_cmsg_atomic()
903 rm->atomic.op_m_cswp.swap = args->m_cswp.swap; in rds_cmsg_atomic()
904 rm->atomic.op_m_cswp.compare_mask = args->m_cswp.compare_mask; in rds_cmsg_atomic()
905 rm->atomic.op_m_cswp.swap_mask = args->m_cswp.swap_mask; in rds_cmsg_atomic()
911 rm->atomic.op_notify = !!(args->flags & RDS_RDMA_NOTIFY_ME); in rds_cmsg_atomic()
912 rm->atomic.op_silent = !!(args->flags & RDS_RDMA_SILENT); in rds_cmsg_atomic()
913 rm->atomic.op_active = 1; in rds_cmsg_atomic()
914 rm->atomic.op_recverr = rs->rs_recverr; in rds_cmsg_atomic()
915 rm->atomic.op_sg = rds_message_alloc_sgs(rm, 1); in rds_cmsg_atomic()
916 if (IS_ERR(rm->atomic.op_sg)) { in rds_cmsg_atomic()
917 ret = PTR_ERR(rm->atomic.op_sg); in rds_cmsg_atomic()
932 sg_set_page(rm->atomic.op_sg, page, 8, offset_in_page(args->local_addr)); in rds_cmsg_atomic()
934 if (rm->atomic.op_notify || rm->atomic.op_recverr) { in rds_cmsg_atomic()
940 rm->atomic.op_notifier = kmalloc(sizeof(*rm->atomic.op_notifier), GFP_KERNEL); in rds_cmsg_atomic()
941 if (!rm->atomic.op_notifier) { in rds_cmsg_atomic()
946 rm->atomic.op_notifier->n_user_token = args->user_token; in rds_cmsg_atomic()
947 rm->atomic.op_notifier->n_status = RDS_RDMA_SUCCESS; in rds_cmsg_atomic()
950 rm->atomic.op_rkey = rds_rdma_cookie_key(args->cookie); in rds_cmsg_atomic()
951 rm->atomic.op_remote_addr = args->remote_addr + rds_rdma_cookie_offset(args->cookie); in rds_cmsg_atomic()
957 rm->atomic.op_active = 0; in rds_cmsg_atomic()
958 kfree(rm->atomic.op_notifier); in rds_cmsg_atomic()