--- /dev/null
+Bottom: 9e9be02403dd00064b5f95e25a4b658e94df193f
+Top: b0b290209f74fac22ab4edeb9acc1cfdd6e9cc51
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2014-04-17 18:41:48 -0700
+
+Refresh of inline0
+
+---
+
+diff --git a/src/rsocket.c b/src/rsocket.c
+index 86eedd2..beba738 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -1608,59 +1608,12 @@ int rconnect(int socket, const struct sockaddr *addr, socklen_t addrlen)
+ return ret;
+ }
+
+-static void *rs_get_ctrl_buf(struct rsocket *rs)
++static struct rs_sge *rs_get_ctrl_buf(struct rsocket *rs)
+ {
+ return rs->sbuf + rs->sbuf_size +
+ RS_MAX_CTRL_MSG * (rs->ctrl_seqno & (RS_QP_CTRL_SIZE - 1));
+ }
+
+-//static int rs_post_send_msg(struct rsocket *rs, uint64_t wr_id, uint32_t msg)
+-//{
+-// struct ibv_send_wr wr, *bad;
+-// struct ibv_sge sge;
+-// void *ctrl_buf;
+-//
+-// wr.wr_id = wr_id;
+-// wr.next = NULL;
+-// if (rs->sq_inline < sizeof msg) {
+-// ctrl_buf = rs_get_ctrl_buf(rs);
+-// memcpy(ctrl_buf, &msg, sizeof msg);
+-// sge.addr = (uintptr_t) ctrl_buf;
+-// sge.lkey = rs->smr->lkey;
+-// sge.length = sizeof msg;
+-// wr.send_flags = 0;
+-// } else {
+-// sge.addr = (uintptr_t) &msg;
+-// sge.lkey = 0;
+-// sge.length = sizeof msg;
+-// wr.send_flags = IBV_SEND_INLINE;
+-// }
+-// wr.sg_list = &sge;
+-// wr.num_sge = 1;
+-// wr.opcode = IBV_WR_SEND;
+-//
+-// return rdma_seterrno(ibv_post_send(rs->cm_id->qp, &wr, &bad));
+-//}
+-//
+-//static int rs_post_msg(struct rsocket *rs, uint32_t msg)
+-//{
+-// struct ibv_send_wr wr, *bad;
+-// struct ibv_sge sge;
+-//
+-// if (rs->opts & RS_OPT_MSG_SEND)
+-// return rs_post_send_msg(rs, rs_send_wr_id(msg), msg);
+-//
+-// wr.wr_id = rs_send_wr_id(msg);
+-// wr.next = NULL;
+-// 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);
+-//
+-// return rdma_seterrno(ibv_post_send(rs->cm_id->qp, &wr, &bad));
+-//}
+-
+ static int rs_post_msg(struct rsocket *rs, uint32_t msg)
+ {
+ struct ibv_send_wr wr, *bad;
+@@ -1821,9 +1774,8 @@ static int rs_write_iomap(struct rsocket *rs, struct rs_iomap_mr *iomr,
+ rs->sbuf_bytes_avail -= sizeof(struct rs_iomap);
+
+ addr = rs->remote_iomap.addr + iomr->index * sizeof(struct rs_iomap);
+- return rs_post_write_msg(rs, sgl, nsge,
+- rs_msg_set(RS_OP_IOMAP_SGL, iomr->index), flags, addr,
+- rs->remote_iomap.key);
++ return rs_post_write_msg(rs, sgl, nsge, rs_msg_set(RS_OP_IOMAP_SGL, iomr->index),
++ flags, addr, rs->remote_iomap.key);
+ }
+
+ static uint32_t rs_sbuf_left(struct rsocket *rs)
+@@ -1835,7 +1787,8 @@ static uint32_t rs_sbuf_left(struct rsocket *rs)
+ static void rs_send_credits(struct rsocket *rs)
+ {
+ struct ibv_sge ibsge;
+- struct rs_sge sge;
++ struct rs_sge sge, *sge_buf;
++ int flags;
+
+ rs->ctrl_seqno++;
+ rs->rseq_comp = rs->rseq_no + (rs->rq_size >> 1);
+@@ -1853,13 +1806,21 @@ static void rs_send_credits(struct rsocket *rs)
+ sge.length = bswap_32(rs->rbuf_size >> 1);
+ }
+
+- ibsge.addr = (uintptr_t) &sge;
+- ibsge.lkey = 0;
++ if (rs->sq_inline < sizeof sge) {
++ sge_buf = rs_get_ctrl_buf(rs);
++ memcpy(sge_buf, &sge, sizeof sge);
++ ibsge.addr = (uintptr_t) sge_buf;
++ ibsge.lkey = rs->smr->lkey;
++ flags = 0;
++ } else {
++ ibsge.addr = (uintptr_t) &sge;
++ ibsge.lkey = 0;
++ flags = IBV_SEND_INLINE;
++ }
+ ibsge.length = sizeof(sge);
+
+ rs_post_write_msg(rs, &ibsge, 1,
+- rs_msg_set(RS_OP_SGL, rs->rseq_no + rs->rq_size),
+- IBV_SEND_INLINE,
++ rs_msg_set(RS_OP_SGL, rs->rseq_no + rs->rq_size), flags,
+ rs->remote_sgl.addr + rs->remote_sge * sizeof(struct rs_sge),
+ rs->remote_sgl.key);