1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2020 Dmitry Kozlyuk
4 Running DPDK Applications
5 =========================
7 Grant *Lock pages in memory* Privilege
8 --------------------------------------
10 Use of hugepages ("large pages" in Windows terminology) requires
11 ``SeLockMemoryPrivilege`` for the user running an application.
13 1. Open *Local Security Policy* snap-in, either:
15 * Control Panel / Computer Management / Local Security Policy;
16 * or Win+R, type ``secpol``, press Enter.
18 2. Open *Local Policies / User Rights Assignment / Lock pages in memory.*
20 3. Add desired users or groups to the list of grantees.
22 4. Privilege is applied upon next logon. In particular, if privilege has been
23 granted to current user, a logoff is required before it is available.
25 See `Large-Page Support`_ in MSDN for details.
27 .. _Large-Page Support: https://docs.microsoft.com/en-us/windows/win32/memory/large-page-support
33 Certain kernel-mode drivers are required to run DPDK applications.
34 Refer to `Windows documentation <https://git.dpdk.org/dpdk-kmods/tree/windows>`_
35 in ``dpdk-kmods`` repository for common instructions on system setup,
36 driver build and installation.
37 The drivers are not signed, so signature enforcement has to be disabled.
41 Disabling driver signature enforcement weakens OS security.
42 It is discouraged in production environments.
48 Access to physical addresses is provided by a kernel-mode driver, virt2phys.
49 It is mandatory for allocating physically-contiguous memory which is required
52 When loaded successfully, the driver is shown in *Device Manager* as *Virtual
53 to physical address translator* device under *Kernel bypass* category.
54 Installed driver persists across reboots.
56 If DPDK is unable to communicate with the driver, a warning is printed
57 on initialization (debug-level logs provide more details):
61 EAL: Cannot open virt2phys driver interface
67 NetUIO kernel-mode driver provides access to the device hardware resources.
68 It is mandatory for all hardware PMDs, except for mlx5 PMD.
70 Refer to `NetUIO documentation <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_
71 in ``dpdk-kmods`` repository for instructions to build and set up the driver.
72 Devices supported by NetUIO are listed in ``netuio.inf``.
73 The list can be extended in order to try running DPDK with new devices.
76 Run the ``helloworld`` Example
77 ------------------------------
79 Navigate to the examples in the build directory and run `dpdk-helloworld.exe`.
81 .. code-block:: console
83 cd C:\Users\me\dpdk\build\examples
84 dpdk-helloworld.exe -l 0-3