From patchwork Wed Jul 11 11:56:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fiona Trahe X-Patchwork-Id: 42836 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E7931B552; Wed, 11 Jul 2018 13:57:38 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1C9681B50C for ; Wed, 11 Jul 2018 13:57:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 04:57:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="54214074" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga008.fm.intel.com with ESMTP; 11 Jul 2018 04:57:32 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, tomaszx.jozwiak@intel.com Date: Wed, 11 Jul 2018 12:56:55 +0100 Message-Id: <1531310229-17448-3-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1531183311-32619-1-git-send-email-fiona.trahe@intel.com> References: <1531183311-32619-1-git-send-email-fiona.trahe@intel.com> Subject: [dpdk-dev] [PATCH v5 02/16] compress/qat: add makefiles for PMD 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add Makefiles, directory and empty source files for compression PMD. Handle cases for building either symmetric crypto PMD or compression PMD or both and the common files both depend on. Signed-off-by: Fiona Trahe Signed-off-by: Tomasz Jozwiak --- MAINTAINERS | 4 +++ config/common_base | 3 +- drivers/common/qat/Makefile | 60 +++++++++++++++++++++++-------------- drivers/compress/qat/qat_comp.c | 5 ++++ drivers/compress/qat/qat_comp.h | 14 +++++++++ drivers/compress/qat/qat_comp_pmd.c | 5 ++++ drivers/compress/qat/qat_comp_pmd.h | 15 ++++++++++ test/test/test_cryptodev.c | 6 ++-- 8 files changed, 86 insertions(+), 26 deletions(-) create mode 100644 drivers/compress/qat/qat_comp.c create mode 100644 drivers/compress/qat/qat_comp.h create mode 100644 drivers/compress/qat/qat_comp_pmd.c create mode 100644 drivers/compress/qat/qat_comp_pmd.h diff --git a/MAINTAINERS b/MAINTAINERS index 8050b5d..50b2dff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -852,6 +852,10 @@ F: drivers/compress/isal/ F: doc/guides/compressdevs/isal.rst F: doc/guides/compressdevs/features/isal.ini +Intel QuickAssist +M: Fiona Trahe +F: drivers/compress/qat/ +F: drivers/common/qat/ Eventdev Drivers ---------------- diff --git a/config/common_base b/config/common_base index e4241db..1e340b4 100644 --- a/config/common_base +++ b/config/common_base @@ -480,7 +480,8 @@ CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4 # # Compile PMD for QuickAssist based devices # -CONFIG_RTE_LIBRTE_PMD_QAT=n +CONFIG_RTE_LIBRTE_PMD_QAT=y +CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n # # Max. number of QuickAssist devices, which can be detected and attached # diff --git a/drivers/common/qat/Makefile b/drivers/common/qat/Makefile index 02e83f9..2a4c99b 100644 --- a/drivers/common/qat/Makefile +++ b/drivers/common/qat/Makefile @@ -3,48 +3,64 @@ include $(RTE_SDK)/mk/rte.vars.mk -# library name -LIB = librte_pmd_qat.a - -# library version -LIBABIVER := 1 - -# build flags -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -O3 - # build directories QAT_CRYPTO_DIR := $(RTE_SDK)/drivers/crypto/qat -VPATH=$(QAT_CRYPTO_DIR) +QAT_COMPRESS_DIR := $(RTE_SDK)/drivers/compress/qat +VPATH=$(QAT_CRYPTO_DIR):$(QAT_COMPRESS_DIR) # external library include paths CFLAGS += -I$(SRCDIR)/qat_adf CFLAGS += -I$(SRCDIR) CFLAGS += -I$(QAT_CRYPTO_DIR) +CFLAGS += -I$(QAT_COMPRESS_DIR) -# library common source files -SRCS-y += qat_device.c -SRCS-y += qat_common.c -SRCS-y += qat_logs.c -SRCS-y += qat_qp.c + +ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y) + CFLAGS += -DALLOW_EXPERIMENTAL_API + LDLIBS += -lrte_compressdev + SRCS-y += qat_comp.c + SRCS-y += qat_comp_pmd.c + build_qat = yes +endif # library symmetric crypto source files ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) +ifeq ($(CONFIG_RTE_LIBRTE_PMD_QAT_SYM),y) LDLIBS += -lrte_cryptodev LDLIBS += -lcrypto CFLAGS += -DBUILD_QAT_SYM SRCS-y += qat_sym.c SRCS-y += qat_sym_session.c SRCS-y += qat_sym_pmd.c + build_qat = yes +endif endif -LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -LDLIBS += -lrte_pci -lrte_bus_pci +ifdef build_qat -# export include files -SYMLINK-y-include += + # library name + LIB = librte_pmd_qat.a -# versioning export map -EXPORT_MAP := ../../crypto/qat/rte_pmd_qat_version.map + # library version + LIBABIVER := 1 + # build flags + CFLAGS += $(WERROR_FLAGS) + CFLAGS += -O3 + + # library common source files + SRCS-y += qat_device.c + SRCS-y += qat_common.c + SRCS-y += qat_logs.c + SRCS-y += qat_qp.c + + LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool + LDLIBS += -lrte_pci -lrte_bus_pci + + # export include files + SYMLINK-y-include += + + # versioning export map + EXPORT_MAP := ../../crypto/qat/rte_pmd_qat_version.map +endif include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c new file mode 100644 index 0000000..caa1158 --- /dev/null +++ b/drivers/compress/qat/qat_comp.c @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Intel Corporation + */ + +#include "qat_comp.h" diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h new file mode 100644 index 0000000..89c475e --- /dev/null +++ b/drivers/compress/qat/qat_comp.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2015-2018 Intel Corporation + */ + +#ifndef _QAT_COMP_H_ +#define _QAT_COMP_H_ + +#ifdef RTE_LIBRTE_COMPRESSDEV + +#include +#include + +#endif +#endif diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c new file mode 100644 index 0000000..fb035d1 --- /dev/null +++ b/drivers/compress/qat/qat_comp_pmd.c @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2015-2018 Intel Corporation + */ + +#include "qat_comp_pmd.h" diff --git a/drivers/compress/qat/qat_comp_pmd.h b/drivers/compress/qat/qat_comp_pmd.h new file mode 100644 index 0000000..9b5b543 --- /dev/null +++ b/drivers/compress/qat/qat_comp_pmd.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2015-2018 Intel Corporation + */ + +#ifndef _QAT_COMP_PMD_H_ +#define _QAT_COMP_PMD_H_ + +#ifdef RTE_LIBRTE_COMPRESSDEV + +#include +#include + + +#endif +#endif /* _QAT_COMP_PMD_H_ */ diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c index b759e08..cbbdb15 100644 --- a/test/test/test_cryptodev.c +++ b/test/test/test_cryptodev.c @@ -9938,9 +9938,9 @@ test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/) RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)); if (gbl_driver_id == -1) { - RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if " - "CONFIG_RTE_LIBRTE_PMD_QAT is enabled " - "in config file to run this testsuite.\n"); + RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check that both " + "CONFIG_RTE_LIBRTE_PMD_QAT and CONFIG_RTE_LIBRTE_PMD_QAT_SYM " + "are enabled in config file to run this testsuite.\n"); return TEST_SKIPPED; }