From: Sean Hefty Date: Sat, 9 Jun 2012 00:29:15 +0000 (-0700) Subject: Refresh of rs-1sge X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8116d0c78faabc0ada51a7dc7e7416c5ffc89edc;p=~shefty%2Flibrdmacm.git Refresh of rs-1sge --- diff --git a/src/rsocket.c b/src/rsocket.c index 0f3bc910..fa16f85e 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -756,6 +756,12 @@ static int rs_post_write(struct rsocket *rs, uint64_t wr_id, return rdma_seterrno(ibv_post_send(rs->cm_id->qp, &wr, &bad)); } +static uint32_t rs_sbuf_left(struct rsocket *rs) +{ + return (uint32_t) (((uint64_t) (uintptr_t) &rs->sbuf[rs->sbuf_size]) - + rs->ssge.addr); +} + /* * Update target SGE before sending data. Otherwise the remote side may * update the entry before we do. @@ -791,12 +797,6 @@ static int rs_write_data(struct rsocket *rs, struct ibv_sge *sge, int flags) return ret; } -static uint32_t rs_sbuf_left(struct rsocket *rs) -{ - return (uint32_t) (((uint64_t) (uintptr_t) &rs->sbuf[rs->sbuf_size]) - - rs->ssge.addr); -} - static void rs_send_credits(struct rsocket *rs) { struct ibv_sge ibsge;