f-stack/dpdk/drivers/common/qat/meson.build

101 lines
3.0 KiB
Meson
Raw Normal View History

2019-06-25 11:12:58 +00:00
# SPDX-License-Identifier: BSD-3-Clause
2023-09-13 12:21:49 +00:00
# Copyright(c) 2017-2022 Intel Corporation
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
if is_windows
build = false
reason = 'not supported on Windows'
subdir_done()
endif
2021-02-05 08:48:47 +00:00
qat_crypto = true
qat_crypto_path = 'crypto/qat'
qat_crypto_relpath = '../../' + qat_crypto_path
qat_compress = true
qat_compress_path = 'compress/qat'
qat_compress_relpath = '../../' + qat_compress_path
2022-09-06 04:00:10 +00:00
if disable_drivers.contains(qat_crypto_path)
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
'Explicitly disabled via build config')
2021-02-05 08:48:47 +00:00
endif
2022-09-06 04:00:10 +00:00
if disable_drivers.contains(qat_compress_path)
qat_compress = false
dpdk_drvs_disabled += qat_compress_path
set_variable(qat_compress_path.underscorify() + '_disable_reason',
'Explicitly disabled via build config')
2021-02-05 08:48:47 +00:00
endif
2022-09-02 04:40:05 +00:00
libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
2021-02-05 08:48:47 +00:00
if qat_crypto and not libcrypto.found()
2022-09-06 04:00:10 +00:00
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
'missing dependency, libcrypto')
2021-02-05 08:48:47 +00:00
endif
2023-09-13 12:21:49 +00:00
IMB_required_ver = '1.2.0'
IMB_header = '#include<intel-ipsec-mb.h>'
if arch_subdir == 'arm'
IMB_header = '#include<ipsec-mb.h>'
endif
libipsecmb = cc.find_library('IPSec_MB', required: false)
libcrypto_3 = dependency('libcrypto', required: false,
method: 'pkg-config', version : '>=3.0.0')
if libipsecmb.found() and libcrypto_3.found()
# version comes with quotes, so we split based on " and take the middle
imb_ver = cc.get_define('IMB_VERSION_STR',
prefix : IMB_header).split('"')[1]
if (imb_ver.version_compare('>=' + IMB_required_ver))
ext_deps += libipsecmb
dpdk_conf.set('RTE_QAT_LIBIPSECMB', true)
endif
endif
2021-02-05 08:48:47 +00:00
deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
2022-09-06 04:00:10 +00:00
sources += files(
'qat_common.c',
'qat_qp.c',
'qat_device.c',
'qat_logs.c',
'qat_pf2vf.c',
'dev/qat_dev_gen1.c',
'dev/qat_dev_gen2.c',
'dev/qat_dev_gen3.c',
'dev/qat_dev_gen4.c',
)
includes += include_directories(
'qat_adf',
qat_crypto_relpath,
qat_compress_relpath,
)
2021-02-05 08:48:47 +00:00
if qat_compress
2022-09-06 04:00:10 +00:00
foreach f: ['qat_comp_pmd.c', 'qat_comp.c',
'dev/qat_comp_pmd_gen1.c',
'dev/qat_comp_pmd_gen2.c',
'dev/qat_comp_pmd_gen3.c',
'dev/qat_comp_pmd_gen4.c',
]
sources += files(join_paths(qat_compress_relpath, f))
endforeach
2021-02-05 08:48:47 +00:00
endif
if qat_crypto
2023-09-13 12:21:49 +00:00
foreach f: ['qat_sym.c', 'qat_sym_session.c',
'qat_asym.c', 'qat_crypto.c',
2022-09-06 04:00:10 +00:00
'dev/qat_sym_pmd_gen1.c',
'dev/qat_asym_pmd_gen1.c',
'dev/qat_crypto_pmd_gen2.c',
'dev/qat_crypto_pmd_gen3.c',
'dev/qat_crypto_pmd_gen4.c',
]
sources += files(join_paths(qat_crypto_relpath, f))
endforeach
deps += ['security']
ext_deps += libcrypto
cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
2021-02-05 08:48:47 +00:00
endif