eal/windows: initialize hugepage info
[dpdk.git] / doc / guides / windows_gsg / run_apps.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2020 Dmitry Kozlyuk
3
4 Running DPDK Applications
5 =========================
6
7 Grant *Lock pages in memory* Privilege
8 --------------------------------------
9
10 Use of hugepages ("large pages" in Windows terminology) requires
11 ``SeLockMemoryPrivilege`` for the user running an application.
12
13 1. Open *Local Security Policy* snap-in, either:
14
15    * Control Panel / Computer Management / Local Security Policy;
16    * or Win+R, type ``secpol``, press Enter.
17
18 2. Open *Local Policies / User Rights Assignment / Lock pages in memory.*
19
20 3. Add desired users or groups to the list of grantees.
21
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.
24
25 See `Large-Page Support`_ in MSDN for details.
26
27 .. _Large-Page Support: https://docs.microsoft.com/en-us/windows/win32/memory/large-page-support
28
29
30 Run the ``helloworld`` Example
31 ------------------------------
32
33 Navigate to the examples in the build directory and run `dpdk-helloworld.exe`.
34
35 .. code-block:: console
36
37     cd C:\Users\me\dpdk\build\examples
38     dpdk-helloworld.exe
39     hello from core 1
40     hello from core 3
41     hello from core 0
42     hello from core 2
43
44 Note for MinGW-w64: applications are linked to ``libwinpthread-1.dll``
45 by default. To run the example, either add toolchain executables directory
46 to the PATH or copy the library to the working directory.
47 Alternatively, static linking may be used (mind the LGPLv2.1 license).