wr.wr_id = rs_send_wr_id(msg);
wr.next = NULL;
if (!(rs->opts & RS_OPT_MSG_SEND)) {
- wr.sg_list = &sge;
- wr.num_sge = 1;
- wr.opcode = IBV_WR_SEND;
- wr.send_flags = IBV_SEND_INLINE;
- } else {
wr.sg_list = NULL;
wr.num_sge = 0;
wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM;
wr.send_flags = 0;
wr.imm_data = htonl(msg);
+ } else {
+ wr.sg_list = &sge;
+ wr.num_sge = 1;
+ wr.opcode = IBV_WR_SEND;
+ wr.send_flags = IBV_SEND_INLINE;
}
return rdma_seterrno(ibv_post_send(rs->cm_id->qp, &wr, &bad));