1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2018 Intel Corporation
5 qat_crypto_path = 'crypto/qat'
6 qat_crypto_relpath = '../../' + qat_crypto_path
8 qat_compress_path = 'compress/qat'
9 qat_compress_relpath = '../../' + qat_compress_path
11 if disabled_drivers.contains(qat_crypto_path)
13 dpdk_drvs_disabled += qat_crypto_path
14 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
15 'Explicitly disabled via build config')
17 if disabled_drivers.contains(qat_compress_path)
19 dpdk_drvs_disabled += qat_compress_path
20 set_variable(qat_compress_path.underscorify() + '_disable_reason',
21 'Explicitly disabled via build config')
24 libcrypto = dependency('libcrypto', required: false)
25 if qat_crypto and not libcrypto.found()
27 dpdk_drvs_disabled += qat_crypto_path
28 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
29 'missing dependency, libcrypto')
32 # The driver should not build if both compression and crypto are disabled
33 #FIXME common code depends on compression files so check only compress!
34 if not qat_compress # and not qat_crypto
36 reason = '' # rely on reason for compress/crypto above
40 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
41 sources += files('qat_common.c',
45 includes += include_directories('qat_adf',
50 foreach f: ['qat_comp_pmd.c', 'qat_comp.c']
51 sources += files(join_paths(qat_compress_relpath, f))
56 foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
57 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c']
58 sources += files(join_paths(qat_crypto_relpath, f))
62 cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']