[ofw] [Patch 53/62] Reference implementation of NDv2

Fab Tillier ftillier at microsoft.com
Wed Feb 20 20:59:48 PST 2013


Fix includes, string length calculation.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\10916\hw\mlx4\user\nd\main.cpp .\hw\mlx4\user\nd\main.cpp
--- \dev\openib\Mellanox\10916\hw\mlx4\user\nd\main.cpp	Mon Sep 10 11:47:19 2012
+++ .\hw\mlx4\user\nd\main.cpp	Tue Sep 04 16:17:39 2012
@@ -29,9 +29,6 @@
 
 #include "precomp.h"
 
-#include <initguid.h>
-#include "ndspi.h"
-
 
 HANDLE g_hHeap;
 #if DBG
@@ -346,7 +343,7 @@ void CALLBACK RegisterProviderW(HWND, HI
     provider.iSecurityScheme = SECURITY_PROTOCOL_NONE;
     provider.dwMessageSize = 0xFFFFFFFF; /* IB supports 32-bit lengths for data transfers on RC */
     provider.dwProviderReserved = 0;
-    wcscpy_s( provider.szProtocol, sizeof(provider.szProtocol), L"OpenFabrics Network Direct Provider for Mellanox ConnectX" );
+    wcscpy_s( provider.szProtocol, _countof(provider.szProtocol), L"OpenFabrics Network Direct Provider for Mellanox ConnectX" );
 
     WSCInstallProvider64_32(
         &providerId, L"%SYSTEMROOT%\\system32\\mlx4nd.dll", &provider, 1, &err_no );
diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\10916\hw\mlx4\user\nd\precomp.h .\hw\mlx4\user\nd\precomp.h
--- \dev\openib\Mellanox\10916\hw\mlx4\user\nd\precomp.h	Mon Sep 10 11:47:19 2012
+++ .\hw\mlx4\user\nd\precomp.h	Tue Sep 04 16:17:39 2012
@@ -39,11 +39,12 @@
 #include <winternl.h>
 #include <ws2tcpip.h>
 #include <ws2spi.h>
-#include <InitGuid.h>
-#include <ndspi.h>
 #include <ndstatus.h>
 #include <string.h>
 #include <process.h>
+
+#include <InitGuid.h>
+#include <ndspi.h>
 
 #include "ndfltr.h"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.53.patch
Type: application/octet-stream
Size: 1586 bytes
Desc: ndv2.53.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/fc2e5aa3/attachment.obj>


More information about the ofw mailing list