From 40892ddb3968ef7a5bb1318d177e8d7268313fff Mon Sep 17 00:00:00 2001 From: Dharmik Thakkar Date: Thu, 5 Nov 2020 09:33:15 -0600 Subject: [PATCH] crypto/armv8: replace meson option with pkg-config support With pkg-config support available within AArch64crypto library, meson option 'armv8_crypto_dir' can be removed. PKG_CONFIG_PATH environment variable should be set appropriately to use the crypto library. Suggested-by: Thomas Monjalon Signed-off-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Acked-by: Bruce Richardson --- doc/guides/cryptodevs/armv8.rst | 10 ++++++++-- drivers/crypto/armv8/meson.build | 19 ++++--------------- meson_options.txt | 2 -- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst index f0f30fe000..8963f66a20 100644 --- a/doc/guides/cryptodevs/armv8.rst +++ b/doc/guides/cryptodevs/armv8.rst @@ -37,11 +37,17 @@ To build DPDK with this virtual crypto PMD, the user is required to: make -* Build DPDK with meson option ``-Darmv8_crypto_dir=``: +* Add path to `libAArch64crypto.pc` in `PKG_CONFIG_PATH` environment variable: .. code-block:: console - meson -Darmv8_crypto_dir= build + export PKG_CONFIG_PATH=/pkgconfig/:$PKG_CONFIG_PATH + +* Build DPDK: + +.. code-block:: console + + meson build ninja -C build The corresponding device can be created only if the following features diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build index c445c5bd3d..3289a2adca 100644 --- a/drivers/crypto/armv8/meson.build +++ b/drivers/crypto/armv8/meson.build @@ -1,24 +1,13 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Arm Limited -path = get_option('armv8_crypto_dir') -if path == '' +dep = dependency('libAArch64crypto', required: false) +if not dep.found() build = false - reason = 'missing dependency, "armv8_crypto"' + reason = 'missing dependency, "libAArch64crypto"' subdir_done() endif -inc_dir = path - -lib = cc.find_library('libAArch64crypto', dirs: [path], required: false) -if not lib.found() - build = false - reason = 'missing dependency, "AArch64crypto"' - subdir_done() -else - ext_deps += lib - includes += include_directories(inc_dir) -endif - +ext_deps += dep deps += ['bus_vdev'] sources = files('rte_armv8_pmd.c', 'rte_armv8_pmd_ops.c') diff --git a/meson_options.txt b/meson_options.txt index 9bf18ab6b1..e384e6dbb2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,5 @@ # Please keep these options sorted alphabetically. -option('armv8_crypto_dir', type: 'string', value: '', - description: 'path to the armv8_crypto library installation directory') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', -- 2.20.1