Deserialized NDIS Miniport Drivers (Compact 2013)
3/26/2014
A deserialized NDIS miniport driver serializes the operation of its MiniportXxx functions and queues all send requests internally instead of relying on NDIS to perform these functions. This design results in significantly better full-duplex performance if the driver's critical sections (code that only a single thread at a time can run) are kept small. Therefore, a deserialized miniport driver can achieve significantly better full-duplex performance than a serialized miniport driver.
Deserialized miniport drivers must meet the following requirements when interfacing with NDIS:
- Each deserialized miniport drivers must identify itself as a deserialized miniport driver to NDIS during initialization.
- Deserialized miniport drivers must complete all send requests asynchronously. To complete a send request, NDIS 6.0 miniport drivers call the NdisMSendNetBufferListsComplete function.
- NDIS 6.0 deserialized miniport drivers must set the Status member of the NET_BUFFER_LIST structure that it passes to NdisMSendNetBufferListsComplete.
- If a deserialized miniport driver cannot immediately complete send requests, it cannot return the requests to NDIS for re-queuing. Instead, the miniport driver must queue send requests internally until sufficient resources are available to transmit the data.
- Deserialized miniport drivers must not examine the structures passed to NDIS in receive indications until after NDIS returns them. NDIS returns NET_BUFFER_LIST structures to a miniport driver's MiniportReturnNetBufferLists function.
Deserialized miniport drivers must meet the following driver-internal requirements:
- Deserialized miniport drivers must protect their network buffer queues with spin locks. Each deserialized miniport driver must also protect its shared state from simultaneous access by its own MiniportXxx functions.
- Deserialized miniport drivers are responsible for network buffer–queue management. When a miniport driver experiences a resource problem, it cannot return send requests to NDIS for re-queuing. Instead, each miniport driver must queue all send requests internally until sufficient resources are available to send the data.
- Deserialized miniport drivers complete send requests in the protocol-determined order.
- You cannot assume that your driver's MiniportXxx functions will be called in the sequence in which they process requests. One MiniportXxx function can preempt another MiniportXxx function that is running at a lower interrupt request level.
For more information about NDIS miniport driver structures, functions, and interfaces, see NDIS Miniport Driver Reference.