Discussion:
[ofw] [Patch 53/62] Reference implementation of NDv2
Fab Tillier
2013-02-21 04:59:48 UTC
Permalink
Fix includes, string length calculation.

Signed-off-by: Fab Tillier <***@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"

Loading...