[ofw] [Patch 59/62] Reference implementation of NDv2
Fab Tillier
ftillier at microsoft.com
Wed Feb 20 21:12:41 PST 2013
MLX4ND: Support connection request timeout properly.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\11011\hw\mlx4\user\nd\connector.cpp .\hw\mlx4\user\nd\connector.cpp
--- \dev\openib\Mellanox\11011\hw\mlx4\user\nd\connector.cpp Thu Sep 20 17:51:16 2012
+++ .\hw\mlx4\user\nd\connector.cpp Tue Sep 18 09:43:06 2012
@@ -176,6 +176,19 @@ void* Connector::GetInterface(REFIID rii
}
+HRESULT Connector::PostProcessOverlapped(__in OVERLAPPED* pOverlapped)
+{
+ if( static_cast<NTSTATUS>(pOverlapped->Internal) == STATUS_IO_TIMEOUT
+ && m_pQp != NULL )
+ {
+ m_pQp->Release();
+ m_pQp = NULL;
+ }
+
+ return _Base::PostProcessOverlapped(pOverlapped);
+}
+
+
STDMETHODIMP Connector::Bind(
__in_bcount(cbAddress) const struct sockaddr* pAddress,
ULONG cbAddress
diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\11011\hw\mlx4\user\nd\connector.h .\hw\mlx4\user\nd\connector.h
--- \dev\openib\Mellanox\11011\hw\mlx4\user\nd\connector.h Thu Sep 20 17:51:16 2012
+++ .\hw\mlx4\user\nd\connector.h Tue Sep 18 09:30:34 2012
@@ -72,6 +72,8 @@ public:
void* GetInterface(REFIID riid);
+ HRESULT PostProcessOverlapped(__in OVERLAPPED* pOverlapped);
+
UINT64 GetHandle() const { return m_hConnector; }
static ULONG GetCancelIoctlCode() { return IOCTL_ND_CONNECTOR_CANCEL_IO; }
diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\11011\hw\mlx4\user\nd\overlapped.h .\hw\mlx4\user\nd\overlapped.h
--- \dev\openib\Mellanox\11011\hw\mlx4\user\nd\overlapped.h Thu Sep 20 17:51:16 2012
+++ .\hw\mlx4\user\nd\overlapped.h Tue Sep 18 09:26:44 2012
@@ -109,6 +109,11 @@ public:
{
ULONG cbOut;
::GetOverlappedResult(m_hFile, pOverlapped, &cbOut, wait);
+ return static_cast<ThisT*>(this)->PostProcessOverlapped( pOverlapped );
+ }
+
+ HRESULT PostProcessOverlapped(__in OVERLAPPED* pOverlapped)
+ {
return static_cast<HRESULT>(pOverlapped->Internal);
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.59.patch
Type: application/octet-stream
Size: 2008 bytes
Desc: ndv2.59.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/aab2f06a/attachment.obj>
More information about the ofw
mailing list