Re: IRP reuse contradiction
- From: "Peter Wieland [MSFT]" <peterwie@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Oct 2006 13:20:00 -0700
I think it's partly a matter of using the same word to mean a few subtly different things, and i beleive this is what it's trying to explain:
If you have an IRP that completed back to your driver you can send it down again (and again and again ...). If it's an IRP you allocated then reusing it for any purpose you want is fine. If, however, it's an IRP from the I/O manager (really from outside of your driver) you shouldn't reuse it to handle some unrelated operation since that unnecessarily delays the progress of the request you do have.
So retrying a read request sent to you from NtReadFile is fine. Reusing the IRP to send a "reset" or a "get more error details" command is fine. Reusing the IRP instead of allocating a new one for some unrelated internal request isn't fine. Reusing the IRP because you failed to allocate an unrelated IRP isn't.
Anyway that's what i think.
-p
"BubbaGump" wrote in message news:3ckai2h7l5senflildlr6d0l12pi4o926o@xxxxxxxxxx
I'm trying to figure out if I'm interpreting the word "reuse" right in
different contexts, but it is true the discrepancy in that last case
must be a typo.
On Thu, 5 Oct 2006 11:19:49 -0700, "Richard [MS]"
<rwbrown@xxxxxxxxxxxxxxxxxxxx> wrote:
At the bottom of each WDK documentation page is a "Send feedback on this
topic" link. Whenever you're pretty sure that you've found a documentation
error, please click the link. It'll generate an email that you can use to
describe the problem. The email will go directly to the WDK documentation
team.
The "send feedback" link is not meant for questions or discussions about
writing drivers. Use this and other discussion forums for asking questions
and generating discussions with experienced driver writers. But when you
find a doc error, please notify the WDK doc team.
Thanks.
<BubbaGump> wrote in message
news:p6e8i2dal2re873t7jmg4t91a9ka188sl9@xxxxxxxxxx
On Wed, 04 Oct 2006 18:23:14 -0400, BubbaGump <> wrote:
There are some other statements in the "Completing IRPs" section of
the DDK documentation that seem to contradict each other about IRP
reuse.
One says that an IoCompletion routine can be used "To reuse an
incoming IRP to request that lower drivers complete some number of
operations, such as partial transfers, until the original request can
be satisfied and completed by the IoCompletion routine."
Another says that "Drivers must not attempt to reuse IRPs issued by
the I/O manager." (and that only raw memory or IRPs created by
IoAllocateIrp can be reused)
Since any incoming IRP could be from the I/O manager, which one of
these statements is right?
Also, is reusing an IRP the same as retrying an IRP on failure in the
sense that it requires IoReuseIrp or IoInitializeIrp to be used, or is
manually resetting the status fields enough?
I'm really starting to have doubts about the DDK documentation. I
found yet another set of contradictions about IRP reuse. In "Creating
IOCTL Requests in Drivers" it's implied that an IRP created using
IoBuildDeviceIoControlRequest can be reused even though the "Reusing
IRPs" section earlier says that drivers must not attempt to reuse IRPs
created by IoBuildDeviceIoControlRequest.
.
- References:
- Re: IRP reuse contradiction
- From: Richard [MS]
- Re: IRP reuse contradiction
- Prev by Date: Re: Completion contradiction
- Next by Date: Re: Multiple threads and blocking on I/O
- Previous by thread: Re: IRP reuse contradiction
- Next by thread: Creating a virtual Port
- Index(es):
Relevant Pages
|
|