NDIS vNext - NetAdapter Building NIC drivers on WDF

NDIS vNext NetAdapter Don Stanwyck Sr PM, Windows Core Networking Fall 2017 Agenda What, why and how of NetAdapter The architecture Real world results Whats in it for you What is NetAdapter?

NetAdapter is a WDF class extension that makes it easy to write a driver for your network card or USB Ethernet dongle NetAdapter joins the productivity of WDF with the networking and performance of NDIS Try our API preview in the Windows 10 Creators Update Why build NetAdapter? Popular demand I want to leverage WDF, and I'm not exactly clear how mixing the NdisMRegisterDevice within a KMDF driver will work. I have a USB driver for a special Ethernet USB

hardware based on KMDF. Now I want to use the USB driver as a classical windows network device also and implement NDIS (with KMDF). [NDIS has] no books, no seminars that I'm aware of. Why build NetAdapter? Avoid resources spent in troubleshooting pnp/power bugs Let WDF deal with PnP and Power complexity Avoid late breaking bugs in PnP/power path, e.g. system hibernate/suspend Avoid resources on abstracting other OS-specific complexities Spend resources on domain-specific complexity instead If a simple abstraction is available in WDF, why redo it?

Example: new Power framework, USB selective suspend, DMA ... New OS features available easily PoFx , DMA, FL/PL reset etc. Flexibility to move the same model to user mode in future WDF provides a mode-agnostic model for most features Why build NetAdapter? Reduce port driver development/maintenance cost Popular demand WDF manages the complexity WDF has more features Scale for the cloud

100G NICs with 1000s of queues Cloud hosting uses NICs in new ways Improved reliability 9F and 133 bugcheck resiliency No more lost NET_BUFFER_LISTs How we design NetAdapter Right should be easy; wrong should be hard. Stay consistent with WDF. Build a fast, reliable, close-to-the-metal datapath.

Be 100% compatible with the network stack, usermode apps, existing NDIS APIs, and the universal driver model. Help 3rd parties improve driver quality and reduce development time Simpler model for driver development Rich and familiar set of abstractions across device silos WDF familiarity leads to shorter development time and better quality E.g. Industry has strong WDF-skilled developer pool 100s of WDF drivers on SoC platforms Developer resources can be easily reassigned Same user and kernel driver model

Rich debugging and verification support Shorter time to production 3rd parties are not constrained by silo-specific model limitations Side-band communication, Bus enumeration, Idle power management, OIDs Data Power Protocol PnP

Traditional NDIS Miniport Model Kernel Your NIC Driver Your hardware NDIS

Kernel OIDs Data Power PnP The NetAdapter Class

Extension Protocol WDF Your NIC Driver NetAdapter WDF Your hardware

Data OIDs NDIS Does it network? Case Study: Realtek PCIe GBE Family Controller Microsoft and Realtek collaborated to port their existing NDIS 6.40 miniport driver to use NetAdapter. Realtek RTL8111D/RTL8168D chipset

1Gbps Ethernet Typical PCIe: interrupt-driven with bus-mastering DMA Checksum offload Wake-on-LAN Case Study: Realtek PCIe GBE Family Controller Half the lines of code

when using NetAdapter class extension. The Tx and Rx handlers have spinlocks. zero No refcounts, no linked lists, no async code, no klunky pause Case Study: USB network adapter We started with an existing NDIS miniport driver,

which used WDF in miniport mode USB 2.0 chipset 100Mbps Ethernet Typical USB: bulk-in, bulk-out, and interrupt pipes USB selective suspend, AOAC Wake-on-LAN, PM protocol offloads Case Study: USB network adapter

Only 400 lines of code for a complete datapath: both Tx and Rx. Power managed data path spinlocks, interlocks, DPCs, workitems, timers, context, { No }

on the datapath How does this affect you? Whats not changing today NDIS is not going away. NDIS will still get new features in the future. You can still build, certify, and ship NDIS drivers. NDISTest still verifies your driver does networking well. Protocol drivers and LWFs interoperate with NetAdapter-based NIC drivers, same as NDIS

miniports. NDIS protocol & LWF drivers are not changing. The Adoption Plan Its crucial that NetAdapter get feedback from IHVs early on. Therefore, we follow an open source/open development model All IHVs are encouraged to Follow our development on GitHub Experiment with the latest NetAdapter drop with their hardware Open issues and provide feedback to MS Close collaboration with a few selected IHVs

A long road ahead of us NDIS 6 and NetAdapter will co-exist for the foreseeable future Server Class Ethernet NIC, WLAN, MBB and UMDF support are NetAdapter on Native Stack where we are Applications WinHttp/WinInet TCPIP & filters NetAdapter/NDIS Translator NDIS

In production In Prototype Unmodified NBL data path NDIS WiFi Driver PD data path NDIS MBB

Driv er NDIS Ethern et Driver NetAdapter NetAdapte r Ethernet Driver - Realtek

NetAdapt er MBB Driver NBL data path Appear as NDIS New data path NetAdapt er

WiFi Driver NetAdapter what we still need to do The current sample and source are not API stable The current sample and class definition are not performance tuned Features like RSS, VMQ, LSO, RSC, etc. have yet to be implemented Expansion to multiple queues is an ongoing development item Buffer management needs to be developed And lots more. We have a long way to go

NetAdapter what we still need to do and we need YOUR HELP What we ask from you Review the sample Review the source code on github Tell us how to improve this Tell us how we could light up special capabilities of your NIC

Your next driver will use NetAdapter WDF is productive & feature-rich NetAdapter is built for speed Its all based on your feedback Where to get more information? http://aka.ms/ NetAdapter What youll see at https://aka.ms/NetAdapter 4 videos giving details of NetAdapter Information about what we do (and dont) have

at this stage of development The documentation: https://aka.ms/netadapter/doc Driver samples on GitHub: https://github.com/Microsoft/NetAdapter-Cx-Drive r-Samples The source code for NetAdapter itself: https://github.com/Microsoft/Network-Adapter-Cla ss-Extension Where to get more information? http://aka.ms/NetAdap

ter Questions? Microsoft Corporation. All rights reserved.

Recently Viewed Presentations

  • Amgen Biotech Labs Overview In this set of

    Amgen Biotech Labs Overview In this set of

    Lab 4: Learn how to use gel electrophoresis to check to verify successful creation of a plasmid with the desired genes Lab 5: Learn how to transform competent cells with a plasmid containing a desired gene (that is, insert a...
  • Welcome Vertical History Team! - projecttahoe

    Welcome Vertical History Team! - projecttahoe

    Welcome Vertical History Team! Please make sure to have your sheet filled out on possible topics/questions for your research paper and discussion lesson.
  • The Process Paper - bcn.boulder.co.us

    The Process Paper - bcn.boulder.co.us

    The Process Paper The Final Step The Process Paper This packet will be either handed to judges during viewing of your documentary, performance, or website. It will be placed on the table in front of your exhibit. **The Historical Paper...
  • History - University of Hawaii

    History - University of Hawaii

    World Championship Wrestling GOLDBERG History William Scott Goldberg 6'3'' 285 lbs Television debut: Sept. 22,1997 Finishing Move: Jackhammer US Championships: 2 World Championships: 1 World Championship Wrestling GOLDBERG History William Scott Goldberg 6'3'' 285 lbs Television debut: Sept. 22,1997 Finishing...
  • Public-Key Infrastructure (PKI) - SMU

    Public-Key Infrastructure (PKI) - SMU

    Times New Roman Comic Sans MS 7349 Public-Key Infrastructure (PKI) What is PKI? Business Drivers Components and Services Certificates Certificate Format Key/Certificate Life Cycle Certificate Path Processing X.509 Hierarchy Authentication Procedures Problems with PKI PKI Problems (cont'd) Problems (cont'd) What...
  • Avaya Wireless LAN 9100 Awireless network that supports the ...

    Avaya Wireless LAN 9100 Awireless network that supports the ...

    Avaya Wireless LAN 9100 Awireless network that supports the way you work. ... stadium stands and warehouse freezers. WLAN 9172/9173: Four radio, 802.11ac Access Points (2x2/3x3 respectively) for high density deployments such as auditoriums, meeting halls, hotel conference rooms etc....
  • Designing Women - ASTDA

    Designing Women - ASTDA

    Further studies are needed to determine the most effective means to promote behavioral change Bette Larsen Tom LaSalvia Louise Rice Jonathan Appelbaum Nick Peterson Thanks to Paul Etkind, Abby Averbach, Kevin Cranston and their colleagues in the Massachusetts Department of...
  • Register online at www.nsbemac.c thehunt Were Here To

    Register online at www.nsbemac.c thehunt Were Here To

    Cover Letter - Do's. Research the company and show genuine interest. Ex. IBM - "I am very interested in working for a company that is one of the industry leaders in advanced information technologies and consistently innovating software and microelectronics."