]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Fri, 18 Jun 2010 18:04:39 +0000 (11:04 -0700)
committerSean Hefty <sean.hefty@intel.com>
Fri, 18 Jun 2010 18:04:39 +0000 (11:04 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 71c080e3fa91efabf67e828e5e31f7585a57b157..c61e6e1d3e2f10c46f72e9d0e0c1d77df59e1943 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: 1986d1eb1d75cd337cdbf416708bb242b878531d
-Head: c50a17d855292bc42541e706b69e9fed9d679d08
+Previous: 244f390e873554b4e9d57ea0b3e75bc5b537407d
+Head: e8c70dfcadb1f2ba0be38f322b58a3e4010edcb4
 Applied:
   umad-dbg: c50a17d855292bc42541e706b69e9fed9d679d08
+  refresh-temp: e8c70dfcadb1f2ba0be38f322b58a3e4010edcb4
 Unapplied:
   errno: 929d92395c4a97ce2b64c42ce2e1a4dcbde17fa4
   rm-build: ecb1d23ab7af4d244d1cf424b3274f71c6bec70a
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..a5cd880
--- /dev/null
@@ -0,0 +1,123 @@
+Bottom: 972874b4731983ba35c9ef3f2166d1e603a2ed20
+Top:    d239e593429e837db4a6c612700a2b7fbefff96b
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-06-18 11:04:35 -0700
+
+Refresh of umad-dbg
+
+---
+
+diff --git a/trunk/core/al/al_mad.c b/trunk/core/al/al_mad.c
+index f11ac2b..51310f9 100644
+--- a/trunk/core/al/al_mad.c
++++ b/trunk/core/al/al_mad.c
+@@ -61,6 +61,7 @@
\r
+ #define AL_RMPP_WINDOW                        16                              /* Max size of RMPP window */\r
+ #define AL_REASSEMBLY_TIMEOUT 5000                    /* 5 seconds */\r
++#define AL_RMPP_RETRIES                       5\r
\r
+ static void\r
+ __cleanup_mad_disp(\r
+@@ -1452,6 +1453,12 @@ __init_send_mad(
+                       return IB_INVALID_SETTING;\r
+               }\r
\r
++              if( !p_mad_element->timeout_ms )\r
++                      p_mad_element->timeout_ms = AL_REASSEMBLY_TIMEOUT;\r
++\r
++              if( !h_send->retry_cnt )\r
++                      h_send->retry_cnt = AL_RMPP_RETRIES;\r
++\r
+               p_rmpp_hdr->rmpp_version = rmpp_version;\r
+               p_rmpp_hdr->rmpp_type = IB_RMPP_TYPE_DATA;\r
+               ib_rmpp_set_resp_time( p_rmpp_hdr, IB_RMPP_NO_RESP_TIME );\r
+diff --git a/trunk/ulp/libibumad/src/umad.cpp b/trunk/ulp/libibumad/src/umad.cpp
+index f033cbe..99a9187 100644
+--- a/trunk/ulp/libibumad/src/umad.cpp
++++ b/trunk/ulp/libibumad/src/umad.cpp
+@@ -49,7 +49,6 @@ typedef struct um_port
+       IWMProvider *prov;\r
+       NET64           dev_guid;\r
+       OVERLAPPED      overlap;\r
+-      BOOL            pending;\r
+       UINT8           port_num;\r
\r
+ }     um_port_t;\r
+@@ -590,6 +589,14 @@ int umad_send(int portid, int agentid, void *umad, int length,
+       return 0;\r
+ }\r
\r
++static void umad_cancel_recv(um_port_t *port)\r
++{\r
++      DWORD bytes;\r
++\r
++      port->prov->CancelOverlappedRequests();\r
++      port->prov->GetOverlappedResult(&port->overlap, &bytes, TRUE);\r
++}\r
++\r
+ __declspec(dllexport)\r
+ int umad_recv(int portid, void *umad, int *length, int timeout_ms)\r
+ {\r
+@@ -599,18 +606,12 @@ int umad_recv(int portid, void *umad, int *length, int timeout_ms)
\r
+       port = &ports[portid];\r
+       hr = port->prov->Receive(mad, sizeof(WM_MAD) + (size_t) *length, &port->overlap);\r
+-\r
+       if (hr == WV_IO_PENDING) {\r
+-              if (port->pending && timeout_ms == 0) {\r
+-                      do {\r
+-                              hr = WaitForSingleObject(port->overlap.hEvent, 250);\r
+-                      } while (hr == WAIT_TIMEOUT && port->pending);\r
+-              } else {\r
+-                      hr = WaitForSingleObject(port->overlap.hEvent, (DWORD) timeout_ms);\r
+-                      if (hr == WAIT_TIMEOUT) {\r
+-                              _set_errno(EWOULDBLOCK);\r
+-                              return -EWOULDBLOCK;\r
+-                      }\r
++              hr = WaitForSingleObject(port->overlap.hEvent, (DWORD) timeout_ms);\r
++              if (hr == WAIT_TIMEOUT) {\r
++                      umad_cancel_recv(port);\r
++                      _set_errno(EWOULDBLOCK);\r
++                      return -EWOULDBLOCK;\r
+               }\r
+       }\r
\r
+@@ -620,7 +621,6 @@ int umad_recv(int portid, void *umad, int *length, int timeout_ms)
+       }\r
\r
+       if (mad->Length <= (UINT32) *length) {\r
+-              port->pending = FALSE;\r
+               hr = (HRESULT) mad->Id;\r
+               umad_convert_av(&mad->Address, &((struct ib_user_mad *) mad)->addr);\r
+       } else {\r
+@@ -641,19 +641,20 @@ int umad_poll(int portid, int timeout_ms)
\r
+       port = &ports[portid];\r
+       hr = port->prov->Receive(&mad, sizeof mad, &port->overlap);\r
+-\r
+       if (hr == WV_IO_PENDING) {\r
+               hr = WaitForSingleObject(port->overlap.hEvent, (DWORD) timeout_ms);\r
+               if (hr == WAIT_TIMEOUT) {\r
++                      umad_cancel_recv(port);\r
++                      _set_errno(ETIMEDOUT);\r
+                       return -ETIMEDOUT;\r
+               }\r
+       }\r
\r
+       if (FAILED(hr) && hr != ERROR_MORE_DATA) {\r
++              _set_errno(EIO);\r
+               return -EIO;\r
+       }\r
\r
+-      port->pending = TRUE;\r
+       return 0;\r
+ }\r
\r
+@@ -705,7 +706,6 @@ int umad_register(int portid, int mgmt_class, int mgmt_version,
+ __declspec(dllexport)\r
+ int umad_unregister(int portid, int agentid)\r
+ {\r
+-      ports[portid].pending = FALSE;\r
+       return ports[portid].prov->Deregister((UINT64) agentid);\r
+ }