X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fwindows_gsg%2Frun_apps.rst;h=08f110d0b55d17cc90bed62b602a47a19a40cc6d;hb=6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c;hp=ff4c4654fe2143ab47de82b55a35b9cae7fd46f6;hpb=ad67b6726312f4db3875240a7796d16801121787;p=dpdk.git diff --git a/doc/guides/windows_gsg/run_apps.rst b/doc/guides/windows_gsg/run_apps.rst index ff4c4654fe..08f110d0b5 100644 --- a/doc/guides/windows_gsg/run_apps.rst +++ b/doc/guides/windows_gsg/run_apps.rst @@ -4,6 +4,75 @@ Running DPDK Applications ========================= +Grant *Lock pages in memory* Privilege +-------------------------------------- + +Use of hugepages ("large pages" in Windows terminology) requires +``SeLockMemoryPrivilege`` for the user running an application. + +1. Open *Local Security Policy* snap-in, either: + + * Control Panel / Computer Management / Local Security Policy; + * or Win+R, type ``secpol``, press Enter. + +2. Open *Local Policies / User Rights Assignment / Lock pages in memory.* + +3. Add desired users or groups to the list of grantees. + +4. Privilege is applied upon next logon. In particular, if privilege has been + granted to current user, a logoff is required before it is available. + +See `Large-Page Support`_ in MSDN for details. + +.. _Large-Page Support: https://docs.microsoft.com/en-us/windows/win32/memory/large-page-support + + +Install Drivers +--------------- + +Certain kernel-mode drivers are required to run DPDK applications. +Refer to `Windows documentation `_ +in ``dpdk-kmods`` repository for common instructions on system setup, +driver build and installation. +The drivers are not signed, so signature enforcement has to be disabled. + +.. warning:: + + Disabling driver signature enforcement weakens OS security. + It is discouraged in production environments. + + +virt2phys +~~~~~~~~~ + +Access to physical addresses is provided by a kernel-mode driver, virt2phys. +It is mandatory for allocating physically-contiguous memory which is required +by hardware PMDs. + +When loaded successfully, the driver is shown in *Device Manager* as *Virtual +to physical address translator* device under *Kernel bypass* category. +Installed driver persists across reboots. + +If DPDK is unable to communicate with the driver, a warning is printed +on initialization (debug-level logs provide more details): + +.. code-block:: text + + EAL: Cannot open virt2phys driver interface + + +NetUIO +~~~~~~ + +NetUIO kernel-mode driver provides access to the device hardware resources. +It is mandatory for all hardware PMDs, except for mlx5 PMD. + +Refer to `NetUIO documentation `_ +in ``dpdk-kmods`` repository for instructions to build and set up the driver. +Devices supported by NetUIO are listed in ``netuio.inf``. +The list can be extended in order to try running DPDK with new devices. + + Run the ``helloworld`` Example ------------------------------ @@ -12,13 +81,8 @@ Navigate to the examples in the build directory and run `dpdk-helloworld.exe`. .. code-block:: console cd C:\Users\me\dpdk\build\examples - dpdk-helloworld.exe + dpdk-helloworld.exe -l 0-3 hello from core 1 hello from core 3 hello from core 0 hello from core 2 - -Note for MinGW-w64: applications are linked to ``libwinpthread-1.dll`` -by default. To run the example, either add toolchain executables directory -to the PATH or copy the library to the working directory. -Alternatively, static linking may be used (mind the LGPLv2.1 license).