Skip to contentSkip to conversation

small fixes for crypto drivers

PATCH Applied Bruce Richardson 2 participants 5 messages May 1, 2019 – May 2, 2019

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

cover small fixes for crypto drivers

Some fixes for the dependency checking of the kasumi and zuc PMDs, and an addition of meson support for snow3g which seems to have been overlooked previously.

[Apologies for the late submission, but hopefully these can make it into 19.05]

Bruce Richardson (3):
crypto/snow3g: add to meson build
crypto/kasumi: fix dependency check
crypto/zuc: fix dependency check

 drivers/crypto/kasumi/meson.build |  8 ++++----
 drivers/crypto/meson.build        |  2 +-
 drivers/crypto/snow3g/meson.build | 13 +++++++++++++
 drivers/crypto/zuc/meson.build    |  8 ++++----
 4 files changed, 22 insertions(+), 9 deletions(-)
 create mode 100644 drivers/crypto/snow3g/meson.build
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/3 crypto/snow3g: add to meson build

Snow3G driver is missing support for building with meson. Add a new meson.build file so it can be included in the builds.

---
 drivers/crypto/meson.build        |  2 +-
 drivers/crypto/snow3g/meson.build | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 drivers/crypto/snow3g/meson.build
drivers/crypto/meson.build +1 -1
index bf1bd9286..83e78860e 100644
@@ -3,7 +3,7 @@
 
 drivers = ['aesni_gcm', 'aesni_mb', 'caam_jr', 'ccp', 'dpaa_sec', 'dpaa2_sec',
 	'kasumi', 'mvsam', 'null', 'octeontx', 'openssl', 'qat', 'scheduler',
-	'virtio', 'zuc']
+	'snow3g', 'virtio', 'zuc']
 
 std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
 config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
drivers/crypto/snow3g/meson.build new file +13 -0
new file mode 100644
index 000000000..c566a5f67
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+lib = cc.find_library('sso_snow3g', required: false)
+if not lib.found() or not cc.has_header('sso_snow3g.h')
+	build = false
+	subdir_done()
+endif
+
+allow_experimental_apis = true
+ext_deps += lib
+sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c')
+deps += ['bus_vdev', 'cryptodev']
Signature · 1 line
2.21.0
#2 lore raw

PATCH 2/3 crypto/kasumi: fix dependency check

In reply to Bruce Richardson

The check for the kasumi library dependency did not check for the include file needed for compilation. It's also recommended when looking for a library to use the name without the lib prefix.

Fixes 2ec2d46c6255 ("crypto/kasumi: enable meson build")
---
 drivers/crypto/kasumi/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/kasumi/meson.build +4 -4
index 80f13cd24..0fa301740 100644
@@ -1,13 +1,13 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-lib = cc.find_library('libsso_kasumi', required: false)
-if not lib.found()
+lib = cc.find_library('sso_kasumi', required: false)
+if not lib.found() or not cc.has_header('sso_kasumi.h')
 	build = false
-else
-	ext_deps += lib
+	subdir_done()
 endif
 
 allow_experimental_apis = true
+ext_deps += lib
 sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c')
 deps += ['bus_vdev']
Signature · 1 line
2.21.0
#3 lore raw

PATCH 3/3 crypto/zuc: fix dependency check

In reply to Bruce Richardson

The check for the zuc library dependency did not check for the include file needed for compilation. It's also recommended when looking for a library to use the name without the lib prefix.

Fixes df1740a8db5f ("crypto/zuc: enable meson build")
---
 drivers/crypto/zuc/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/zuc/meson.build +4 -4
index 63f2a5298..fc2900244 100644
@@ -1,13 +1,13 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-lib = cc.find_library('libsso_zuc', required: false)
-if not lib.found()
+lib = cc.find_library('sso_zuc', required: false)
+if not lib.found() or not cc.has_header('sso_zuc.h')
 	build = false
-else
-	ext_deps += lib
+	subdir_done()
 endif
 
 allow_experimental_apis = true
+ext_deps += lib
 sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c')
 deps += ['bus_vdev']
Signature · 1 line
2.21.0
#4 lore raw
In reply to Bruce Richardson

01/05/2019 17:53, Bruce Richardson:

Quoted 10 lines

Some fixes for the dependency checking of the kasumi and zuc PMDs, and an addition of meson support for snow3g which seems to have been overlooked previously.

[Apologies for the late submission, but hopefully these can make it into 19.05]

Bruce Richardson (3):
crypto/snow3g: add to meson build
crypto/kasumi: fix dependency check
crypto/zuc: fix dependency check

Applied, thanks