Hi, all,
I found the IRP processing path as:
IO manager to Dispatch routine to StartIO to ISR to DPC to IO manager.
And the funtcion of IoStartPacket and IoStartNextPacket.
I have question : does this mode could only process the IRP from system IRP queue one by one only?
Namely, only after we complete an IRP , then we can pop up another IRP from the system IRP queue and process the new one?
If I want to process more than one IRP from the system queue at once, does it OK?
Because I want to forware the IRPs from upper level driver to the lower level, and which one will complete is not know, maybe the first send one or maybe the last send one, which according to the device responding, so I want to send more IRP to lower level at once and set a IoCompletion routine, who complete first, the Completion routine be called first?
Which I will create my own queue for the IRPs from upper level driver in my dispatch routine, I queue them into the IRP queue.
Then i create my own thread, and at one time, I pop up more than one IRPs, such as 3, then I forward to lower level,
Does my method feasible?
workingmailing wrote:
I found the IRP processing path as:
IO manager to Dispatch routine to StartIO to ISR to DPC to IO manager.
And the funtcion of IoStartPacket and IoStartNextPacket.
I have question : does this mode could only process the IRP from
system IRP queue one by one only?
Namely, only after we complete an IRP , then we can pop up another IRP
from the system IRP queue and process the new one?
If I want to process more than one IRP from the system queue at once,
does it OK?
That’s true IF you use the “StartIo” method of dispatching, which works
very will for devices that need their requests serialized. If you don’t
need one-at-a-time handling, then you shouldn’t use StartIo. Instead,
define callbacks for the individual requests. You’ll get them all as
soon as they arrive.
For a new driver you should definitely be using KMDF.
Because I want to forware the IRPs from upper level driver to the
lower level, and which one will complete is not know, maybe the first
send one or maybe the last send one, which according to the device
responding, so I want to send more IRP to lower level at once and set
a IoCompletion routine, who complete first, the Completion routine be
called first?
Which I will create my own queue for the IRPs from upper level driver
in my dispatch routine, I queue them into the IRP queue.
Then i create my own thread, and at one time, I pop up more than one
IRPs, such as 3, then I forward to lower level,
You can do that as long as you use the regular (non-StartIo) dispatching.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.