[ofw] [PATCH] Support for I/O completion ports
Fab Tillier
ftillier at windows.microsoft.com
Tue Jul 1 11:30:38 PDT 2008
Memory registrations in IBAL require a user-mode structure. However, registration and deregistration operations in NetworkDirect (and WinVerbs) are defined as overlapped operations (overlapped means asynchronous). Clients that use I/O completion ports (IOCP) expect these operations to complete to said IOCP.
Add code to allow user-mode code to register memory via the existing IBAL IOCTLs, and if that succeeds, issue a no-op IOCTL that completes the user's overlapped request to their IOCP (or whatever mechanism they are using - the I/O manager will take care of it).
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_dev.h trunk\core\al\al_dev.h
--- old\core\al\al_dev.h Tue Jul 01 11:17:08 2008
+++ trunk\core\al\al_dev.h Tue Jul 01 11:23:34 2008
@@ -55,7 +55,7 @@
#define AL_DEVICE_NAME L"\\Device\\ibal"
#define ALDEV_KEY (0x3B) /* Matches FILE_DEVICE_INFINIBAND from wdm.h */
-#define AL_IOCTL_VERSION (5)
+#define AL_IOCTL_VERSION (6)
/* max number of devices with non-default pkey */
#define MAX_NUM_PKEY 16
@@ -403,6 +403,7 @@ typedef enum _al_ndi_ops
ual_ndi_rtu_cm_ioctl_cmd,
ual_ndi_rej_cm_ioctl_cmd,
ual_ndi_dreq_cm_ioctl_cmd,
+ ual_ndi_noop,
al_ndi_maxops
@@ -424,6 +425,7 @@ typedef enum _al_ndi_ops
#define UAL_NDI_RTU_CM IOCTL_CODE(ALDEV_KEY, ual_ndi_rtu_cm_ioctl_cmd)
#define UAL_NDI_REJ_CM IOCTL_CODE(ALDEV_KEY, ual_ndi_rej_cm_ioctl_cmd)
#define UAL_NDI_DREQ_CM IOCTL_CODE(ALDEV_KEY, ual_ndi_dreq_cm_ioctl_cmd)
+#define UAL_NDI_NOOP IOCTL_CODE(ALDEV_KEY, ual_ndi_noop)
/*
* Various Operation Allowable on the System Helper
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy_ndi.c trunk\core\al\kernel\al_proxy_ndi.c
--- old\core\al\kernel\al_proxy_ndi.c Mon Jun 30 14:50:58 2008
+++ trunk\core\al\kernel\al_proxy_ndi.c Tue Jul 01 11:23:34 2008
@@ -631,6 +631,9 @@ ndi_ioctl(
case UAL_NDI_DREQ_CM:
cl_status = __ndi_dreq_cm( p_context, h_ioctl, p_ret_bytes );
break;
+ case UAL_NDI_NOOP:
+ cl_status = CL_SUCCESS;
+ break;
default:
cl_status = CL_INVALID_PARAMETER;
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noop_ioctl.patch
Type: application/octet-stream
Size: 1587 bytes
Desc: noop_ioctl.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080701/40956538/attachment.obj>
More information about the ofw
mailing list