]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of pre-qpsize
authorSean Hefty <sean.hefty@intel.com>
Tue, 22 May 2012 18:50:03 +0000 (11:50 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 22 May 2012 18:50:03 +0000 (11:50 -0700)
src/preload.c

index 1214bb5614a1167715210b03818b3e43fd9e36f0..a3ef48830cbf901841190feac658436cb2e1905c 100644 (file)
@@ -99,6 +99,7 @@ static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
 
 static int sq_size;
 static int rq_size;
+static int sq_inline;
 
 enum fd_type {
        fd_normal,
@@ -210,6 +211,10 @@ void getenv_options(void)
        var = getenv("RS_RQ_SIZE");
        if (var)
                rq_size = atoi(var);
+
+       var = getenv("RS_INLINE");
+       if (var)
+               sq_inline = atoi(var);
 }
 
 static void init_preload(void)
@@ -313,6 +318,9 @@ void set_rsocket_options(int rsocket)
 
        if (rq_size)
                rsetsockopt(rsocket, SOL_RDMA, RDMA_RQSIZE, &rq_size, sizeof rq_size);
+
+       if (sq_inline)
+               rsetsockopt(rsocket, SOL_RDMA, RDMA_INLINE, &sq_inline, sizeof sq_inline);
 }
 
 int socket(int domain, int type, int protocol)