From: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
To: fiona.trahe@intel.com, tomaszx.jozwiak@intel.com,
pablo.de.lara.guarch@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/4] crypto/qat: move common qat files to common dir
Date: Tue, 22 May 2018 08:51:40 +0200 [thread overview]
Message-ID: <1526971901-9281-4-git-send-email-tomaszx.jozwiak@intel.com> (raw)
In-Reply-To: <1526971901-9281-1-git-send-email-tomaszx.jozwiak@intel.com>
- moved common qat files to common/qat dir.
- changed common/qat/Makefile, common/qat/meson.build,
drivers/meson.build, drivers/Makefile, crypto/Makefile
to add possibility of using new files locations
- added common/qat/qat dir for meson build
- added README file into crypto/qat to clarify where
the build is made from
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/Makefile | 2 ++
drivers/{crypto => common}/qat/Makefile | 13 ++++++++----
drivers/common/qat/meson.build | 8 ++++++++
drivers/common/qat/qat/meson.build | 24 ++++++++++++++++++++++
.../qat}/qat/rte_pmd_qat_version.map | 0
.../qat/qat_adf/adf_transport_access_macros.h | 0
.../{crypto => common}/qat/qat_adf/icp_qat_fw.h | 0
.../{crypto => common}/qat/qat_adf/icp_qat_fw_la.h | 0
.../{crypto => common}/qat/qat_adf/icp_qat_hw.h | 0
drivers/{crypto => common}/qat/qat_common.c | 0
drivers/{crypto => common}/qat/qat_common.h | 0
drivers/{crypto => common}/qat/qat_device.c | 0
drivers/{crypto => common}/qat/qat_device.h | 0
drivers/{crypto => common}/qat/qat_logs.c | 0
drivers/{crypto => common}/qat/qat_logs.h | 0
drivers/{crypto => common}/qat/qat_qp.c | 0
drivers/{crypto => common}/qat/qat_qp.h | 0
drivers/crypto/Makefile | 1 -
drivers/crypto/meson.build | 2 +-
drivers/crypto/qat/README | 7 +++++++
drivers/crypto/qat/meson.build | 19 -----------------
drivers/meson.build | 1 +
22 files changed, 52 insertions(+), 25 deletions(-)
rename drivers/{crypto => common}/qat/Makefile (73%)
create mode 100644 drivers/common/qat/meson.build
create mode 100644 drivers/common/qat/qat/meson.build
rename drivers/{crypto => common/qat}/qat/rte_pmd_qat_version.map (100%)
rename drivers/{crypto => common}/qat/qat_adf/adf_transport_access_macros.h (100%)
rename drivers/{crypto => common}/qat/qat_adf/icp_qat_fw.h (100%)
rename drivers/{crypto => common}/qat/qat_adf/icp_qat_fw_la.h (100%)
rename drivers/{crypto => common}/qat/qat_adf/icp_qat_hw.h (100%)
rename drivers/{crypto => common}/qat/qat_common.c (100%)
rename drivers/{crypto => common}/qat/qat_common.h (100%)
rename drivers/{crypto => common}/qat/qat_device.c (100%)
rename drivers/{crypto => common}/qat/qat_device.h (100%)
rename drivers/{crypto => common}/qat/qat_logs.c (100%)
rename drivers/{crypto => common}/qat/qat_logs.h (100%)
rename drivers/{crypto => common}/qat/qat_qp.c (100%)
rename drivers/{crypto => common}/qat/qat_qp.h (100%)
create mode 100644 drivers/crypto/qat/README
delete mode 100644 drivers/crypto/qat/meson.build
diff --git a/drivers/Makefile b/drivers/Makefile
index c88638c..7566076 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -13,6 +13,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += baseband
DEPDIRS-baseband := common bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
DEPDIRS-crypto := common bus mempool
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += common/qat
+DEPDIRS-common/qat := bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
DEPDIRS-compress := bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
diff --git a/drivers/crypto/qat/Makefile b/drivers/common/qat/Makefile
similarity index 73%
rename from drivers/crypto/qat/Makefile
rename to drivers/common/qat/Makefile
index 77700b4..c023c34 100644
--- a/drivers/crypto/qat/Makefile
+++ b/drivers/common/qat/Makefile
@@ -16,8 +16,13 @@ LIBABIVER := 1
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -O3
+# build directories
+QAT_CRYPTO_DIR := $(RTE_SDK)/drivers/crypto/qat
+
# external library include paths
CFLAGS += -I$(SRCDIR)/qat_adf
+CFLAGS += -I$(SRCDIR)
+CFLAGS += -I$(QAT_CRYPTO_DIR)
# library common source files
SRCS-y += qat_device.c
@@ -29,9 +34,9 @@ ifeq ($(LIBCRYPTO),0)
LDLIBS += -lrte_cryptodev
LDLIBS += -lcrypto
CFLAGS += -DCONFIG_LIBCRYPTO_QAT
- SRCS-y += qat_sym.c
- SRCS-y += qat_sym_session.c
- SRCS-y += qat_sym_pmd.c
+ 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
endif
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool
@@ -41,6 +46,6 @@ LDLIBS += -lrte_pci -lrte_bus_pci
SYMLINK-y-include +=
# versioning export map
-EXPORT_MAP := rte_pmd_qat_version.map
+EXPORT_MAP := qat/rte_pmd_qat_version.map
include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
new file mode 100644
index 0000000..8eed6c8
--- /dev/null
+++ b/drivers/common/qat/meson.build
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+drivers = ['qat']
+
+std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
+config_flag_fmt = 'RTE_LIBRTE_PMD_@0@'
+driver_name_fmt = 'rte_pmd_@0@'
diff --git a/drivers/common/qat/qat/meson.build b/drivers/common/qat/qat/meson.build
new file mode 100644
index 0000000..fb1055c
--- /dev/null
+++ b/drivers/common/qat/qat/meson.build
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2017-2018 Intel Corporation
+
+dep = dependency('libcrypto', required: false)
+
+sources = files('../qat_common.c',
+ '../qat_qp.c',
+ '../qat_device.c',
+ '../qat_logs.c')
+
+if dep.found()
+ sources += files('../../../crypto/qat/qat_sym_pmd.c',
+ '../../../crypto/qat/qat_sym.c',
+ '../../../crypto/qat/qat_sym_session.c')
+
+ pkgconfig_extra_libs += '-lcrypto'
+ cflags += '-DCONFIG_LIBCRYPTO_QAT'
+endif
+
+includes += include_directories('../')
+includes += include_directories('../qat_adf')
+includes += include_directories('../../../crypto/qat')
+deps += ['bus_pci']
+ext_deps += dep
diff --git a/drivers/crypto/qat/rte_pmd_qat_version.map b/drivers/common/qat/qat/rte_pmd_qat_version.map
similarity index 100%
rename from drivers/crypto/qat/rte_pmd_qat_version.map
rename to drivers/common/qat/qat/rte_pmd_qat_version.map
diff --git a/drivers/crypto/qat/qat_adf/adf_transport_access_macros.h b/drivers/common/qat/qat_adf/adf_transport_access_macros.h
similarity index 100%
rename from drivers/crypto/qat/qat_adf/adf_transport_access_macros.h
rename to drivers/common/qat/qat_adf/adf_transport_access_macros.h
diff --git a/drivers/crypto/qat/qat_adf/icp_qat_fw.h b/drivers/common/qat/qat_adf/icp_qat_fw.h
similarity index 100%
rename from drivers/crypto/qat/qat_adf/icp_qat_fw.h
rename to drivers/common/qat/qat_adf/icp_qat_fw.h
diff --git a/drivers/crypto/qat/qat_adf/icp_qat_fw_la.h b/drivers/common/qat/qat_adf/icp_qat_fw_la.h
similarity index 100%
rename from drivers/crypto/qat/qat_adf/icp_qat_fw_la.h
rename to drivers/common/qat/qat_adf/icp_qat_fw_la.h
diff --git a/drivers/crypto/qat/qat_adf/icp_qat_hw.h b/drivers/common/qat/qat_adf/icp_qat_hw.h
similarity index 100%
rename from drivers/crypto/qat/qat_adf/icp_qat_hw.h
rename to drivers/common/qat/qat_adf/icp_qat_hw.h
diff --git a/drivers/crypto/qat/qat_common.c b/drivers/common/qat/qat_common.c
similarity index 100%
rename from drivers/crypto/qat/qat_common.c
rename to drivers/common/qat/qat_common.c
diff --git a/drivers/crypto/qat/qat_common.h b/drivers/common/qat/qat_common.h
similarity index 100%
rename from drivers/crypto/qat/qat_common.h
rename to drivers/common/qat/qat_common.h
diff --git a/drivers/crypto/qat/qat_device.c b/drivers/common/qat/qat_device.c
similarity index 100%
rename from drivers/crypto/qat/qat_device.c
rename to drivers/common/qat/qat_device.c
diff --git a/drivers/crypto/qat/qat_device.h b/drivers/common/qat/qat_device.h
similarity index 100%
rename from drivers/crypto/qat/qat_device.h
rename to drivers/common/qat/qat_device.h
diff --git a/drivers/crypto/qat/qat_logs.c b/drivers/common/qat/qat_logs.c
similarity index 100%
rename from drivers/crypto/qat/qat_logs.c
rename to drivers/common/qat/qat_logs.c
diff --git a/drivers/crypto/qat/qat_logs.h b/drivers/common/qat/qat_logs.h
similarity index 100%
rename from drivers/crypto/qat/qat_logs.h
rename to drivers/common/qat/qat_logs.h
diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
similarity index 100%
rename from drivers/crypto/qat/qat_qp.c
rename to drivers/common/qat/qat_qp.c
diff --git a/drivers/crypto/qat/qat_qp.h b/drivers/common/qat/qat_qp.h
similarity index 100%
rename from drivers/crypto/qat/qat_qp.h
rename to drivers/common/qat/qat_qp.h
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 1d0c88e..c480cbd 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -8,7 +8,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
DIRS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += armv8
DIRS-$(CONFIG_RTE_LIBRTE_PMD_CCP) += ccp
DIRS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += openssl
-DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
DIRS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += scheduler
DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g
DIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += kasumi
diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index 7b3ec13..0d98ea1 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -2,7 +2,7 @@
# Copyright(c) 2017 Intel Corporation
drivers = ['dpaa_sec', 'dpaa2_sec', 'mvsam',
- 'null', 'openssl', 'qat', 'virtio']
+ 'null', 'openssl', 'virtio']
std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
diff --git a/drivers/crypto/qat/README b/drivers/crypto/qat/README
new file mode 100644
index 0000000..ae68c08
--- /dev/null
+++ b/drivers/crypto/qat/README
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2015-2018 Intel Corporation
+
+Makefile and meson.build files for crypto QAT PMD are in common/qat directory.
+The build for the QAT driver is done from there as only one library is built for the
+whole QAT pci device and that library includes all the services (crypto, compression)
+which are enabled on the device.
diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build
deleted file mode 100644
index c96486a..0000000
--- a/drivers/crypto/qat/meson.build
+++ /dev/null
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017-2018 Intel Corporation
-
-dep = dependency('libcrypto', required: false)
-
-sources = files('qat_common.c',
- 'qat_qp.c',
- 'qat_device.c',
- 'qat_logs.c')
-
-if dep.found()
- sources += files('qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c')
- pkgconfig_extra_libs += '-lcrypto'
- cflags += '-DCONFIG_LIBCRYPTO_QAT'
-endif
-
-includes += include_directories('qat_adf')
-deps += ['bus_pci']
-ext_deps += dep
diff --git a/drivers/meson.build b/drivers/meson.build
index ac6c972..606d11f 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -5,6 +5,7 @@
driver_classes = ['common',
'bus',
'mempool', # depends on common and bus.
+ 'common/qat', # depends on bus, mempool.
'net', # depends on common, bus and mempool.
'crypto', # depends on common, bus and mempool (net in future).
'compress', # depends on common, bus, mempool.
--
2.7.4
next prev parent reply other threads:[~2018-05-22 6:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 6:51 [dpdk-dev] [PATCH 0/4] crypto/qat: move files to drivers/common directory Tomasz Jozwiak
2018-05-22 6:51 ` [dpdk-dev] [PATCH 1/4] crypto/qat: add weak functions Tomasz Jozwiak
2018-05-22 6:51 ` [dpdk-dev] [PATCH 2/4] crypto/qat: add libcrypto detection to Makefile Tomasz Jozwiak
2018-05-22 6:51 ` Tomasz Jozwiak [this message]
2018-05-22 9:20 ` [dpdk-dev] [PATCH 3/4] crypto/qat: move common qat files to common dir Bruce Richardson
2018-05-22 6:51 ` [dpdk-dev] [PATCH 4/4] doc/qat: document libcrypto detection Tomasz Jozwiak
2018-06-14 11:12 ` [dpdk-dev] [PATCH v2 0/3] crypto/qat: move files to drivers/common directory Tomasz Jozwiak
2018-06-14 11:12 ` [dpdk-dev] [PATCH v2 1/3] crypto/qat: add weak functions Tomasz Jozwiak
2018-06-14 11:12 ` [dpdk-dev] [PATCH v2 2/3] crypto/qat: add libcrypto detection to Makefile Tomasz Jozwiak
2018-06-14 11:12 ` [dpdk-dev] [PATCH v2 3/3] crypto/qat: move common qat files to common dir Tomasz Jozwiak
2018-06-26 8:15 ` [dpdk-dev] [PATCH v3 0/3] crypto/qat: move files to drivers/common directory Tomasz Jozwiak
2018-06-26 8:17 ` Tomasz Jozwiak
2018-06-26 8:17 ` [dpdk-dev] [PATCH v3 1/3] crypto/qat: add weak functions Tomasz Jozwiak
2018-06-26 8:17 ` [dpdk-dev] [PATCH v3 2/3] crypto/qat: re-organise build file content Tomasz Jozwiak
2018-06-26 8:17 ` [dpdk-dev] [PATCH v3 3/3] crypto/qat: move common qat files to common dir Tomasz Jozwiak
2018-06-27 21:13 ` [dpdk-dev] [PATCH v3 0/3] crypto/qat: move files to drivers/common directory De Lara Guarch, Pablo
2018-07-02 9:39 ` [dpdk-dev] [PATCH v4 " Tomasz Jozwiak
2018-07-02 9:39 ` [dpdk-dev] [PATCH v4 1/3] crypto/qat: add weak functions Tomasz Jozwiak
2018-07-02 9:39 ` [dpdk-dev] [PATCH v4 2/3] crypto/qat: re-organise build file content Tomasz Jozwiak
2018-07-02 9:39 ` [dpdk-dev] [PATCH v4 3/3] crypto/qat: move common qat files to common dir Tomasz Jozwiak
2018-07-02 13:06 ` [dpdk-dev] [PATCH v4 0/3] crypto/qat: move files to drivers/common directory De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526971901-9281-4-git-send-email-tomaszx.jozwiak@intel.com \
--to=tomaszx.jozwiak@intel.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).