Re: Serialization of ProtocolReceivePacket by Stephan
Stephan
Thu Apr 13 03:30:48 CDT 2006
Also, if the OP has more than one NIC, his receive routine is likely to
get called more than once in a multiprocessor environment.
Only "serialized" NDIS miniport drivers are guaranteed to have all of
their MiniportXyz() routines called in a serialized manner (hence the
name).
However, NDIS intermediate drivers are *de*serialized by implication.
So please make sure you are able to handle *any* number of parallel
calls to the receive handler in your IM at *any* time.
Stephan
---
Calvin Guan wrote:
> > My understanding is that:- The miniport does not send any new packet to
> > upperlayer protocol unless the ProtocolReceive/ProtocolReceivePacket
> > returns. Is it right?
>
> It's unsafe to make such assumption. Miniport can shoot RX packets up as
> long as its DPC(s) has detected received packets. It's true that miniport
> usually indicates packet at DISPATCH and generally interrupt is disabled
> until DPC returns. But that doesn't mean DPCs are serialized since miniport
> may queued multiple DPCs to different CPUs per interrupt, for example, while
> it's doing "Receive Side Scaling".
>
> --
> Calvin Guan (Windows DDK MVP)
> NetXtreme Longhorn Miniport Prime
> Broadcom Corp. www.broadcom.com