How requests are dispatched between IO queues ?

Hello,

I have trouble understanding how requests are routed between I/O queues for the same request type.

Let’s assume I have a driver that needs to handle 2 requests A and B. A requires the device to be in D0 and B can be handle when device is in low power state.
Let’s assume I create two I/O queues in the driver, one of which is power managed and dedicated to handle A.

When calling DeviceIoControl from userland, how requests will be routed to one of the other queue depending on the request A or B ?

Thank you.

how requests will be routed to one of the other queue depending on the request A or B

The only way this will work is YOU have to forward the Requests to the proper Queue.

You create a non-power managed top edge Queue to handle the initial processing for ALL device control Requests. When your EvtIo callback gets a Request for that Queue, you look at the Request and determine if it’s type A or type B, the. you forward it to whatever you decide is the correct Queue.

This is a very common pattern in WDF.

Peter

Ok. Make sense.

Thank you.