Windows Plan

DPDK porting on Windows

Status

Starting with DPDK 21.08 it is possible to run testpmd and examples with mlx5, i40e, and ice HW, vmxnet3 paravirtual devices in QEMU, or with PCAP virtual devices. It requires yet unsigned kernel-mode drivers to run (except mlx5). Only network PMDs are currently enabled.

The focus is getting more of the DPDK code to compile with MSVC. The goal is to get parity between clang and MSVC, so that all code that currently compiles with clang on Windows can also be compiled with MSVC.

All development happens in the upstream:

The DPDK documentation for Windows is updated along with upstream progress.

The PMD-specific documentation should be updated in the common NIC drivers guide.

Roadmap

Features and milestones may be noted here. This is not a commitment but a plan of work. This list is obviously neither complete nor guaranteed.

Bringing support for Microsoft Visual Studio on Windows

Starting with release 23.11, integration began to formally support the Microsoft Visual Studio toolset. Patches were introduced to incrementally phase in full support of the core DPDK libraries, the DPDK unit tests and drivers.

Continuing that effort, the following is a work plan targeting the 25.03 release. The plan is subject to change depending on delays and discussions from the review process. Contributions toward this plan from the community are welcome.

Eliminate VLAs

MSVC does not support Variable Length Arrays (VLAs). Therefore there is a need to replace VLAs with standard C arrays or alloca(). alloca() is available for all toolchain/platform combinations officially supported by DPDK.

The series Remove use of VLAs for Windows removes the use of VLAs from code built for Windows for all three toolchains. Since this is a large series touching many files, it’s a pre-requisite for many subsequent changes.

Structure Packing

MSVC struct packing is not compatible with GCC. A discussion about possible solutions was held and as a result the series Fix packing of structs when building with MSVC was submitted for review.

This series provides a macro (__rte_packed_begin) that can be used to push existing pack value and sets packing to 1-byte. The existing __rte_packed macro is replaced with __rte_packed_end and restores the pack value prior to the push.

Like the VLA-related change, this series is also large and is a pre-requisite for many subsequent changes.

MSVC CI Pipeline

The DPDK CI pipeline is fundamental to making progress with porting work for the MSVC toolset as it avoids regressions from being introduced. The CI pipeline is in place and is being relied on as work progresses. It automatically starts compiling additional code as it gets enabled by the patches that get completed.

As additional libraries and tests are ported, the pipeline will also allow execution of the DPDK unit tests.

MSVC Library Porting

Several libraries are already compiling with MSVC: log, kvargs, telemetry, eal, ptr_compress, ring, meter, pci, timer and cfgfile.

These are some of the libraries that will be ported for 25.03: rcu, mbuf, lpm, dmadev, mldev, stack and fib.

Porting new libraries might be broken down into multiple-patch series to address & decouple different issues separately.

It’s important to note that some libraries (EAL is a great example) are pre-requisite for porting other libraries, drivers and unit tests. As mentioned above, the VLA and structure packing changes are pre-requisites as well.

Unit Test Library Porting

In addition to EAL there are several libraries required for the basic DPDK unit test harness. Multiple series will be submitted to port the appropriate libraries to allow the harness to be invoked.

Unit Test Enablement

Fundamental unit tests will be ported to MSVC. For tests that depend only on EAL this is not expected to require code change but is just re-enabling compilation of the tests allowing them to be built and run.

MSVC CI Pipeline Test Enablement

With initial DPDK unit tests building & passing the CI pipeline will be updated to run the unit tests.

Driver Porting

Candidate drivers will be selected from the set currently built with clang. Multiple series will be submitted (probably per-driver) with changes to port to MSVC.

Nearing the 25.03 release timeframe the plan will be reviewed to understand and schedule porting work beyond the 25.03 release.

Kernel Mode Drivers

Concurrent work is in progress by Microsoft to provide functionality by the netuio driver for use by DPDK PMDs.

Partners and providers of hardware & PMDs will be able to use the WHQL certification process to sign driver packages containing PMDs that utilize netuio functionality.

For more information visit the following links:

https://learn.microsoft.com/en-us/windows-hardware/drivers/install/whql-release-signature

https://learn.microsoft.com/en-us/previous-versions/windows/hardware/hck/jj124227(v=vs.85)

General Availability

Feature Support

Miscellaneous

Future (unscheduled)