Lines Matching refs:op

106 				   struct rm_data_op *op,
109 if (op->op_nents)
111 op->op_sg, op->op_nents,
116 struct rm_rdma_op *op,
119 if (op->op_mapped) {
121 op->op_sg, op->op_nents,
122 op->op_write ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
123 op->op_mapped = 0;
146 rds_ib_send_complete(container_of(op, struct rds_message, rdma),
149 if (op->op_write)
150 rds_stats_add(s_send_rdma_bytes, op->op_bytes);
152 rds_stats_add(s_recv_rdma_bytes, op->op_bytes);
156 struct rm_atomic_op *op,
160 if (op->op_mapped) {
161 ib_dma_unmap_sg(ic->i_cm_id->device, op->op_sg, 1,
163 op->op_mapped = 0;
166 rds_ib_send_complete(container_of(op, struct rds_message, atomic),
169 if (op->op_type == RDS_ATOMIC_TYPE_CSWP)
616 /* If it has a RDMA op, tell the peer we did it. This is
786 int rds_ib_xmit_atomic(struct rds_connection *conn, struct rm_atomic_op *op)
811 if (op->op_type == RDS_ATOMIC_TYPE_CSWP) {
813 send->s_wr.wr.atomic.compare_add = op->op_m_cswp.compare;
814 send->s_wr.wr.atomic.swap = op->op_m_cswp.swap;
815 send->s_wr.wr.atomic.compare_add_mask = op->op_m_cswp.compare_mask;
816 send->s_wr.wr.atomic.swap_mask = op->op_m_cswp.swap_mask;
819 send->s_wr.wr.atomic.compare_add = op->op_m_fadd.add;
821 send->s_wr.wr.atomic.compare_add_mask = op->op_m_fadd.nocarry_mask;
824 nr_sig = rds_ib_set_wr_signal_state(ic, send, op->op_notify);
827 send->s_wr.wr.atomic.remote_addr = op->op_remote_addr;
828 send->s_wr.wr.atomic.rkey = op->op_rkey;
829 send->s_op = op;
833 ret = ib_dma_map_sg(ic->i_cm_id->device, op->op_sg, 1, DMA_FROM_DEVICE);
834 rdsdebug("ic %p mapping atomic op %p. mapped %d pg\n", ic, op, ret);
843 send->s_sge[0].addr = ib_sg_dma_address(ic->i_cm_id->device, op->op_sg);
844 send->s_sge[0].length = ib_sg_dma_len(ic->i_cm_id->device, op->op_sg);
847 rdsdebug("rva %Lx rpa %Lx len %u\n", op->op_remote_addr,
875 int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op)
884 u64 remote_addr = op->op_remote_addr;
895 /* map the op the first time we see it */
896 if (!op->op_mapped) {
897 op->op_count = ib_dma_map_sg(ic->i_cm_id->device,
898 op->op_sg, op->op_nents, (op->op_write) ?
900 rdsdebug("ic %p mapping op %p: %d\n", ic, op, op->op_count);
901 if (op->op_count == 0) {
907 op->op_mapped = 1;
914 i = ceil(op->op_count, max_sge);
927 scat = &op->op_sg[0];
929 num_sge = op->op_count;
931 for (i = 0; i < work_alloc && scat != &op->op_sg[op->op_count]; i++) {
936 nr_sig += rds_ib_set_wr_signal_state(ic, send, op->op_notify);
938 send->s_wr.opcode = op->op_write ? IB_WR_RDMA_WRITE : IB_WR_RDMA_READ;
940 send->s_wr.wr.rdma.rkey = op->op_rkey;
954 for (j = 0; j < send->s_wr.num_sge && scat != &op->op_sg[op->op_count]; j++) {
976 /* give a reference to the last op */
977 if (scat == &op->op_sg[op->op_count]) {
978 prev->s_op = op;
979 rds_message_addref(container_of(op, struct rds_message, rdma));