Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41121/?format=api
https://patches.dpdk.org/api/patches/41121/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1528974737-13518-3-git-send-email-tomaszx.jozwiak@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1528974737-13518-3-git-send-email-tomaszx.jozwiak@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1528974737-13518-3-git-send-email-tomaszx.jozwiak@intel.com", "date": "2018-06-14T11:12:16", "name": "[v2,2/3] crypto/qat: add libcrypto detection to Makefile", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "54762c22e701967c14118dc3a283de513904e7dc", "submitter": { "id": 949, "url": "https://patches.dpdk.org/api/people/949/?format=api", "name": "Tomasz Jozwiak", "email": "tomaszx.jozwiak@intel.com" }, "delegate": { "id": 22, "url": "https://patches.dpdk.org/api/users/22/?format=api", "username": "pdelarag", "first_name": "Pablo", "last_name": "de Lara Guarch", "email": "pablo.de.lara.guarch@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1528974737-13518-3-git-send-email-tomaszx.jozwiak@intel.com/mbox/", "series": [ { "id": 125, "url": "https://patches.dpdk.org/api/series/125/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=125", "date": "2018-06-14T11:12:14", "name": "crypto/qat: move files to drivers/common directory", "version": 2, "mbox": "https://patches.dpdk.org/series/125/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/41121/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/41121/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 16DC41E40A;\n\tThu, 14 Jun 2018 13:12:29 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id C84A31E385\n\tfor <dev@dpdk.org>; Thu, 14 Jun 2018 13:12:22 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Jun 2018 04:12:21 -0700", "from tjozwiax-mobl.ger.corp.intel.com (HELO\n\ttojo-VirtualBox.MobicaPL.local) ([10.103.104.42])\n\tby orsmga002.jf.intel.com with ESMTP; 14 Jun 2018 04:12:20 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,222,1526367600\"; d=\"scan'208\";a=\"66941321\"", "From": "Tomasz Jozwiak <tomaszx.jozwiak@intel.com>", "To": "fiona.trahe@intel.com,\n\ttomaszx.jozwiak@intel.com,\n\tdev@dpdk.org", "Date": "Thu, 14 Jun 2018 13:12:16 +0200", "Message-Id": "<1528974737-13518-3-git-send-email-tomaszx.jozwiak@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1528974737-13518-1-git-send-email-tomaszx.jozwiak@intel.com>", "References": "<1526971901-9281-1-git-send-email-tomaszx.jozwiak@intel.com>\n\t<1528974737-13518-1-git-send-email-tomaszx.jozwiak@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 2/3] crypto/qat: add libcrypto detection to\n\tMakefile", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch adds detection of libcrypto in qat/Makefile.\nCrypto QAT PMD is build, but only when this library is installed.\nAdded description into qat.rst file.\n\nSigned-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\nAcked-by: Fiona Trahe <fiona.trahe@intel.com>\n---\n config/common_base | 5 +++--\n doc/guides/cryptodevs/qat.rst | 9 +++++++--\n drivers/crypto/qat/Makefile | 32 ++++++++++++++++++++------------\n drivers/crypto/qat/meson.build | 15 +++++++++------\n drivers/crypto/qat/qat_sym.h | 9 +++++++++\n drivers/crypto/qat/qat_sym_pmd.h | 5 +++++\n 6 files changed, 53 insertions(+), 22 deletions(-)", "diff": "diff --git a/config/common_base b/config/common_base\nindex 3cd702e..f456f95 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -480,8 +480,9 @@ CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048\n \n #\n # Compile PMD for QuickAssist based devices\n-#\n-CONFIG_RTE_LIBRTE_PMD_QAT=n\n+# This QAT flag causes crypto QAT PMD to build,\n+# but only if libcrypto is installed.\n+CONFIG_RTE_LIBRTE_PMD_QAT=y\n #\n # Max. number of QuickAssist devices, which can be detected and attached\n #\ndiff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst\nindex 77f8362..fa23a56 100644\n--- a/doc/guides/cryptodevs/qat.rst\n+++ b/doc/guides/cryptodevs/qat.rst\n@@ -71,7 +71,10 @@ Limitations\n Installation\n ------------\n \n-To enable QAT in DPDK, follow the instructions for modifying the compile-time\n+QAT PMD is enabled by default in DPDK, but depends on libcrypto. If this library is detected\n+the driver will be enabled and compiled.\n+\n+To setup QAT in DPDK, follow the instructions for modifying the compile-time\n configuration file as described `here <http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html>`_.\n \n Quick instructions are as follows:\n@@ -80,9 +83,11 @@ Quick instructions are as follows:\n \n \tcd to the top-level DPDK directory\n \tmake config T=x86_64-native-linuxapp-gcc\n-\tsed -i 's,\\(CONFIG_RTE_LIBRTE_PMD_QAT\\)=n,\\1=y,' build/.config\n \tmake\n \n+.. Note::\n+ To libcrypto detection - pkg_config is needed and should be installed in the system.\n+\n To use the DPDK QAT PMD an SRIOV-enabled QAT kernel driver is required. The VF\n devices exposed by this driver will be used by the QAT PMD. The devices and\n available kernel drivers and device ids are :\ndiff --git a/drivers/crypto/qat/Makefile b/drivers/crypto/qat/Makefile\nindex 64f39fd..77700b4 100644\n--- a/drivers/crypto/qat/Makefile\n+++ b/drivers/crypto/qat/Makefile\n@@ -3,6 +3,9 @@\n \n include $(RTE_SDK)/mk/rte.vars.mk\n \n+# libcrypto detection\n+LIBCRYPTO := $(shell pkg-config --exists libcrypto 1>&2 2> /dev/null; echo $$?)\n+\n # library name\n LIB = librte_pmd_qat.a\n \n@@ -15,19 +18,24 @@ CFLAGS += -O3\n \n # external library include paths\n CFLAGS += -I$(SRCDIR)/qat_adf\n-LDLIBS += -lcrypto\n-LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n-LDLIBS += -lrte_cryptodev\n-LDLIBS += -lrte_pci -lrte_bus_pci\n \n-# library source files\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_device.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_qp.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym_session.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_common.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_logs.c\n-SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_sym_pmd.c\n+# library common source files\n+SRCS-y += qat_device.c\n+SRCS-y += qat_common.c\n+SRCS-y += qat_logs.c\n+SRCS-y += qat_qp.c\n+\n+ifeq ($(LIBCRYPTO),0)\n+\tLDLIBS += -lrte_cryptodev\n+\tLDLIBS += -lcrypto\n+\tCFLAGS += -DCONFIG_LIBCRYPTO_QAT\n+\tSRCS-y += qat_sym.c\n+\tSRCS-y += qat_sym_session.c\n+\tSRCS-y += qat_sym_pmd.c\n+endif\n+\n+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool\n+LDLIBS += -lrte_pci -lrte_bus_pci\n \n # export include files\n SYMLINK-y-include +=\ndiff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build\nindex 6d01dac..c96486a 100644\n--- a/drivers/crypto/qat/meson.build\n+++ b/drivers/crypto/qat/meson.build\n@@ -2,15 +2,18 @@\n # Copyright(c) 2017-2018 Intel Corporation\n \n dep = dependency('libcrypto', required: false)\n-if not dep.found()\n-\tbuild = false\n-endif\n+\n sources = files('qat_common.c',\n \t\t'qat_qp.c',\n \t\t'qat_device.c',\n-\t\t'qat_logs.c',\n-\t\t'qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c')\n+\t\t'qat_logs.c')\n+\n+if dep.found()\n+\tsources += files('qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c')\n+\tpkgconfig_extra_libs += '-lcrypto'\n+\tcflags += '-DCONFIG_LIBCRYPTO_QAT'\n+endif\n+\n includes += include_directories('qat_adf')\n deps += ['bus_pci']\n ext_deps += dep\n-pkgconfig_extra_libs += '-lcrypto'\ndiff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h\nindex f9e72a6..3c8ec5b 100644\n--- a/drivers/crypto/qat/qat_sym.h\n+++ b/drivers/crypto/qat/qat_sym.h\n@@ -7,6 +7,8 @@\n \n #include <rte_cryptodev_pmd.h>\n \n+#ifdef CONFIG_LIBCRYPTO_QAT\n+\n #include <openssl/evp.h>\n \n #include \"qat_common.h\"\n@@ -153,4 +155,11 @@ qat_sym_process_response(void **op, uint8_t *resp)\n \t}\n \t*op = (void *)rx_op;\n }\n+#else\n+\n+static inline void\n+qat_sym_process_response(void **op __rte_unused, uint8_t *resp __rte_unused)\n+{\n+}\n+#endif\n #endif /* _QAT_SYM_H_ */\ndiff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h\nindex 80a1987..641cc4b 100644\n--- a/drivers/crypto/qat/qat_sym_pmd.h\n+++ b/drivers/crypto/qat/qat_sym_pmd.h\n@@ -5,6 +5,9 @@\n #ifndef _QAT_SYM_PMD_H_\n #define _QAT_SYM_PMD_H_\n \n+#ifdef CONFIG_LIBCRYPTO_QAT\n+\n+\n #include <rte_cryptodev.h>\n \n #include \"qat_sym_capabilities.h\"\n@@ -37,4 +40,6 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev);\n \n int\n qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev);\n+\n+#endif\n #endif /* _QAT_SYM_PMD_H_ */\n", "prefixes": [ "v2", "2/3" ] }{ "id": 41121, "url": "