Skip to contentSkip to conversation

crypto/armv8: update meson build

PATCH In review Dharmik Thakkar 4 participants 7 messages Nov 5, 2020 – Nov 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 crypto/armv8: update meson build

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.

Refer [1] for build instructions.

[1]
https://doc.dpdk.org/guides/cryptodevs/armv8.html

---
 drivers/crypto/armv8/meson.build | 19 ++++---------------
 meson_options.txt                |  2 --
 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/crypto/armv8/meson.build +4 -15
index c445c5bd3dfd..3289a2adcac5 100644
@@ -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')
meson_options.txt +0 -2
index 9bf18ab6b1c9..e384e6dbb29e 100644
@@ -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-<VERSION>',
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 doc: update build guide for armv8 crypto PMD

Remove build steps about using meson option armv8_crypto_dir.

Add build steps about using pkg-config.

---
 doc/guides/cryptodevs/armv8.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
doc/guides/cryptodevs/armv8.rst +8 -2
index f0f30fe0003a..8963f66a206c 100644
@@ -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=<path_to_AArch64cryptolib>``:
+* Add path to `libAArch64crypto.pc` in `PKG_CONFIG_PATH` environment variable:
 
 .. code-block:: console
 
-   meson -Darmv8_crypto_dir=<path_to_AArch64cryptolib> build
+   export PKG_CONFIG_PATH=<path_to_AArch64cryptolib>/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
Signature · 1 line
2.17.1
Acked-by on v1 2/2
#2 lore raw

Re: [dpdk-dev] [PATCH 2/2] doc: update build guide for armv8 crypto PMD

Quoted 52 lines

-----Original Message-----
From: Dharmik Thakkar <[email protected]>
Sent: Thursday, November 5, 2020 11:33 PM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; nd <[email protected]>; Dharmik Thakkar <[email protected]>
Subject: [PATCH 2/2] doc: update build guide for armv8 crypto PMD

Remove build steps about using meson option armv8_crypto_dir.

Add build steps about using pkg-config.

---
 doc/guides/cryptodevs/armv8.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/doc/guides/cryptodevs/armv8.rst index f0f30fe0003a..8963f66a206c 100644

doc/guides/cryptodevs/armv8.rst +0 -0
@@ -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=<path_to_AArch64cryptolib>``:
+* Add path to libAArch64crypto.pc in PKG_CONFIG_PATH environment variable:

.. code-block:: console

doc/guides/cryptodevs/armv8.rst +2 -1
-   meson -Darmv8_crypto_dir=<path_to_AArch64cryptolib> build
+   export
+

PKG_CONFIG_PATH=<path_to_AArch64cryptolib>/pkgconfig/:$PKG_CONFI G_PATH

doc/guides/cryptodevs/armv8.rst +6 -1
+
+* Build DPDK:
+
+.. code-block:: console
+
+   meson build
    ninja -C build
 
 The corresponding device can be created only if the following features
--
Quoted 1 line

2.17.1

Acked-by on v1 1/2
#3 lore raw
In reply to Dharmik Thakkar
Quoted 10 lines · Dharmik Thakkar

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.

Refer [1] for build instructions.

[1]
https://doc.dpdk.org/guides/cryptodevs/armv8.html

Quoted 8 lines
---
 drivers/crypto/armv8/meson.build | 19 ++++---------------
 meson_options.txt                |  2 --
 2 files changed, 4 insertions(+), 17 deletions(-)

This simplification is great to see, thanks.

#4 lore raw

05/11/2020 17:11, Bruce Richardson:

Quoted 11 lines · Dharmik Thakkar
Quoted 10 lines

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.

Refer [1] for build instructions.

[1]
https://doc.dpdk.org/guides/cryptodevs/armv8.html

Quoted 7 lines
Quoted 4 lines

This simplification is great to see, thanks.

Series applied, thanks

Next meson options to be removed please:
- flexran_sdk
- lib_musdk_dir

#5 lore raw

13/11/2020 10:29, Thomas Monjalon:

Quoted 16 lines

05/11/2020 17:11, Bruce Richardson:

Quoted 15 lines · Dharmik Thakkar
Quoted 14 lines

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.

Refer [1] for build instructions.

[1]
https://doc.dpdk.org/guides/cryptodevs/armv8.html

Quoted 5 lines
Quoted 3 lines

This simplification is great to see, thanks.

Series applied, thanks

Note: doc and code changes should be atomic,
that's why they are squashed when merging.

Acked-by on v1 1/2
#6 lore raw
In reply to Dharmik Thakkar
Quoted 74 lines

-----Original Message-----
From: Dharmik Thakkar <[email protected]>
Sent: Thursday, November 5, 2020 11:33 PM
To: Ruifeng Wang <[email protected]>; Bruce Richardson <[email protected]>
Cc: [email protected]; nd <[email protected]>; Dharmik Thakkar <[email protected]>
Subject: [PATCH 1/2] crypto/armv8: update meson build

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.

Refer [1] for build instructions.

[1]
https://doc.dpdk.org/guides/cryptodevs/armv8.html

---
 drivers/crypto/armv8/meson.build | 19 ++++---------------
 meson_options.txt                |  2 --
 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/crypto/armv8/meson.build +4 -14
index c445c5bd3dfd..3289a2adcac5 100644
@@ -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
9bf18ab6b1c9..e384e6dbb29e 100644

meson_options.txt +0 -3
@@ -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-<VERSION>',
--
Quoted 1 line

2.17.1