NDIS 6.0 Technical Update
Alireza DabaghDevelopment LeadNetwork Devices Platformalid @ microsoft.comMicrosoft Corporation
Session OutlineSession Outline
Overview and status update on major Network Driver Interface Specification (NDIS) 6.0 features
Performance and Scalability
Management and diagnostics
Plug and Play
Lightweight Filter (LWF) drivers
Connection Oriented NDIS (CoNDIS) 6.0
Windows Driver Kit (WDK) for network driversWDK header versioning
NDIS sample drivers
NDIS 6.0: Send and Receive APIsNDIS 6.0: Send and Receive APIs
Support for multi-packet I/O on all data pathsReduces call overhead
New Flags parameter in send and receive APIs to indicate:Call is made at DISPATCH IRQL
STATUS_RESOURCE on receive indication
NIC has done perfect multicast filtering on receive
All NET_BUFFER_LISTs in the receive indication call belong to a single Ethernet Type
All NET_BUFFER_LISTs in the receive indication call belong to a single VLAN ID
Number of NET_BUFFER_LISTs on receive indications
Port number on most send and receive APIsOrdinary Miniport drivers will always use NDIS_DEFAULT_PORT (Port 0)
New Data Structure for Network Packets: New Data Structure for Network Packets: NET_BUFFERsNET_BUFFERs
NET_BUFFER data structure used throughout OSNDIS_PACKET -> NET_BUFFER Packet array -> NET_BUFFER_LISTAvoids the need for translation in the stackAllows for specifying out of band (OOB) data for multiple NET_BUFFERs in one NET_BUFFER_LISTAvoids dynamic memory allocation for protocol headers
Update since WinHEC 2004New NET_BUFFER pool type allows allocating:
a NET_BUFFER, an MDL and data in one calla NET_BUFFER_LIST, a NET_BUFFER, an MDL and data in one call
Allocation APIs are optimized for performance
NDIS 5.1 drivers using NDIS_PACKETs are supported in Windows codenamed “Longhorn”– but not as high a performance as NDIS 6.0 drivers due to translation overhead
NDIS 6.0 Task OffloadNDIS 6.0 Task Offload
Existing Windows 2003 task offloads continue to workNDIS will do the necessary translation for legacy (5.1) driversTCP and IP checksum offloadLarge Send Offload (LSO) – supports <= 64 KB TCP segmentationIPSec Offload
New offloads for LonghornGiant Send Offload (GSO)
Supports > 64K TCP segmentationSupports both IPv4 and IPv6
Checksum offload supports IPv6Receive Side Scaling (RSS)
Support for multiple processors and multiple CPU coresSupports both IPv4 and IPv6
NDIS 6.0 drivers turn offload on by defaultUse standard keywords to see if offload capabilities should be advertised during initialization
Scheduled for Longhorn Beta 2
Receive Side Scaling (RSS)Receive Side Scaling (RSS)
Distributes receive packet indications among multiple CPUs
Improves scalability by avoiding one DPC per NIC
Ensures in-order packet delivery
Improves performance by avoiding cache missesWindows networking stack is optimized to process all packets for the same connection on the same CPU
Multiple ways to implement hardware supportPreferred: Multiple hardware queues, multiple interrupt sources (MSI-X)
Multiple hardware queues, single interrupt
Calculating hash in hardware
NDIS 6.0 Interrupt HandlingNDIS 6.0 Interrupt Handling
Message Signaled Interrupt (MSI)Avoids interrupt sharing
MSI interrupts by default are not shared
IHV availability scheduled for Longhorn Beta 1
MSI-X supportAllows setting interrupt affinity for each message
Primarily intended for Receive Side Scaling (RSS)
Scheduled for Longhorn Beta 2
Only “shared” line based interrupts are supported for NDIS 6.0 miniport driver
Legacy NDIS 5.x drivers can ask for exclusive interrupts
Overview of NDIS 6.0 Management and DiagnosticsOverview of NDIS 6.0 Management and Diagnostics
Standardize management of advanced NIC propertiesStandardized keywords
Speed and duplex settingsTask offloadVLAN and Priority
Standardized OIDsNew: Duplex and Interrupt moderation
Standardized link state change through status indicationsPolled status indications are no longer used
NDIS Interface (NDISIF)Supports interface enumeration and status queryEnable enumeration of all NICs – even failed interfacesInterface stack table allows specifying interface relationship
NDIS Diagnostic Helper ClassProvides quick diagnosis and debugging of the problemFuture plans: Miniport Driver Diagnostic Helper Class to identify device specific problems
OID RequestsOID Requests
MiniportRequest is called at passive levelAvoids long DPC time
“Method” OID request typeAllows for set and query in the same OID request
Canceling requestsNew APIs for protocols, filters and miniports to cancel a request based on a request ID
Standard OIDs for querying media connect state, duplex, and speedNDIS 6.0 protocols should not issue OIDs to query the link state
Should rely on status indication
Standard OID for enabling interrupt moderationNeeded for bandwidth measurement used in QoS
Status IndicationStatus Indication
NDIS 6.0 drivers must use status indications to report new link state
Cannot rely on OID query to report a change
Link State status indicationIncludes media connect state, duplex, speed
No need to support the corresponding OID query requests
Operational statusOperational status is “down” if an interface is not available for sending or receiving “all” packets
Media disconnect, power state, pause, or authentication state affect operational status
NDIS 6.0 Plug and PlayNDIS 6.0 Plug and Play
New pause and restart operation enables:Lock free Data I/O
Filters to be installed without loss of connectivity
Miniports to change their advanced properties
Miniports report all their attributes during initialization
Faster Initialization
No need to support OIDs for static attributes
Halt and Shutdown reason is passed to the Miniport driver
Allows for sending management packets by miniport driver
NIDS 6.0 Lightweight Filters (LWF)NIDS 6.0 Lightweight Filters (LWF)
LWF replaces IM filter driver modelNo need to write a complete protocol and miniport
Can be added to or removed from the stack without breaking connections
Improved performance
Bypass mode allows LWF to only examine selected control and data paths
Update since WinHEC 2004Filter drivers can change miniport attributes during restart
Scheduled for Beta 2Improved co-existence with legacy IM filter drivers
CoNDIS CoNDIS
CoNDIS APIs are ported to NDIS 6.0Added support for NET_BUFFERs
Added support for new OID requests and status indications
All CoNDIS handlers are registered using optional handler registration mechanism
Minor changes to APIs for registering and opening and closing Address Family
No plans to support CoNDIS in Lightweight filter drivers
WDK Header VersioningWDK Header Versioning
Use WDK build environment to compile drivers that can run on all supported platforms starting with W2K
Single set of NDIS header files
Drivers have to specify the target platform
Supported NDIS drivers in WDK build environmentProtocol drivers with NDIS version >= 4.0
Miniport drivers with NDIS version >= 5.0
Both serialized and de-serialized drivers
Building the following is not supportedArcnet and FDDI drivers
Full MAC and NDIS 3.0 miniport drivers
Windows 9x binary compatible drivers
Incorrect API usage will be detected at compile time
WDK header versioning is scheduled for Longhorn Beta 1
Status of NDIS 6.0 Sample DriversStatus of NDIS 6.0 Sample Drivers
Sample NDIS 6.0 miniport driverUpdated E100B in the WDK in the WinHEC Longhorn Build
Working on a new driver with more advanced features for Longhorn
Sample Lightweight Filter driverIncluded in the WDK in the WinHEC Longhorn Build
Basic sample to demonstrate API usage
Will be improved to demonstrate more complicated features
NDIS 6.0 IM MUX driverNot included in the WDK in the WinHEC Longhorn Build, but is expected to be in Longhorn Beta 1
Will demonstrate how to efficiently add VLAN tags
Working on combo IM MUX/Miniport sample driver for Longhorn Beta 2
Sample NDIS 6.0 protocol driverUpdated in the WDK in the WinHEC Longhorn Build
Call To ActionCall To Action
Subscribe to NDIS 6.0 Beta programSend mail to ndis6fb @ micrsoft.com
Port your drivers to NDIS 6.0
Implement NDIS 6.0 Task Offload in hardware:New offloads: GSO, RSS
Existing Offloads: IPSec, Checksum, LSO
Ensure that your device and driver work on all 64-bit Windows Operating Systems
Send feedback to ndis6fb @ microsoft.com
Attend the following related BOFs at WinHEC:I/OAT BOF Tuesday night at 6:30pm, Room 400
IPSec Offload BOF Tuesday night at 7:30pm Room 400
ResourcesResources
NDIS 6.0 Driver ResourcesInbox driver submissionemail: netdd @ microsoft.com
NDIS 6.0 Beta Placeemail: ndis6fb @ microsoft.com
NDISTest Beta Placeemail: netdd @ microsoft.com
Native 802.11 Beta Placeemail: 80211_fb @ microsoft.com
Resources (con’t)Resources (con’t)
Windows Driver Kit (WDK)Documentation
Sample NDIS 6.0 drivers
WinHEC 2005 White papersPorting NDIS 5.1 to NDIS 6.0
Writing a Light Weight Filter Driver
Porting NDIS 5.1 IM MUX to NDIS 6.0
Scalable Networking: Eliminating the Receive Processing Bottleneck—Introducing RSS
Community ResourcesCommunity Resources
Windows Hardware & Driver Central (WHDC)www.microsoft.com/whdc/default.mspx
Technical Communitieswww.microsoft.com/communities/products/default.mspx
Non-Microsoft Community Siteswww.microsoft.com/communities/related/default.mspx
Microsoft Public Newsgroupswww.microsoft.com/communities/newsgroups
Technical Chats and Webcastswww.microsoft.com/communities/chats/default.mspx
www.microsoft.com/webcasts
Microsoft Blogswww.microsoft.com/communities/blogs
Additional ResourcesAdditional Resources
Community Siteshttp://www.microsoft.com/communities/default.mspx
List of Newsgroupshttp://communities2.microsoft.com/communities/newsgroups/en-us/default.aspx
Attend a free chat or webcasthttp://www.microsoft.com/communities/chats/default.mspx
http://www.microsoft.com/seminar/events/webcasts/default.mspx
Locate a local user group(s)http://www.microsoft.com/communities/usergroups/default.mspx
Non-Microsoft Community Siteshttp://www.microsoft.com/communities/related/default.mspx
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Top Related