X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcommon%2Fqat%2Fmeson.build;h=053c219fed288824f8b84f358e81bc128e47fe21;hb=70d2f42110576c670a67abd35a4bb6a2d0b00980;hp=8de2492893962c5528f6fb7421caa25eda84f91f;hpb=530588f3cd50d5626cfa2b94e161b97e97d84ade;p=dpdk.git diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index 8de2492893..053c219fed 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -1,15 +1,74 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Intel Corporation -# This does not build a driver, but instead holds common files for -# the crypto and compression drivers. -build = false -reason = '' # sentinal value to suppress printout -qat_deps = ['bus_pci'] -qat_sources = files('qat_common.c', - 'qat_qp.c', - 'qat_device.c', - 'qat_logs.c') -qat_includes = [include_directories('.', 'qat_adf')] -qat_ext_deps = [] -qat_cflags = [] +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + +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 + +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') +endif +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') +endif + +libcrypto = dependency('libcrypto', required: false, method: 'pkg-config') +if qat_crypto and not libcrypto.found() + qat_crypto = false + dpdk_drvs_disabled += qat_crypto_path + set_variable(qat_crypto_path.underscorify() + '_disable_reason', + 'missing dependency, libcrypto') +endif + +# The driver should not build if both compression and crypto are disabled +#FIXME common code depends on compression files so check only compress! +if not qat_compress # and not qat_crypto + build = false + reason = '' # rely on reason for compress/crypto above + subdir_done() +endif + +deps += ['bus_pci', 'cryptodev', 'net', 'compressdev'] +sources += files( + 'qat_common.c', + 'qat_qp.c', + 'qat_device.c', + 'qat_logs.c', + 'qat_pf2vf.c', +) +includes += include_directories( + 'qat_adf', + qat_crypto_relpath, + qat_compress_relpath, +) + +if qat_compress + foreach f: ['qat_comp_pmd.c', 'qat_comp.c'] + sources += files(join_paths(qat_compress_relpath, f)) + endforeach +endif + +if qat_crypto + foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c', + 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c'] + sources += files(join_paths(qat_crypto_relpath, f)) + endforeach + deps += ['security'] + ext_deps += libcrypto + cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM'] +endif