From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C27A92BE3 for ; Mon, 2 Jul 2018 11:39:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 02:39:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,298,1526367600"; d="scan'208";a="63386071" Received: from tjozwiax-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.103.104.48]) by fmsmga002.fm.intel.com with ESMTP; 02 Jul 2018 02:39:18 -0700 From: Tomasz Jozwiak To: Fiona.trahe@intel.com, pablo.de.lara.guarch@intel.com, dev@dpdk.org Date: Mon, 2 Jul 2018 11:39:12 +0200 Message-Id: <1530524353-28607-3-git-send-email-tomaszx.jozwiak@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530524353-28607-1-git-send-email-tomaszx.jozwiak@intel.com> References: <1526971901-9281-1-git-send-email-tomaszx.jozwiak@intel.com> <1530524353-28607-1-git-send-email-tomaszx.jozwiak@intel.com> Subject: [dpdk-dev] [PATCH v4 2/3] crypto/qat: re-organise build file content X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2018 09:39:21 -0000 This patch groups sources and related dependencies into common and sym sections in build files. Signed-off-by: Tomasz Jozwiak Acked-by: Fiona Trahe --- drivers/crypto/qat/Makefile | 25 ++++++++++++++----------- drivers/crypto/qat/meson.build | 16 ++++++++++------ drivers/crypto/qat/qat_sym.h | 2 +- drivers/crypto/qat/qat_sym_pmd.h | 3 +-- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/qat/Makefile b/drivers/crypto/qat/Makefile index 64f39fd..a939eca 100644 --- a/drivers/crypto/qat/Makefile +++ b/drivers/crypto/qat/Makefile @@ -15,19 +15,22 @@ CFLAGS += -O3 # external library include paths CFLAGS += -I$(SRCDIR)/qat_adf -LDLIBS += -lcrypto -LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring + +# library common source files +SRCS-y += qat_device.c +SRCS-y += qat_common.c +SRCS-y += qat_logs.c +SRCS-y += qat_qp.c + +# library symetric crypto source files LDLIBS += -lrte_cryptodev -LDLIBS += -lrte_pci -lrte_bus_pci +LDLIBS += -lcrypto +SRCS-y += qat_sym.c +SRCS-y += qat_sym_session.c +SRCS-y += qat_sym_pmd.c -# library source files -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_device.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_qp.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym_session.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_common.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_logs.c -SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym_pmd.c +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool +LDLIBS += -lrte_pci -lrte_bus_pci # export include files SYMLINK-y-include += diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build index 6d01dac..0675426 100644 --- a/drivers/crypto/qat/meson.build +++ b/drivers/crypto/qat/meson.build @@ -2,15 +2,19 @@ # Copyright(c) 2017-2018 Intel Corporation dep = dependency('libcrypto', required: false) -if not dep.found() - build = false -endif + +build = false sources = files('qat_common.c', 'qat_qp.c', 'qat_device.c', - 'qat_logs.c', - 'qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c') + 'qat_logs.c') + +if dep.found() + sources += files('qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c') + pkgconfig_extra_libs += '-lcrypto' + build = true +endif + includes += include_directories('qat_adf') deps += ['bus_pci'] ext_deps += dep -pkgconfig_extra_libs += '-lcrypto' diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index f9e72a6..126c191 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -6,7 +6,6 @@ #define _QAT_SYM_H_ #include - #include #include "qat_common.h" @@ -153,4 +152,5 @@ qat_sym_process_response(void **op, uint8_t *resp) } *op = (void *)rx_op; } + #endif /* _QAT_SYM_H_ */ diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h index 80a1987..1e2344c 100644 --- a/drivers/crypto/qat/qat_sym_pmd.h +++ b/drivers/crypto/qat/qat_sym_pmd.h @@ -10,7 +10,6 @@ #include "qat_sym_capabilities.h" #include "qat_device.h" - /**< Intel(R) QAT Symmetric Crypto PMD device name */ #define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat #define QAT_SYM_PMD_MAX_NB_SESSIONS 2048 @@ -31,10 +30,10 @@ struct qat_sym_dev_private { /* QAT device symmetric crypto capabilities */ }; - int qat_sym_dev_create(struct qat_pci_device *qat_pci_dev); int qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev); + #endif /* _QAT_SYM_PMD_H_ */ -- 2.7.4