Performance Improvements for an NDIS Miniport Driver

To improve performance for your NDIS miniport driver, focus on the use of sleep routines, interrupts, and a deserialized driver.

Sleep Routines

If your driver sleeps for an interval that is longer than is required, it may adversely impact performance, particularly on the critical path. You should use NdisMSleep instead of NdisStallExecution for delays longer than 50 microseconds, unless the driver is running on a platform that does not support QueryPerformanceCounter.

Interrupts

Interrupts occur at any point where data arrives at the NIC. When the interrupt occurs and the interrupt service routine (ISR) is called, the ISR, in turn, causes the interrupt service thread (IST) to be signaled. By the time that the IST runs, more data may be available at the NIC than was available when the interrupt was raised. This may cause more than one byte of information to be available for processing. It is important to process all data that is available at the time the IST is run. Otherwise, you are wasting CPU cycles.

Deserialized Driver

Deserialized drivers internally queue all incoming send packets and serialize the operation of their own MiniportXXX functions instead of relying on NDIS to perform these operations. This results in significantly better full-duplex performance, if you keep the critical sections of the driver to a small size.

See Also

Improving Performance of an NDIS Miniport Driver

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.