1*4635c840SCiara Power.. SPDX-License-Identifier: BSD-3-Clause 2*4635c840SCiara Power Copyright(c) 2020 Intel Corporation. 3*4635c840SCiara Power 4*4635c840SCiara Power 5*4635c840SCiara PowerUsing AVX-512 with DPDK 6*4635c840SCiara Power======================= 7*4635c840SCiara Power 8*4635c840SCiara PowerAVX-512 is not used by default in DPDK, but it can be selected at runtime by apps through the use of EAL API, 9*4635c840SCiara Powerand by the user with a commandline argument. DPDK has a setting for max SIMD bitwidth, 10*4635c840SCiara Powerwhich can be modified and will then limit the vector path taken by the code. 11*4635c840SCiara Power 12*4635c840SCiara Power 13*4635c840SCiara PowerUsing the API in apps 14*4635c840SCiara Power--------------------- 15*4635c840SCiara Power 16*4635c840SCiara PowerApps can request DPDK uses AVX-512 at runtime, if it provides improved application performance. 17*4635c840SCiara PowerThis can be done by modifying the EAL setting for max SIMD bitwidth to 512, as by default it is 256, 18*4635c840SCiara Powerwhich does not allow for AVX-512. 19*4635c840SCiara Power 20*4635c840SCiara Power.. code-block:: c 21*4635c840SCiara Power 22*4635c840SCiara Power rte_vect_set_max_simd_bitwidth(RTE_VECT_SIMD_512); 23*4635c840SCiara Power 24*4635c840SCiara PowerThis API should only be called once at initialization, before EAL init. 25*4635c840SCiara PowerFor more information on the possible enum values to use as a parameter, go to :ref:`max_simd_bitwidth`: 26*4635c840SCiara Power 27*4635c840SCiara Power 28*4635c840SCiara PowerUsing the command-line argument 29*4635c840SCiara Power--------------------------------------------- 30*4635c840SCiara Power 31*4635c840SCiara PowerThe user can select to use AVX-512 at runtime, using the following argument to set the max bitwidth:: 32*4635c840SCiara Power 33*4635c840SCiara Power ./app/dpdk-testpmd --force-max-simd-bitwidth=512 34*4635c840SCiara Power 35*4635c840SCiara PowerThis will override any further changes to the max SIMD bitwidth in DPDK, 36*4635c840SCiara Powerwhich is useful for testing purposes. 37