In the OSRUSBFX2 WDF driver sample I replaced WdfDeviceIoBuffered parameter in the WdfDeviceInitSetIoType call with WdfDeviceIoDirect. Driver continues to work after this change. Also, WDF Help topic “Accessing Data Buffers in Framework-Based Drivers” has the same set of instructions both for buffered and direct methods.
Is using one of these methods completely transparent for WDF driver? What is criterion of choosing buffered or I/O methods for driver?
Thanks.
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Yes, it is supposed to be mostly transparent. The biggest difference is that WdfRequestRetrieveInput/OuputMemory and Input/OuputBuffer can fail to map the PMDL into a system virtual address and return a different !NT_SUCCESS code (not that it should matter to your driver since you should be using NT_SUCCESS to validate a successful call). You should pick between the 2 (Buffered or direct io) depending on your perf requirements and the size of the buffers that are in your I/O.
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Farber
Sent: Sunday, February 26, 2006 2:25 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Buffered and Direct I/O in WDF drivers
In the OSRUSBFX2 WDF driver sample I?replaced WdfDeviceIoBuffered parameter in the WdfDeviceInitSetIoType call with?WdfDeviceIoDirect. Driver continues to work after this change. Also, WDF Help topic “Accessing Data Buffers in Framework-Based Drivers” has the same set of instructions both for buffered and direct methods.
Is using one of these methods completely transparent for WDF driver? What is criterion of choosing buffered or I/O methods for driver?
??? Thanks.
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thank you.
Doron Holan wrote:
Yes, it is supposed to be mostly transparent. The biggest difference is that WdfRequestRetrieveInput/OuputMemory and Input/OuputBuffer can fail to map the PMDL into a system virtual address and return a different !NT_SUCCESS code (not that it should matter to your driver since you should be using NT_SUCCESS to validate a successful call). You should pick between the 2 (Buffered or direct io) depending on your perf requirements and the size of the buffers that are in your I/O.
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Farber
Sent: Sunday, February 26, 2006 2:25 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Buffered and Direct I/O in WDF drivers
In the OSRUSBFX2 WDF driver sample I replaced WdfDeviceIoBuffered parameter in the WdfDeviceInitSetIoType call with WdfDeviceIoDirect. Driver continues to work after this change. Also, WDF Help topic “Accessing Data Buffers in Framework-Based Drivers” has the same set of instructions both for buffered and direct methods.
Is using one of these methods completely transparent for WDF driver? What is criterion of choosing buffered or I/O methods for driver?
Thanks.
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.