次の方法で共有


Performance Improvements for an NDIS Miniport Driver (Windows Embedded CE 6.0)

1/6/2010

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. A device firewall may not be needed if the device is protected by an existing Firewall/NAT. For information about Firewall support in Windows Embedded 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.**
  • 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

Concepts

Improving Performance of an NDIS Miniport Driver