NDIS vNext - NetAdapter Building NIC drivers on WDF

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

  • The making of

    The making of

    We also have downloadable copies in DalSpace where it is preserved … and more accessible via Google. Our version is the only edition available online; the others are available in print in the library.
  • ECEU300 Ethics in the Workplace Why talk about

    ECEU300 Ethics in the Workplace Why talk about

    * Ethics is a lot more than not committing felonious acts. It's a lot of little things as well. Here are some of them, each one of these showed up on a student's employer evaluation. Each one, and a lot...
  • 2010 嶄新的開始 - National Chung Cheng University

    2010 嶄新的開始 - National Chung Cheng University

    如何利用經濟指標掌握市場趨勢 羅 瑋 富邦金控經濟研究中心
  • Acoustic Emission NDE - Rowan

    Acoustic Emission NDE - Rowan

    Semester Objectives Modification and Perfection of AE test platform Biaxial Loading of Specimens with stresses up to 30ksi Incorporate hydraulic components Develop method of signal processing AE data Filter out all extraneous noise from testing platform Only analyze "AE Hits"...
  • Performance Assessment for California Teachers PACT

    Performance Assessment for California Teachers PACT

    Performance Assessment for California Teachers PACT PACT is a consortium of teacher preparation programs that have joined together to develop a teacher performance assessment. Successful completion of the teaching performance assessment is required to earn a California Multiple Subject or...
  • Class Actions and Mass Tort Litigation: Aggregative Justice ...

    Class Actions and Mass Tort Litigation: Aggregative Justice ...

    Class Actions and Mass Tort Litigation: Aggregative Justice in a Global Context Professor Linda S. Mullenix University of Trento, Italy Introduction to Mass Tort Litigation
  • Hexavalent Chromium Safety

    Hexavalent Chromium Safety

    The medical costs associated with occupational disease and injury are approximately $67 billion per year. The productivity costs of losing these workers are around $183 billion, including current and future lost earning, lost benefits, and lost household services (work done...
  • Parameters of ASL

    Parameters of ASL

    Handshape. There are over 45 different hand shapes in ASL . A - aunt, sweetheart open A - girl, which, remember, tomorrow. B - son, blue, brown, door. C - cousin ...