]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Fri, 18 Jun 2010 18:04:43 +0000 (11:04 -0700)
committerSean Hefty <sean.hefty@intel.com>
Fri, 18 Jun 2010 18:04:43 +0000 (11:04 -0700)
meta
patches/refresh-temp [deleted file]
patches/umad-dbg

diff --git a/meta b/meta
index c61e6e1d3e2f10c46f72e9d0e0c1d77df59e1943..fbb4b9e29aba66fa285b8859b87314f7ead0a4ea 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,8 @@
 Version: 1
-Previous: 244f390e873554b4e9d57ea0b3e75bc5b537407d
-Head: e8c70dfcadb1f2ba0be38f322b58a3e4010edcb4
+Previous: af2757db661c923d1a81527db797228651edf035
+Head: 6424b105a9279f47e9fd8d6f9daf7d63ef2c07cf
 Applied:
-  umad-dbg: c50a17d855292bc42541e706b69e9fed9d679d08
-  refresh-temp: e8c70dfcadb1f2ba0be38f322b58a3e4010edcb4
+  umad-dbg: 6424b105a9279f47e9fd8d6f9daf7d63ef2c07cf
 Unapplied:
   errno: 929d92395c4a97ce2b64c42ce2e1a4dcbde17fa4
   rm-build: ecb1d23ab7af4d244d1cf424b3274f71c6bec70a
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index a5cd880..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-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
- }
index 8737ff136bbc027d00373c1e5e49259d4cbdb325..619542c9d0e7ceb960928ea8127f94246335c1c8 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: ae012808464ea9bb457205f559fb8944e1e4f435
-Top:    972874b4731983ba35c9ef3f2166d1e603a2ed20
+Top:    d239e593429e837db4a6c612700a2b7fbefff96b
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-06-15 10:28:08 -0700
 
@@ -9,10 +9,31 @@ libibumad debugging
 ---
 
 diff --git a/trunk/core/al/al_mad.c b/trunk/core/al/al_mad.c
-index 4576fa8..f11ac2b 100644
+index 4576fa8..51310f9 100644
 --- a/trunk/core/al/al_mad.c
 +++ b/trunk/core/al/al_mad.c
-@@ -1570,6 +1570,7 @@ __does_send_req_rmpp(
+@@ -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
+@@ -1570,6 +1577,7 @@ __does_send_req_rmpp(
                {\r
                        switch( p_mad_element->p_mad_buf->method )\r
                        {\r
@@ -41,10 +62,18 @@ index 712d021..f6b41ac 100644
  }     ib_mad_addr_t;\r
  \r
 diff --git a/trunk/ulp/libibumad/src/umad.cpp b/trunk/ulp/libibumad/src/umad.cpp
-index cdf73fd..f033cbe 100644
+index cdf73fd..99a9187 100644
 --- a/trunk/ulp/libibumad/src/umad.cpp
 +++ b/trunk/ulp/libibumad/src/umad.cpp
-@@ -548,6 +548,23 @@ size_t umad_size(void)
+@@ -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
+@@ -548,6 +547,23 @@ size_t umad_size(void)
        return sizeof(struct ib_user_mad);\r
  }\r
  \r
@@ -68,7 +97,7 @@ index cdf73fd..f033cbe 100644
  __declspec(dllexport)\r
  int umad_send(int portid, int agentid, void *umad, int length,\r
                          int timeout_ms, int retries)\r
-@@ -562,8 +579,11 @@ int umad_send(int portid, int agentid, void *umad, int length,
+@@ -562,14 +578,25 @@ int umad_send(int portid, int agentid, void *umad, int length,
        mad->retries    = (uint32_t) retries;\r
        mad->length             = (uint32_t) length;\r
  \r
@@ -80,13 +109,40 @@ index cdf73fd..f033cbe 100644
                return GetLastError();\r
        }\r
  \r
-@@ -588,20 +608,23 @@ int umad_recv(int portid, void *umad, int *length, int timeout_ms)
-               } else {\r
-                       hr = WaitForSingleObject(port->overlap.hEvent, (DWORD) timeout_ms);\r
-                       if (hr == WAIT_TIMEOUT) {\r
-+                              _set_errno(EWOULDBLOCK);\r
-                               return -EWOULDBLOCK;\r
-                       }\r
+       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
+@@ -579,29 +606,25 @@ 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
+-                              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
@@ -96,11 +152,42 @@ index cdf73fd..f033cbe 100644
        }\r
  \r
        if (mad->Length <= (UINT32) *length) {\r
-               port->pending = FALSE;\r
+-              port->pending = FALSE;\r
                hr = (HRESULT) mad->Id;\r
 +              umad_convert_av(&mad->Address, &((struct ib_user_mad *) mad)->addr);\r
        } else {\r
 -              errno = ENOSPC;\r
 +              _set_errno(ENOSPC);\r
                hr = -ENOSPC;\r
-       }
+       }\r
\r
+@@ -618,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
+@@ -682,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
+ }