Build and install DPDK on Windows

date
Sep 5, 2023
slug
windows-dpdk
status
Published
tags
DPDK
Network
summary
DPDK fast setup on Windows
type
Post
This post is about how to easily build and run DPDK natively on Windows platform. The test-pmd app is tested with ring-based PMD since I don’t have a physical Intel NIC on my PC.
💡
Estimated time: 10 min
💡
Windows version supported: Windows 11, Windows 10 (1909 and newer), Windows Server (2019 and newer)
💡
To use a real NIC such as Intel I225/I226, X710, E810 or E1000, please build and install virt2phy and netuio drivers following readme guides here: https://git.dpdk.org/dpdk-kmods/

Install MSYS2

MSYS2 provides the collection of tools to make you fell like running native Linux on Windows, also you can use pacman to install up-to-date software packages which are natively built on Windows. In short, it’s a powerful version of MinGW!
Download and install from the official site: https://www.msys2.org/
Open the UCRT64 terminal for the following steps.
UCRT64 environment is recommended because it has better compatibility with MSVC, we can directly develop C/C++ applications in MSVC while including the DPDK headers and libs.

Install dependencies

Build and install DPDK

Run test-pmd with rings-based PMD

Ring-pmd uses software FIFOs to act like a physical NIC.
You can run more tests with test-pmd, read more: https://doc.dpdk.org/guides/testpmd_app_ug/index.html

What’s next

Now let’s try to write some simple applications with DPDK!
This post does not include how to develop MSVC applications for DPDK, If you are interested in this topic, you can check how Intel Media Tranport Library does: Media-Transport-Library/app/sample/msvc/README.md at main · OpenVisualCloud/Media-Transport-Library (github.com), the trick is to generate .def file (add this to your library meson file: c_args += ['-Wl,--output-def,libxxx.def']) then convert it to the .lib file for VS to use. The DPDK main branch is also adding more native MSVC support in another way (maybe LLVM 🤔).
 

© Ric Li 2021 - 2024