Compartir a través de


Performance Improvements for an NDIS Miniport Driver (Windows CE 5.0)

Send Feedback

To improve performance for your NDIS miniport driver, focus on the use of sleep routines, interrupts, and a deserialized driver. For general best practices for improving the performance of the driver, see Considerations For Improving NDIS Driver Performance

  • Sleep Routines

    If your driver sleeps for an interval that is longer than required, it might adversely impact performance, particularly if the driver is on a critical path. For delays larger than 50 microseconds, use NdisMSleep instead of NdisStallExecution .

  • Interrupts

    Interrupts occur at any point where data arrives at the NIC. When the interrupt occurs and you call the interrupt service routine (ISR), the ISR, in turn, signals the interrupt service thread (IST). By the time the IST runs, more data might be available at the NIC than was available when the interrupt occurred. This might 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 waste 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 small.

The following list shows additional miniport driver optimizations.

  • Disabling firewall improves the performance of the driver as firewall consumes CPU cycles. Device firewall may not be needed if the device is protected by an existing Firewall/NAT. For information about Firewall support in Windows CE, see IP Firewall Application Development. For security information about Firewall, see IP Firewall Security.
  • Set the IMGNOSHAREETH environment variable. This improves performance for non-debug configurations by removing the VMINI shared Ethernet library from the run-time image. For information about IMG variables, see IMG Environment Variables.
  • Set the IMGLOADNETHIGH variable to put the driver module in the high memory region. For more information, see Kernel Memory Allocated for Use by the Networking Stack.
  • Clear the IMGNOTALLKMODE variable. This improves performance by reducing the kernel overhead. For more information, see Memory Access Permissions.
  • Avoid interrupt service thread (IST) overhead when multiple network adapters are used in the system. For more information, see Shared IST for NDIS.

See Also

Improving Performance of an NDIS Miniport Driver

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.