[v2,02/16] compress/qat: add makefiles for PMD
Checks
Commit Message
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.
Change-Id: I71c4c6abd1982443cd6f7ff25e03bb161fb3fb16
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
MAINTAINERS | 4 ++++
config/common_base | 3 ++-
drivers/common/qat/Makefile | 48 ++++++++++++++++++++++++++++---------
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, 85 insertions(+), 15 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
@@ -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 <fiona.trahe@intel.com>
+F: drivers/compress/qat/
+F: drivers/common/qat/
Eventdev Drivers
----------------
@@ -484,7 +484,8 @@ CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
#
# 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
#
@@ -15,35 +15,61 @@ CFLAGS += -O3
# build directories
QAT_CRYPTO_DIR := $(RTE_SDK)/drivers/crypto/qat
+QAT_COMPRESS_DIR := $(RTE_SDK)/drivers/compress/qat
# 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_COMPRESS_DIR)/qat_comp.c
+ SRCS-y += $(QAT_COMPRESS_DIR)/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_CRYPTO_DIR)/qat_sym.c
SRCS-y += $(QAT_CRYPTO_DIR)/qat_sym_session.c
SRCS-y += $(QAT_CRYPTO_DIR)/qat_sym_pmd.c
+ build_qat = yes
endif
+endif
+
+ifdef build_qat
-LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool
-LDLIBS += -lrte_pci -lrte_bus_pci
+ # library name
+ LIB = librte_pmd_qat.a
-# export include files
-SYMLINK-y-include +=
+ # library version
+ LIBABIVER := 1
+ # build flags
+ CFLAGS += $(WERROR_FLAGS)
+ CFLAGS += -O3
-# versioning export map
-EXPORT_MAP := ../../crypto/qat/rte_pmd_qat_version.map
+ # 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
new file mode 100644
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation
+ */
+
+#include "qat_comp.h"
new file mode 100644
@@ -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 <rte_compressdev.h>
+#include <rte_compressdev_pmd.h>
+
+#endif
+#endif
new file mode 100644
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2015-2018 Intel Corporation
+ */
+
+#include "qat_comp_pmd.h"
new file mode 100644
@@ -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 <rte_compressdev.h>
+#include <rte_compressdev_pmd.h>
+
+
+#endif
+#endif /* _QAT_COMP_PMD_H_ */
@@ -9908,9 +9908,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;
}