Introducing the NetAdapter Driver model for the next generation of networks and applications

Server Man

Well-Known Member
May 17, 2015
Windows 10
Firefox 60.0
As we move towards a fully connected world, inundated with intelligent devices and massively distributed computing infrastructure, networks that can sustain high bandwidth have never been more relevant. Initial requirements for a 5G network project peak data rates in the order of 10s of gigabits per second. The gaming and the video streaming applications continue to push the frontier seeking a higher throughput and lower latency data path. In addition, the new breed of developers necessitates a simpler driver model that offers agility and greater reliability.

The Windows core networking team has been hard at work building a new, simpler network driver model. Introducing NetAdapter Class Extension using Windows Driver Framework(WDF) and an updated data path, for the next generation of networking on Windows.

NetAdapter Class Extension(NetAdapterCx)

NetAdapter class extension(NetAdapterCx) module to the Windows driver Framework can be used to write a driver for the network interface card. NetAdapter brings with it a simpler, easy to use driver model that offloads complexities to WDF and offers improved reliability. Initial focus for this model is on consumer devices with mobile broadband network adapters paving the way for adoption in ethernet and the rest of the ecosystem in the next couple of years.

NOTE: WDF allows developers to implement simple and robust drivers. It has been the model of choice for most Windows driver developers because it abstracts away a lot of complexities such as interacting with the PnP, power and power policy subsystems.NetAdpaterCx.png









Deriving from PacketDirect, an experimental Windows Server data plane technology, NetAdapterCx brings an updated data path, that sits below the TCP/IP stack, with improved performance over current NDIS stack by reducing latency and cycles/packet. The new data path is built based on the polling-based IO model vs. the interrupt driven model, allowing the OS to optimize performance.

These improvements not only result in accelerated data paths and better drivers but deliver easier to build drivers. Windows developers can now focus on solving network domain specific problems while leveraging the framework for common device tasks.

But wait, what happened to NDIS? NDIS is not going away anytime soon! NetAdapter combines the productivity of WDF and the networking performance of NDIS.

Why build NetAdapter?

  • Stay Consistent with WDF: Popular Demand! Yes, we heard YOU! In the past, WDF and NDIS each had advantages but did not interoperate well which meant that only a small subset of WDF features were accessible from the NDIS miniport driver . Whereas now, extending WDF, new OS kernel features are readily available to the NetAdapterCx based driver. This allows the developers to focus most of their effort on enabling their hardware to work on Windows rather than deal with OS complexities.
  • A simpler driver model: WDF brings a familiar set of abstractions simplifying driver development, making it easier for non NDIS driver developers to write/maintain a NetAdapter based network driver. NDIS pushes many hard problems to the client driver such as data path synchronization, PnP and power handling. NetAdapterCx solves this by taking over the responsibility of synchronizing power and Pnp event with both data and control path IO so that individual client driver is not required to do so. In addition, NetAdapterCx also serializes input to the queues. With NDIS, the client driver runs with elevated privileges and can consequently cause instability to the entire system, resulting in bug checks.
    • By moving complexities to the OS (such as DMA mapping) and using the polling-based IO model, NetAdapter model works towards graceful handling of such scenarios, resulting in improved driver quality and reliability.
  • Accelerated performance: Moving away from the legacy interrupt-driven model in NDIS, the NetAdapterCx builds on the updated data path and the polling-based IO model of PacketDirect. In the future, the polling model can be optimized for performance. NetPacket, the primary layer of abstraction in the NetAdapter data path, map directly to the NIC hardware queues. This allows Windows to intelligently and transparently scale out in a way that will make maximum use of your NIC’s hardware. Because of this direct mapping, scale out for features like Receive Side Scaling becomes more impactful.

Going forward, all NetAdapter drivers will be state separated and DCHU compliant for new, secure systems.

Architectural Overview

The following pictures show the differences between the traditional NDIS architecture and the new NetAdapter model.


NDIS_Architecture-207x300.png
Fig1: NDIS Miniport model



NetAdapterCx_Architecture-300x289.png
Fig 2: NetAdapter Class Extension




















Figure 1 above shows the traditional NDIS model. A typical NDIS miniport driver leverages NDIS for all its needs, including PnP, power, control, data and hardware interaction.

Figure 2 above shows a new Miniport driver being a WDF client. It interacts with NDIS via the new NetAdapter Class Extension (NetAdapterCx) but only for data and control. For other needs, such as PnP, power and hardware interaction the new NetAdapter driver uses WDF interfaces.

As you can see, NetAdapterCx still works behind the scenes with NDIS, but handles all the interaction with NDIS.

What is available today?

Starting in Windows 10, version 1703, the Windows Driver Kit (WDK) includes a Network Adapter WDF Class Extension module (NetAdapterCx), for preview. Many thanks to our networking partners and the Windows developer community, without you the NetAdapterCx framework wouldn’t be as mature as it is today.

Milestone Comments
RS2 Release, Windows 10, version 1703
Fully working preview with support for ethernet over any bus (USB, PCIe).
  • We have built prototype NetAdpater based drivers with our partners to validate the framework (over both PCIe and USB bus)
  • Sample prototype drivers available in the Github page.
RS3 Release, Windows 10 version 1709 Advancements in Performance over RS2 Release
RS4 release, Windows 10, version 1803 Stabilization.
Upcoming RS5 release, Windows 10, version 1809 Focus on the consumer devices with the Mobile broadband(MBB) network adapters, more details below. Go here for the latest specification.

Marching towards RS5 RTM


thGD4ZRTQH-300x206.jpg
NetAdpaterCx in MBB modems


The goal in RS5, is to commercialize the new NetAdapter based Mobile Broadband class extension(MBBCx) and class driver. This new framework will be compatible with in-market modems that rely on the NDIS based MBB USB class driver built using MBIM specification.

We are excited to announce that this framework and class driver is shipping in RS5 insider builds for you to try! Test it out and do not forget to report issues. Help us make windows better for you!





Long road ahead of us

While we do believe NetAdapter framework is our path forward, we see NDIS 6 and NetAdapter co-existing for the foreseeable future.

After RS5 stabilization for in-market MBB modems, the NetAdapter framework is slated to expand to upcoming consumer devices with PCIe mobile broadband modems. Future focus will be on increasing coverage across other network adapter types.

Can’t wait to try?

It is critical for us to get your feedback to drive adoption, influence future design decisions and roadmap.

We have a ton of great information and resources to share with you. To that end, we invite you

  1. To visit our Github page and hit “follow”.
  2. Visit documentation at docs.microsoft.com for the API specification.
  3. Check out the video series here to dive deeper into the topics introduced in this article.
  4. Peruse our NetAdapter based driver samples.
  5. Experiment building a driver for your hardware.
  6. Most importantly, reach out on NetAdapter@microsoft.com with issues and questions.

We truly appreciate and look forward to your feedback and continued engagement!

Continue reading...
 
Back
Top Bottom