ndis 6.0 technical update alireza dabagh development lead network devices platform alid @...
TRANSCRIPT
![Page 1: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/1.jpg)
NDIS 6.0 Technical Update
Alireza DabaghDevelopment LeadNetwork Devices Platformalid @ microsoft.comMicrosoft Corporation
![Page 2: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/2.jpg)
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
![Page 3: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/3.jpg)
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)
![Page 4: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/4.jpg)
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
![Page 5: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/5.jpg)
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
![Page 6: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/6.jpg)
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
![Page 7: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/7.jpg)
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
![Page 8: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/8.jpg)
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
![Page 9: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/9.jpg)
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
![Page 10: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/10.jpg)
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
![Page 11: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/11.jpg)
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
![Page 12: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/12.jpg)
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
![Page 13: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/13.jpg)
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
![Page 14: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/14.jpg)
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
![Page 15: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/15.jpg)
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
![Page 16: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/16.jpg)
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
![Page 17: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/17.jpg)
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
![Page 18: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/18.jpg)
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
![Page 19: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/19.jpg)
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
![Page 20: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/20.jpg)
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
![Page 21: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/21.jpg)
![Page 22: NDIS 6.0 Technical Update Alireza Dabagh Development Lead Network Devices Platform alid @ microsoft.com Microsoft Corporation](https://reader035.vdocuments.mx/reader035/viewer/2022081506/5697bff81a28abf838cbf185/html5/thumbnails/22.jpg)
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.