Re: KMDF: how can I get usb continuous reader callbacks always in order?
- From: "Pavel A." <pavel_a@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Feb 2008 16:29:52 +0200
"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message news:e9g9rk%23aIHA.4684@xxxxxxxxxxxxxxxxxxxxxxx
But reassembling needs special handling, like tcp has for
out of order packets (on behalf on network drivers).
Do you mean that *any* driver needs to do same on SMP?
From what I know, IO completion path in Windows from IopCompleteRequest to user
mode - return from the syscall or GetOverlappedResult or
GetQueuedCompletionStatus - is preemptable.
So, you cannot rely on _completion order_ in Windows.
Nevertheless, with most drivers you can rely on _IRP submit order_, that the
order of data portions in the IRPs will be the same as IRP submit order.
So, just keep a serial number in your IRP context - completion context for
kernel, OVERLAPPED wrapper for user, generate the numbers on IRP submit, and
deal with the (reassembling) in the completion path.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
Thanks. this makes sense. Even so, I really hope that
the DPCs of the host controller are serialized on same cpu;
and this serialization keeps up to the client callbacks at DISPATCH.
Otherwise it looks like major PITA - especially if this applies also to
other protocol buses like SDIO.
--PA
.
- Follow-Ups:
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- From: Maxim S. Shatskih
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- References:
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- From: Maxim S. Shatskih
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- From: Pavel A.
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- From: Maxim S. Shatskih
- Re: KMDF: how can I get usb continuous reader callbacks always in order?
- Prev by Date: Re: Defering completion processing
- Next by Date: Re: Kernel mode to user mode
- Previous by thread: Re: KMDF: how can I get usb continuous reader callbacks always in order?
- Next by thread: Re: KMDF: how can I get usb continuous reader callbacks always in order?
- Index(es):
Relevant Pages
|
Loading