1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2018 Intel Corporation
4 config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
7 qat_crypto_path = 'crypto/qat'
8 qat_crypto_relpath = '../../' + qat_crypto_path
10 qat_compress_path = 'compress/qat'
11 qat_compress_relpath = '../../' + qat_compress_path
13 if disabled_drivers.contains(qat_crypto_path)
15 dpdk_drvs_disabled += qat_crypto_path
16 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
17 'Explicitly disabled via build config')
19 if disabled_drivers.contains(qat_compress_path)
21 dpdk_drvs_disabled += qat_compress_path
22 set_variable(qat_compress_path.underscorify() + '_disable_reason',
23 'Explicitly disabled via build config')
26 libcrypto = dependency('libcrypto', required: false)
27 if qat_crypto and not libcrypto.found()
29 dpdk_drvs_disabled += qat_crypto_path
30 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
31 'missing dependency, libcrypto')
34 # The driver should not build if both compression and crypto are disabled
35 #FIXME common code depends on compression files so check only compress!
36 if not qat_compress # and not qat_crypto
38 reason = '' # rely on reason for compress/crypto above
42 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
43 sources += files('qat_common.c',
47 includes += include_directories('qat_adf',
52 foreach f: ['qat_comp_pmd.c', 'qat_comp.c']
53 sources += files(join_paths(qat_compress_relpath, f))
58 foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
59 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c']
60 sources += files(join_paths(qat_crypto_relpath, f))
64 cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']