]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Mon, 16 Aug 2010 22:07:38 +0000 (15:07 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 16 Aug 2010 22:07:38 +0000 (15:07 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 9f260a15e190863e55f2396c02700a434af16b80..150f4177426231aa262d3c1ce18616a80c981331 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: d45ced116c9e5d40723db732475bdb9753b1491b
-Head: 0e3c04e9ed760852652975e58d9c8fdbdac9287a
+Previous: 4eebec383ce71e4c097fb2a1d933e45e1cb9a1a8
+Head: e39f59b9d3e7a2549a8f60b37f7fd3fbfe48f8a4
 Applied:
   sync: 452ce3b051e10e10363baa77834962a89267e052
   pre-af-ib: 73504ef1f812bea6d1fd59f194f90e5194ca2efa
@@ -13,6 +13,7 @@ Applied:
   ep: 47348de149bd19aa0f7d1ee293e5c2157c181c26
   samples: 69798ede2a2f96a442fe907f87df6017f58ca998
   startup: 0e3c04e9ed760852652975e58d9c8fdbdac9287a
+  refresh-temp: e39f59b9d3e7a2549a8f60b37f7fd3fbfe48f8a4
 Unapplied:
   cq-status: d4535a68c8d41302c9ee9d44b98a75ea19b4f172
   wv-rm-ioctl: 2c4f8b27f89993bc9c1215e8c358046b2934f755
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..743599c
--- /dev/null
@@ -0,0 +1,73 @@
+Bottom: 589dd94a34abf4e2921d4a8205615bc02ab645a2
+Top:    5f227c6cf1b79c41a6917ac4c4ca4795a0df3852
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-08-16 15:07:35 -0700
+
+Refresh of startup
+
+---
+
+diff --git a/trunk/ulp/librdmacm/src/addrinfo.cpp b/trunk/ulp/librdmacm/src/addrinfo.cpp
+index b9642fe..acdc34d 100644
+--- a/trunk/ulp/librdmacm/src/addrinfo.cpp
++++ b/trunk/ulp/librdmacm/src/addrinfo.cpp
+@@ -36,11 +36,40 @@
\r
+ #include <windows.h>\r
+ #include <winsock2.h>\r
++#include <stdio.h>\r
\r
+ #include "cma.h"\r
+ #include <rdma/rdma_cma.h>\r
+ #include <rdma/rdma_verbs.h>\r
\r
++static DWORD addr_ref;\r
++\r
++static void ucma_startup(void)\r
++{\r
++      WSADATA wsadata;\r
++\r
++      EnterCriticalSection(&lock);\r
++      if (addr_ref++) {\r
++              goto out;\r
++      }\r
++\r
++      if (WSAStartup(MAKEWORD(2, 2), &wsadata)) {\r
++              addr_ref--;\r
++      }\r
++\r
++out:\r
++      LeaveCriticalSection(&lock);\r
++}\r
++\r
++static void ucma_shutdown(void)\r
++{\r
++      EnterCriticalSection(&lock);\r
++      if (--addr_ref == 0) {\r
++              WSACleanup();\r
++      }\r
++      LeaveCriticalSection(&lock);\r
++}\r
++\r
+ static void ucma_convert_to_ai(struct addrinfo *ai, struct rdma_addrinfo *rai)\r
+ {\r
+       memset(ai, 0, sizeof *ai);\r
+@@ -136,10 +165,12 @@ int rdma_getaddrinfo(char *node, char *service,
+       struct addrinfo *ai;\r
+       int ret;\r
\r
++      ucma_startup();\r
+       if (hints)\r
+               ucma_convert_to_ai(&ai_hints, hints);\r
\r
+       ret = getaddrinfo(node, service, &ai_hints, &ai);\r
++printf("getaddrinfo %d\n", ret);\r
+       if (ret)\r
+               return ret;\r
\r
+@@ -208,4 +239,5 @@ void rdma_freeaddrinfo(struct rdma_addrinfo *res)
\r
+               free(rai);\r
+       }\r
++      ucma_shutdown();\r
+ }