Skip to content

Commit

Permalink
drivers/crypto: modify max IPsec-mb version supported
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Luca Boccassi <[email protected]>
  • Loading branch information
ciarapow authored and bluca committed Nov 21, 2023
1 parent 10bc79a commit ea079f7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
7 changes: 4 additions & 3 deletions drivers/crypto/aesni_gcm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,9 +14,9 @@ else
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : '#include<intel-ipsec-mb.h>').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
Expand Down
7 changes: 4 additions & 3 deletions drivers/crypto/aesni_mb/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,9 +14,9 @@ else
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : '#include<intel-ipsec-mb.h>').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

Expand Down
7 changes: 4 additions & 3 deletions drivers/crypto/kasumi/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,9 +12,9 @@ else
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : '#include<intel-ipsec-mb.h>').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

Expand Down
7 changes: 4 additions & 3 deletions drivers/crypto/snow3g/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,9 +12,9 @@ else
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : '#include<intel-ipsec-mb.h>').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

Expand Down
7 changes: 4 additions & 3 deletions drivers/crypto/zuc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,9 +12,9 @@ else
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : '#include<intel-ipsec-mb.h>').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

Expand Down

0 comments on commit ea079f7

Please sign in to comment.