]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
uncommit
authorSean Hefty <sean.hefty@intel.com>
Sat, 19 Jan 2013 00:14:35 +0000 (16:14 -0800)
committerSean Hefty <sean.hefty@intel.com>
Sat, 19 Jan 2013 00:14:35 +0000 (16:14 -0800)
meta
patches/rsockets-add-support-for-exist [new file with mode: 0644]

diff --git a/meta b/meta
index 0c53674a6088115376db50be3094c2510d428f9e..d3912510f8ea5da5b89e525f4a7d154dcacd3e2f 100644 (file)
--- a/meta
+++ b/meta
@@ -1,7 +1,8 @@
 Version: 1
-Previous: fe5eb1784251624b7335a8178ec841b20354e2dd
+Previous: cc6cb95b5a3dd30abb8c7696dcf8f03e8888c3d3
 Head: fa37ec50248e8bc04a9a6662dcd2183bfc93af54
 Applied:
+  rsockets-add-support-for-exist: fa37ec50248e8bc04a9a6662dcd2183bfc93af54
 Unapplied:
   af-ib-conn: 08fc3e9eddae4f550c43a25eb8fdb73091aef28f
   addrtype: 168846ffb332698287dbca5c970ab9cdf1a91830
diff --git a/patches/rsockets-add-support-for-exist b/patches/rsockets-add-support-for-exist
new file mode 100644 (file)
index 0000000..bd37813
--- /dev/null
@@ -0,0 +1,55 @@
+Bottom: cf8998b9f06f893b499b9478f40610fb02b1993a
+Top:    1d1da945e49647331f04f82a45cc353e9541a6ae
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2013-01-09 14:54:47 -0800
+
+rsockets: Add support for existing UDP apps
+
+Support for existing UDP applications is done via the rspreload
+library.  However, when the preload library is loaded, socket
+calls used by rsockets get intercepted and converted into
+rsocket calls.
+
+The preload library was able to handle this for TCP rsockets
+by using a per thread variable and checking for recursive calls
+coming from rsockets back into the preload library.  The preload
+library would direct such calls to the real socket calls.
+
+The problem is more complex for UDP rsockets, which can invoke
+socket calls from an internal rsocket thread.  The result is that
+the preload library intercepts socket calls that originate from
+the rsocket library which are not recursive.
+
+Although, this is really a problem with the preload library,
+the simplest solution is for rsockets to fully initialize the
+library when allocating the first rsocket, versus deferring
+initialization until required.  The preload library can then
+detect the recursive calls.
+
+Signed-off-by: Sean Hefty <sean.hefty@intel.com>
+
+
+---
+
+diff --git a/src/rsocket.c b/src/rsocket.c
+index 7be42ca..9b6c667 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2008-2012 Intel Corporation.  All rights reserved.
++ * Copyright (c) 2008-2013 Intel Corporation.  All rights reserved.
+  *
+  * This software is available to you under a choice of one of two
+  * licenses.  You may choose to be licensed under the terms of the GNU
+@@ -452,6 +452,10 @@ void rs_configure(void)
+       if (init)
+               goto out;
++      if (ucma_init())
++              goto out;
++      ucma_ib_init();
++
+       if ((f = fopen(RS_CONF_DIR "/polling_time", "r"))) {
+               (void) fscanf(f, "%u", &polling_time);
+               fclose(f);