[ofw] [Patch 24/62] Reference implementation of NDv2
Fab Tillier
ftillier at microsoft.com
Wed Feb 20 17:52:10 PST 2013
Don't include initguid.h in header files.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_iou_mgr.c .\core\bus\kernel\bus_iou_mgr.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_iou_mgr.c Thu May 31 11:22:15 2012
+++ .\core\bus\kernel\bus_iou_mgr.c Thu Jul 26 16:18:08 2012
@@ -28,10 +28,11 @@
* SOFTWARE.
*/
#include <precomp.h>
+#include <initguid.h>
+#include <wdmguid.h>
#include "iba/iou_ifc.h"
-
/* {5A9649F4-0101-4a7c-8337-796C48082DA2} */
DEFINE_GUID(GUID_BUS_TYPE_IBA,
0x5a9649f4, 0x101, 0x4a7c, 0x83, 0x37, 0x79, 0x6c, 0x48, 0x8, 0x2d, 0xa2);
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_pnp.c .\core\bus\kernel\bus_pnp.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_pnp.c Thu May 31 11:22:15 2012
+++ .\core\bus\kernel\bus_pnp.c Thu Jul 26 16:20:52 2012
@@ -35,10 +35,11 @@
*/
#include <precomp.h>
-#include "al_cm_cep.h"
-
-
+#include <initguid.h>
+#include "rdma/verbs.h"
+#include "iba/ib_ci_ifc.h"
+#include "iba/ib_cm_ifc.h"
/* Interface names are generated by IoRegisterDeviceInterface. */
static UNICODE_STRING al_ifc_name;
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_port_mgr.c .\core\bus\kernel\bus_port_mgr.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\bus_port_mgr.c Thu May 31 11:22:15 2012
+++ .\core\bus\kernel\bus_port_mgr.c Thu Jul 26 16:38:31 2012
@@ -28,11 +28,14 @@
* SOFTWARE.
*/
+
#include <precomp.h>
+#include <initguid.h>
+#include <wdmguid.h>
#include "iba/ipoib_ifc.h"
+#include "public.h"
-
/* {5A9649F4-0101-4a7c-8337-796C48082DA2} */
DEFINE_GUID(GUID_BUS_TYPE_IBA,
0x5a9649f4, 0x101, 0x4a7c, 0x83, 0x37, 0x79, 0x6c, 0x48, 0x8, 0x2d, 0xa2);
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\precomp.h .\core\bus\kernel\precomp.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\bus\kernel\precomp.h Thu Mar 29 00:15:20 2012
+++ .\core\bus\kernel\precomp.h Thu Jul 26 16:22:46 2012
@@ -6,6 +6,7 @@
#include "al_mgr.h"
#include "al_dev.h"
#include "al_debug.h"
+#include "al_cm_cep.h"
#include <complib/cl_init.h>
#include <complib/cl_bus_ifc.h>
@@ -13,8 +14,6 @@
#ifndef NTDDI_WIN8
#include <strsafe.h>
#endif
-#include <initguid.h>
-#include <wdmguid.h>
#include "ib_common.h"
#include "public.h"
#include <stdlib.h>
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\winverbs\kernel\wv_driver.c .\core\winverbs\kernel\wv_driver.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\winverbs\kernel\wv_driver.c Fri Aug 03 17:30:49 2012
+++ .\core\winverbs\kernel\wv_driver.c Thu Jul 26 16:51:37 2012
@@ -31,10 +31,8 @@
#include <wdf.h>
#include <wdmsec.h>
#include <ntstatus.h>
-#include <initguid.h>
#include "index_list.c"
-#include <rdma/verbs.h>
#include "wv_driver.h"
#include "wv_ioctl.h"
#include "wv_provider.h"
@@ -47,6 +45,9 @@
#include "wv_ep.h"
#include <event_trace.h>
+#include <initguid.h>
+#include <rdma/verbs.h>
+#include <iba/ib_cm_ifc.h>
ET_POST_EVENT g_post_event_func = NULL;
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(WV_RDMA_DEVICE, WvRdmaDeviceGetContext)
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_pnp.c .\hw\mthca\kernel\hca_pnp.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_pnp.c Thu Mar 29 00:15:31 2012
+++ .\hw\mthca\kernel\hca_pnp.c Wed May 23 15:14:37 2012
@@ -12,7 +12,6 @@
#include "hca_driver.h"
#include "mthca_dev.h"
-#include <rdma\verbs.h>
#if defined(EVENT_TRACING)
#ifdef offsetof
@@ -23,6 +22,7 @@
#include "mthca.h"
#include <initguid.h>
#include <wdmguid.h>
+#include <rdma\verbs.h>
extern const char *mthca_version;
hca_dev_ext_t *g_ext = NULL;
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\mt_spinlock.h .\hw\mthca\kernel\mt_spinlock.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\mt_spinlock.h Thu Mar 29 00:15:31 2012
+++ .\hw\mthca\kernel\mt_spinlock.h Wed May 23 15:14:37 2012
@@ -1,9 +1,5 @@
#ifndef MT_SPINLOCK_H
#define MT_SPINLOCK_H
-#pragma once
-
-#include <complib/cl_spinlock.h>
-
typedef struct spinlock {
KSPIN_LOCK lock;
@@ -133,17 +129,15 @@ spin_unlock_dpc(
#define spin_unlock_irq spin_unlock
/* no diff in Windows */
-#define spin_lock_irqsave (lock, flags) cl_spinlock_acquire(lock)
-#define spin_unlock_irqrestore (lock, flags) cl_spinlock_release(lock)
-
+#define spin_lock_irqsave spin_lock_irq
+#define spin_unlock_irqrestore spin_unlock_irq
/* Windows doesn't support such kind of spinlocks so far, but may be tomorrow ... */
#define rwlock_init spin_lock_init
-#define read_lock_irqsave(lock, flags) cl_spinlock_acquire(lock)
-#define read_unlock_irqrestore(lock, flags) cl_spinlock_release(lock)
+#define read_lock_irqsave spin_lock_irqsave
+#define read_unlock_irqrestore spin_unlock_irqrestore
#define write_lock_irq spin_lock_irq
#define write_unlock_irq spin_unlock_irq
-
#endif
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\iba\ib_cm_ifc.h .\inc\kernel\iba\ib_cm_ifc.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\iba\ib_cm_ifc.h Fri Aug 03 16:47:06 2012
+++ .\inc\kernel\iba\ib_cm_ifc.h Thu Jul 26 15:31:14 2012
@@ -30,7 +30,7 @@
#ifndef _ib_cm_ifc_h_
#define _ib_cm_ifc_h_
-#include <initguid.h>
+//#include <iba/ib_al_ifc.h>
#include <iba/ib_types.h>
#include <iba/ib_al.h>
@@ -311,9 +311,7 @@ static inline UINT8 IbaCmVersionMinor(US
return (UINT8) Version;
}
-// {6A11D060-8957-49e6-BE2A-01EDF1BD22B3}
-DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0x6a11d060, 0x8957, 0x49e6,
- 0xbe, 0x2a, 0x1, 0xed, 0xf1, 0xbd, 0x22, 0xb3);
+#define INFINIBAND_INTERFACE_CM_VERSION IbaCmVersion(1,1)
typedef struct _INFINIBAND_INTERFACE_CM
{
@@ -324,3 +322,7 @@ typedef struct _INFINIBAND_INTERFACE_CM
#endif // _ib_cm_ifc_h_
+
+// {6A11D060-8957-49e6-BE2A-01EDF1BD22B3}
+DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0x6a11d060, 0x8957, 0x49e6,
+ 0xbe, 0x2a, 0x1, 0xed, 0xf1, 0xbd, 0x22, 0xb3);
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\rdma\verbs.h .\inc\kernel\rdma\verbs.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\rdma\verbs.h Thu Aug 02 12:47:08 2012
+++ .\inc\kernel\rdma\verbs.h Thu Jul 26 15:31:14 2012
@@ -27,12 +27,9 @@
* SOFTWARE.
*/
-#pragma once
-
#ifndef _VERBS_H_
#define _VERBS_H_
-#include <initguid.h>
#include <iba/ib_ci.h>
#include <event_trace.h>
@@ -51,8 +48,7 @@ static inline UINT8 VerbsVersionMinor(US
return (UINT8) Version;
}
-DEFINE_GUID(GUID_RDMA_INTERFACE_VERBS, 0xf0ebae86, 0xedb5, 0x4b40,
- 0xa1, 0xa, 0x44, 0xd5, 0xdb, 0x3b, 0x96, 0x4e);
+#define RDMA_INTERFACE_VERBS_VERSION VerbsVersion(VERBS_MAJOR_VER, VERBS_MINOR_VER)
typedef struct _RDMA_INTERFACE_VERBS
{
@@ -66,11 +62,6 @@ typedef struct _RDMA_INTERFACE_VERBS
// Interface, intended for notifications
//
-// {A027188D-564D-4d4e-825A-6AEC19774BAB}
-DEFINE_GUID(MLX4_BUS_NOTIFY_GUID,
-0xa027188d, 0x564d, 0x4d4e, 0x82, 0x5a, 0x6a, 0xec, 0x19, 0x77, 0x4b, 0xab);
-
-
typedef VOID (*MLX4_NOTIFY) (PVOID ifc_ctx, ULONG type, PVOID p_data, PCHAR str);
typedef struct _MLX4_BUS_NOTIFY_INTERFACE{
@@ -80,3 +71,13 @@ typedef struct _MLX4_BUS_NOTIFY_INTERFAC
} MLX4_BUS_NOTIFY_INTERFACE, *PMLX4_BUS_NOTIFY_INTERFACE;
#endif // _VERBS_H_
+
+#ifdef DEFINE_GUID
+DEFINE_GUID(GUID_RDMA_INTERFACE_VERBS, 0xf0ebae86, 0xedb5, 0x4b40,
+ 0xa1, 0xa, 0x44, 0xd5, 0xdb, 0x3b, 0x96, 0x4e);
+
+// {A027188D-564D-4d4e-825A-6AEC19774BAB}
+DEFINE_GUID(MLX4_BUS_NOTIFY_GUID,
+0xa027188d, 0x564d, 0x4d4e, 0x82, 0x5a, 0x6a, 0xec, 0x19, 0x77, 0x4b, 0xab);
+
+#endif // DEFINE_GUID
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.24.patch
Type: application/octet-stream
Size: 8317 bytes
Desc: ndv2.24.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/bf5991b1/attachment.obj>
More information about the ofw
mailing list