This document contains instructions for installing and configuring the Media Transport Library for Windows Operation System.
All the steps below related to the DPDK configuration instructions on Windows are from the website: https://doc.dpdk.org/guides/windows_gsg/intro.html
- Tested on: Windows Server 2022
To prepare the environment, follow the instructions on the DPDk windows page. The recommended options is: "MinGW-w64 Toolchain"
After downloading and installing Meson and Ninja you must add them to the PATH environmental variable in Windows. Search for edit the system environment variables and run the program. Click on Environment Variables... button and then in the upper section click on Path variable and click edit. Then add it to your environment variable by clicking new and writing the path down to them just like in the example below.
meson version 0.57.0 is recommanded version
for example:
C:\Program Files\Meson
C:\Ninja
First install compile tools mingw64, suggest to install to c:\mingw64 https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z
https://fast.dpdk.org/rel/dpdk-22.11.tar.xz
To unpack you can use 7-zip:
• Right-click the file
• Select 7-zip -> Extract Here / Extract to
Install git for Windows version Run the following commands using gitbash: Execute below command in Git bash
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0001-pcapng-add-ns-timestamp-for-copy-api.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0002-net-af_xdp-parse-numa-node-id-from-sysfs.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0003-net-iavf-refine-queue-rate-limit-configure.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0004-net-ice-revert-PF-ICE-rate-limit-to-non-queue-group-.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0005-ice-set-ICE_SCHED_DFLT_BURST_SIZE-to-2048.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0006-Change-to-enable-PTP.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0007-net-iavf-not-include-ipv4_port-for-RTE_ETH_RSS_NONFR.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/0008-net-ice-add-dst-src-only-support-for-rss-l3-and-l4.patch
Then apply windows platform dpdk patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0001-Add-DDP-package-load-support-in-windows.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0002-Change-list-remove-and-add-position-to-avoid-race-co.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0003-Mingw-compiler-do-have-same-implementation.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0004-Mingw-do-have-pthread-implementation-change-to-adapt.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0005-To-change-for-windows-trained-pad_interval-pass-in-v.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0006-Add-Windows-10-May-2019-and-newer-version-1GB-huge-p.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0007-Enable-descriptor-prefetch-for-CBDMA-version-3.4.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0008-Windows-need-set-the-timer-resolution-to-maximum-to-.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0009-Windows-dsa-driver-need-set-to-reset-status-first.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0010-Windows-version-currently-no-BPF-support.patch
patch -p1 < {path_to_repo_dir}/Media-Transport-Library/patches/dpdk/22.11/windows/0011-Remove-affinity-binding-for-windows-will-have-perfor.patch
Execute the commands below in windows command prompt:
cd C:\path_to\dpdk
meson build --prefix=c:\dpdk
ninja -C build install
Libs.private:
<!-- markdownlint-disable line-length -->
Libs:-L${libdir} -lrte_latencystats -lrte_gso -lrte_bus_pci -lrte_gro -lrte_cfgfile -lrte_bitratestats -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_net_ice -lrte_net_iavf -lrte_common_iavf -lrte_net_i40e -lrte_mbuf -lrte_mempool -lrte_stack -lrte_mempool_stack -lrte_mempool_ring -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -lrte_dmadev -lrte_dma_ioat
pkg-config_0.26-1 https://sourceforge.net/projects/pkgconfiglite/files/0.26-1/pkg-config-lite-0.26-1_bin-win32.zip/download
glib_2.28.8-1_win32 https://download.gnome.org/binaries/win32/glib/2.28/
gettext-runtime_0.18.1.1-2_win32 https://www.npackd.org/p/org.gnu.GetTextRuntime/0.18.1.1.2
C:\path_to\pkg-config_0.26-1\bin\
C:\path_to\glib_2.28.8-1_win32\bin\
C:\path_to\gettext-rintime_0.18.1.1-2_win32\bin\
Download from: https://www.libsdl.org/download-2.0.php
PKG_CONFIG_PATH is correct installed and compiled package path for pkg-config searching For example, c:\sdl2\lib\pkgconfig
Change libdir and includedir to your correct install path Also, change Cflags: -I${includedir} -Dmain=SDL_main
Download from: https://packages.msys2.org/package/mingw-w64-x86_64-json-c Uzip the zst file, remove .dll.a file in lib folder, only keep.a file, or else you will need json-c.dll when running
For example, c:\json-c\lib\pkgconfig
Change libdir and includedir to your correct install path
Download from: https://nmap.org/npcap/dist/npcap-sdk-1.12.zip, Uzip the zip file
Download from: https://npcap.com/dist/npcap-1.60.exe, Install the package on the target running machine
C:\mingw64\lib
C:\mingw64\x86_64-w64-mingw32\include
Download from: https://github.com/alitrack/mman-win32 Uzip the zip file, go to the directory, Execute below command in Git bash
./configure
/c/mingw64/bin/mingw32-make.exe libmman.a
C:\mingw64\lib
C:\mingw64\x86_64-w64-mingw32\include\sys
Download from: https://packages.msys2.org/package/mingw-w64-x86_64-gtest Uzip the zst file
Change libdir and includedir to your correct install path
Download the gtest Dependencies: mingw-w64-x86_64-gcc-libs from: https://packages.msys2.org/package/mingw-w64-x86_64-gcc-libs Uzip the zst file and copy the libstdc++-6.dll to the directory same as gtest.dll, gtest can now only link with dll mode, when you run the app, you need copy gtest.dll and libstdc++-6.dll to the directory same as your app
Note: please keep the *.dll.a files of the gtest, gtest can not be static linked, do not use libstdc++-6.dll in mingw64 directory
Download from: https://packages.msys2.org/package/mingw-w64-x86_64-openssl Uzip the zst file
Change libdir and includedir to your correct install path Remove the .dll.a files,if you keep the.dll.a files, you need additional libssl-1_1-x64.dll and libcrypto-1_1-x64.dll files
Download from: https://packages.msys2.org/package/mingw-w64-x86_64-dlfcn Uzip the zst file
C:\mingw64\x86_64-w64-mingw32\include
C:\mingw64\lib
first set PKGCONFIG path:
set PKG_CONFIG_PATH=c:\dpdk\lib\pkgconfig;c:\json-c\lib\pkgconfig
meson build --prefix=c:\libmtl -Ddpdk_root_dir=c:\code\dpdk <--- your dpdk source code directory
ninja -C build install
set PKG_CONFIG_PATH=c:\dpdk\lib\pkgconfig;c:\libmtl\lib\pkgconfig;c:\gtest\lib\pkgconfig;c:\openssl\lib\pkgconfig;c:\json-c\lib\pkgconfig;c:\SDL2\lib\pkgconfig
cd app
meson build
ninja -C build
cd tests
meson build
ninja -C build