[1/2] crypto/armv8: update meson build

Message ID 20201105153316.27918-1-dharmik.thakkar@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [1/2] crypto/armv8: update meson build |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dharmik Thakkar Nov. 5, 2020, 3:33 p.m. UTC
  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

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/crypto/armv8/meson.build | 19 ++++---------------
 meson_options.txt                |  2 --
 2 files changed, 4 insertions(+), 17 deletions(-)
  

Comments

Bruce Richardson Nov. 5, 2020, 4:11 p.m. UTC | #1
On Thu, Nov 05, 2020 at 09:33:15AM -0600, Dharmik Thakkar wrote:
> 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
> 
> Suggested-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/crypto/armv8/meson.build | 19 ++++---------------
>  meson_options.txt                |  2 --
>  2 files changed, 4 insertions(+), 17 deletions(-)
> 
This simplification is great to see, thanks.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Ruifeng Wang Nov. 6, 2020, 1:40 a.m. UTC | #2
> -----Original Message-----
> From: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Sent: Thursday, November 5, 2020 11:33 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>
> 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
> 
> Suggested-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/crypto/armv8/meson.build | 19 ++++---------------
>  meson_options.txt                |  2 --
>  2 files changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/crypto/armv8/meson.build
> b/drivers/crypto/armv8/meson.build
> index c445c5bd3dfd..3289a2adcac5 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
> 9bf18ab6b1c9..e384e6dbb29e 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-<VERSION>',
> --
> 2.17.1

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
  
Thomas Monjalon Nov. 13, 2020, 9:29 a.m. UTC | #3
05/11/2020 17:11, Bruce Richardson:
> On Thu, Nov 05, 2020 at 09:33:15AM -0600, Dharmik Thakkar wrote:
> > 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
> > 
> > Suggested-by: Thomas Monjalon <thomas@monjalon.net>
> > Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > 
> This simplification is great to see, thanks.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Series applied, thanks

Next meson options to be removed please:
	- flexran_sdk
	- lib_musdk_dir
  
Thomas Monjalon Nov. 13, 2020, 9:39 a.m. UTC | #4
13/11/2020 10:29, Thomas Monjalon:
> 05/11/2020 17:11, Bruce Richardson:
> > On Thu, Nov 05, 2020 at 09:33:15AM -0600, Dharmik Thakkar wrote:
> > > 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
> > > 
> > > Suggested-by: Thomas Monjalon <thomas@monjalon.net>
> > > Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> > > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > > 
> > This simplification is great to see, thanks.
> > 
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Series applied, thanks

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

Patch

diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build
index c445c5bd3dfd..3289a2adcac5 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 9bf18ab6b1c9..e384e6dbb29e 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-<VERSION>',