1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2018 Intel Corporation
6 reason = 'not supported on Windows'
11 qat_crypto_path = 'crypto/qat'
12 qat_crypto_relpath = '../../' + qat_crypto_path
14 qat_compress_path = 'compress/qat'
15 qat_compress_relpath = '../../' + qat_compress_path
17 if disable_drivers.contains(qat_crypto_path)
19 dpdk_drvs_disabled += qat_crypto_path
20 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
21 'Explicitly disabled via build config')
23 if disable_drivers.contains(qat_compress_path)
25 dpdk_drvs_disabled += qat_compress_path
26 set_variable(qat_compress_path.underscorify() + '_disable_reason',
27 'Explicitly disabled via build config')
30 libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
31 if qat_crypto and not libcrypto.found()
33 dpdk_drvs_disabled += qat_crypto_path
34 set_variable(qat_crypto_path.underscorify() + '_disable_reason',
35 'missing dependency, libcrypto')
38 # The driver should not build if both compression and crypto are disabled
39 #FIXME common code depends on compression files so check only compress!
40 if not qat_compress # and not qat_crypto
42 reason = '' # rely on reason for compress/crypto above
46 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
58 includes += include_directories(
65 foreach f: ['qat_comp_pmd.c', 'qat_comp.c',
66 'dev/qat_comp_pmd_gen1.c',
67 'dev/qat_comp_pmd_gen2.c',
68 'dev/qat_comp_pmd_gen3.c',
69 'dev/qat_comp_pmd_gen4.c',
71 sources += files(join_paths(qat_compress_relpath, f))
76 foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
77 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c', 'qat_crypto.c',
78 'dev/qat_sym_pmd_gen1.c',
79 'dev/qat_asym_pmd_gen1.c',
80 'dev/qat_crypto_pmd_gen2.c',
81 'dev/qat_crypto_pmd_gen3.c',
82 'dev/qat_crypto_pmd_gen4.c',
84 sources += files(join_paths(qat_crypto_relpath, f))
88 cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']