From ea079f71eeccecf7ae1a4fe36faf2d49f885b427 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Tue, 21 Nov 2023 17:03:50 +0000 Subject: [PATCH] drivers/crypto: modify max IPsec-mb version supported The DPDK 20.11 LTS supports intel-ipsec-mb library version 0.53 - 1.3. If building with a version newer than 1.3, compilation of the following PMDs should not happen: - AESNI_MB PMD - AESNI_GCM PMD - KASUMI PMD - SNOW3G PMD - ZUC PMD Signed-off-by: Ciara Power Tested-by: Luca Boccassi --- drivers/crypto/aesni_gcm/meson.build | 7 ++++--- drivers/crypto/aesni_mb/meson.build | 7 ++++--- drivers/crypto/kasumi/meson.build | 7 ++++--- drivers/crypto/snow3g/meson.build | 7 ++++--- drivers/crypto/zuc/meson.build | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/aesni_gcm/meson.build b/drivers/crypto/aesni_gcm/meson.build index ea83e87740..444ee4f0d1 100644 --- a/drivers/crypto/aesni_gcm/meson.build +++ b/drivers/crypto/aesni_gcm/meson.build @@ -2,6 +2,7 @@ # Copyright(c) 2018 Intel Corporation IMB_required_ver = '0.52.0' +IMB_max_ver = '1.3.0' lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false @@ -13,9 +14,9 @@ else imb_ver = cc.get_define('IMB_VERSION_STR', prefix : '#include').split('"')[1] - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver) + or imb_ver.version_compare('>' + IMB_max_ver)) + reason = 'IPSec_MB version >= @0@ and <= @2@ is required, found version @1@'.format(IMB_required_ver, imb_ver, IMB_max_ver) build = false endif endif diff --git a/drivers/crypto/aesni_mb/meson.build b/drivers/crypto/aesni_mb/meson.build index 419b4743f5..d2a000b278 100644 --- a/drivers/crypto/aesni_mb/meson.build +++ b/drivers/crypto/aesni_mb/meson.build @@ -2,6 +2,7 @@ # Copyright(c) 2018 Intel Corporation IMB_required_ver = '0.52.0' +IMB_max_ver = '1.3.0' lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false @@ -13,9 +14,9 @@ else imb_ver = cc.get_define('IMB_VERSION_STR', prefix : '#include').split('"')[1] - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver) + or imb_ver.version_compare('>' + IMB_max_ver)) + reason = 'IPSec_MB version >= @0@ and <= @2@ is required, found version @1@'.format(IMB_required_ver, imb_ver, IMB_max_ver) build = false endif diff --git a/drivers/crypto/kasumi/meson.build b/drivers/crypto/kasumi/meson.build index 7560fb7cfa..cee4dd6b2a 100644 --- a/drivers/crypto/kasumi/meson.build +++ b/drivers/crypto/kasumi/meson.build @@ -2,6 +2,7 @@ # Copyright(c) 2018-2020 Intel Corporation IMB_required_ver = '0.53.0' +IMB_max_ver = '1.3.0' lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false @@ -11,9 +12,9 @@ else imb_ver = cc.get_define('IMB_VERSION_STR', prefix : '#include').split('"')[1] - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver) + or imb_ver.version_compare('>' + IMB_max_ver)) + reason = 'IPSec_MB version >= @0@ and <= @2@ is required, found version @1@'.format(IMB_required_ver, imb_ver, IMB_max_ver) build = false endif diff --git a/drivers/crypto/snow3g/meson.build b/drivers/crypto/snow3g/meson.build index c1c5fd37f7..6d63d527fe 100644 --- a/drivers/crypto/snow3g/meson.build +++ b/drivers/crypto/snow3g/meson.build @@ -2,6 +2,7 @@ # Copyright(c) 2019-2020 Intel Corporation IMB_required_ver = '0.53.0' +IMB_max_ver = '1.3.0' lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false @@ -11,9 +12,9 @@ else imb_ver = cc.get_define('IMB_VERSION_STR', prefix : '#include').split('"')[1] - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver) + or imb_ver.version_compare('>' + IMB_max_ver)) + reason = 'IPSec_MB version >= @0@ and <= @2@ is required, found version @1@'.format(IMB_required_ver, imb_ver, IMB_max_ver) build = false endif diff --git a/drivers/crypto/zuc/meson.build b/drivers/crypto/zuc/meson.build index c3454d799e..8eef385fe9 100644 --- a/drivers/crypto/zuc/meson.build +++ b/drivers/crypto/zuc/meson.build @@ -2,6 +2,7 @@ # Copyright(c) 2018-2020 Intel Corporation IMB_required_ver = '0.53.0' +IMB_max_ver = '1.3.0' lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false @@ -11,9 +12,9 @@ else imb_ver = cc.get_define('IMB_VERSION_STR', prefix : '#include').split('"')[1] - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver) + or imb_ver.version_compare('>' + IMB_max_ver)) + reason = 'IPSec_MB version >= @0@ and <= @2@ is required, found version @1@'.format(IMB_required_ver, imb_ver, IMB_max_ver) build = false endif