]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of rs-1sge
authorSean Hefty <sean.hefty@intel.com>
Sat, 9 Jun 2012 00:29:15 +0000 (17:29 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sat, 9 Jun 2012 00:29:15 +0000 (17:29 -0700)
src/rsocket.c

index 0f3bc91082a792849c5d3b202e82185b01013586..fa16f85e3db29b63f2bdba612e2949f00fa41009 100644 (file)
@@ -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;