Show a patch.

GET /api/patches/41035/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 41035,
    "url": "http://patches.dpdk.org/api/patches/41035/",
    "web_url": "http://patches.dpdk.org/patch/41035/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1528892062-4997-3-git-send-email-tomaszx.jozwiak@intel.com>",
    "date": "2018-06-13T12:13:46",
    "name": "[v3,02/38] crypto/qat: add qat device files",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7ff5425ba6c2da2d4910a57bf514a7146fde8b76",
    "submitter": {
        "id": 949,
        "url": "http://patches.dpdk.org/api/people/949/",
        "name": "Tomasz Jozwiak",
        "email": "tomaszx.jozwiak@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/41035/mbox/",
    "series": [
        {
            "id": 111,
            "url": "http://patches.dpdk.org/api/series/111/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=111",
            "date": "2018-06-13T12:13:44",
            "name": "crypto/qat: refactor to support multiple services",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/111/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41035/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41035/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Mailer": "git-send-email 2.7.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EDAD81ECF9;\n\tWed, 13 Jun 2018 14:14:31 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id BE6A21DC24\n\tfor <dev@dpdk.org>; Wed, 13 Jun 2018 14:14:28 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jun 2018 05:14:28 -0700",
            "from tjozwiax-mobl.ger.corp.intel.com (HELO localhost.localdomain)\n\t([10.103.104.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 13 Jun 2018 05:14:27 -0700"
        ],
        "References": "<1523040732-3290-1-git-send-email-fiona.trahe@intel.com>\n\t<1528892062-4997-1-git-send-email-tomaszx.jozwiak@intel.com>",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1528892062-4997-3-git-send-email-tomaszx.jozwiak@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,218,1526367600\"; d=\"scan'208\";a=\"63727639\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Tomasz Jozwiak <tomaszx.jozwiak@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": "<1528892062-4997-1-git-send-email-tomaszx.jozwiak@intel.com>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "fiona.trahe@intel.com,\n\ttomaszx.jozwiak@intel.com,\n\tdev@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Wed, 13 Jun 2018 14:13:46 +0200",
        "X-Amp-File-Uploaded": "False",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v3 02/38] crypto/qat: add qat device files"
    },
    "content": "From: Fiona Trahe <fiona.trahe@intel.com>\n\nThis commit adds new qat_device file.\nFollowing objects were moved:\n\nqat_crypto.h => qat_device.h\n- struct qat_pmd_private\n- uint8_t cryptodev_qat_driver_id\n- int qat_crypto_sym_qp_release (EXTERN)\n- int qat_dev_config()\n- int qat_dev_start()\n- void qat_dev_stop()\n- int qat_dev_close()\n- void qat_dev_info_get()\nqat_crypto.c => qat_device.c\n- int qat_dev_config()\n- int qat_dev_start()\n- void qat_dev_stop()\n- int qat_dev_close()\n- void qat_dev_info_get()\n\nSigned-off-by: ArkadiuszX Kusztal <arkadiuszx.kusztal@intel.com>\nSigned-off-by: Fiona Trahe <fiona.trahe@intel.com>\n---\n drivers/crypto/qat/Makefile     |  1 +\n drivers/crypto/qat/meson.build  |  3 +-\n drivers/crypto/qat/qat_crypto.c | 51 -----------------------------\n drivers/crypto/qat/qat_crypto.h | 22 +------------\n drivers/crypto/qat/qat_device.c | 57 +++++++++++++++++++++++++++++++++\n drivers/crypto/qat/qat_device.h | 36 +++++++++++++++++++++\n 6 files changed, 97 insertions(+), 73 deletions(-)\n create mode 100644 drivers/crypto/qat/qat_device.c\n create mode 100644 drivers/crypto/qat/qat_device.h",
    "diff": "diff --git a/drivers/crypto/qat/Makefile b/drivers/crypto/qat/Makefile\nindex 07266a5e9..6bdd11679 100644\n--- a/drivers/crypto/qat/Makefile\n+++ b/drivers/crypto/qat/Makefile\n@@ -22,6 +22,7 @@ LDLIBS += -lrte_pci -lrte_bus_pci\n \n # library source files\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_crypto.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_adf/qat_algs_build_desc.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += rte_qat_cryptodev.c\ndiff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build\nindex 006cd6557..51630e31b 100644\n--- a/drivers/crypto/qat/meson.build\n+++ b/drivers/crypto/qat/meson.build\n@@ -7,7 +7,8 @@ if not dep.found()\n endif\n sources = files('qat_crypto.c', 'qat_qp.c',\n \t\t'qat_adf/qat_algs_build_desc.c',\n-\t\t'rte_qat_cryptodev.c')\n+\t\t'rte_qat_cryptodev.c',\n+\t\t'qat_device.c')\n includes += include_directories('qat_adf')\n deps += ['bus_pci']\n ext_deps += dep\ndiff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c\nindex d9ce2a136..928a50475 100644\n--- a/drivers/crypto/qat/qat_crypto.c\n+++ b/drivers/crypto/qat/qat_crypto.c\n@@ -1609,57 +1609,6 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)\n \treturn data - mult;\n }\n \n-int qat_dev_config(__rte_unused struct rte_cryptodev *dev,\n-\t\t__rte_unused struct rte_cryptodev_config *config)\n-{\n-\tPMD_INIT_FUNC_TRACE();\n-\treturn 0;\n-}\n-\n-int qat_dev_start(__rte_unused struct rte_cryptodev *dev)\n-{\n-\tPMD_INIT_FUNC_TRACE();\n-\treturn 0;\n-}\n-\n-void qat_dev_stop(__rte_unused struct rte_cryptodev *dev)\n-{\n-\tPMD_INIT_FUNC_TRACE();\n-}\n-\n-int qat_dev_close(struct rte_cryptodev *dev)\n-{\n-\tint i, ret;\n-\n-\tPMD_INIT_FUNC_TRACE();\n-\n-\tfor (i = 0; i < dev->data->nb_queue_pairs; i++) {\n-\t\tret = qat_crypto_sym_qp_release(dev, i);\n-\t\tif (ret < 0)\n-\t\t\treturn ret;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-void qat_dev_info_get(struct rte_cryptodev *dev,\n-\t\t\tstruct rte_cryptodev_info *info)\n-{\n-\tstruct qat_pmd_private *internals = dev->data->dev_private;\n-\n-\tPMD_INIT_FUNC_TRACE();\n-\tif (info != NULL) {\n-\t\tinfo->max_nb_queue_pairs =\n-\t\t\t\tADF_NUM_SYM_QPS_PER_BUNDLE *\n-\t\t\t\tADF_NUM_BUNDLES_PER_DEV;\n-\t\tinfo->feature_flags = dev->feature_flags;\n-\t\tinfo->capabilities = internals->qat_dev_capabilities;\n-\t\tinfo->sym.max_nb_sessions = internals->max_nb_sessions;\n-\t\tinfo->driver_id = cryptodev_qat_driver_id;\n-\t\tinfo->pci_dev = RTE_DEV_TO_PCI(dev->device);\n-\t}\n-}\n-\n void qat_crypto_sym_stats_get(struct rte_cryptodev *dev,\n \t\tstruct rte_cryptodev_stats *stats)\n {\ndiff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h\nindex 5190d25e5..46f03ccde 100644\n--- a/drivers/crypto/qat/qat_crypto.h\n+++ b/drivers/crypto/qat/qat_crypto.h\n@@ -9,6 +9,7 @@\n #include <rte_memzone.h>\n \n #include \"qat_common.h\"\n+#include \"qat_device.h\"\n #include \"qat_crypto_capabilities.h\"\n \n /*\n@@ -64,27 +65,6 @@ struct qat_qp {\n \tenum qat_device_gen qat_dev_gen;\n } __rte_cache_aligned;\n \n-/** private data structure for each QAT device */\n-struct qat_pmd_private {\n-\tunsigned max_nb_queue_pairs;\n-\t/**< Max number of queue pairs supported by device */\n-\tunsigned max_nb_sessions;\n-\t/**< Max number of sessions supported by device */\n-\tenum qat_device_gen qat_dev_gen;\n-\t/**< QAT device generation */\n-\tconst struct rte_cryptodev_capabilities *qat_dev_capabilities;\n-};\n-\n-extern uint8_t cryptodev_qat_driver_id;\n-\n-int qat_dev_config(struct rte_cryptodev *dev,\n-\t\tstruct rte_cryptodev_config *config);\n-int qat_dev_start(struct rte_cryptodev *dev);\n-void qat_dev_stop(struct rte_cryptodev *dev);\n-int qat_dev_close(struct rte_cryptodev *dev);\n-void qat_dev_info_get(struct rte_cryptodev *dev,\n-\tstruct rte_cryptodev_info *info);\n-\n void qat_crypto_sym_stats_get(struct rte_cryptodev *dev,\n \tstruct rte_cryptodev_stats *stats);\n void qat_crypto_sym_stats_reset(struct rte_cryptodev *dev);\ndiff --git a/drivers/crypto/qat/qat_device.c b/drivers/crypto/qat/qat_device.c\nnew file mode 100644\nindex 000000000..c2bf9b7a7\n--- /dev/null\n+++ b/drivers/crypto/qat/qat_device.c\n@@ -0,0 +1,57 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#include \"qat_device.h\"\n+#include \"adf_transport_access_macros.h\"\n+\n+int qat_dev_config(__rte_unused struct rte_cryptodev *dev,\n+\t\t__rte_unused struct rte_cryptodev_config *config)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+\treturn 0;\n+}\n+\n+int qat_dev_start(__rte_unused struct rte_cryptodev *dev)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+\treturn 0;\n+}\n+\n+void qat_dev_stop(__rte_unused struct rte_cryptodev *dev)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+}\n+\n+int qat_dev_close(struct rte_cryptodev *dev)\n+{\n+\tint i, ret;\n+\n+\tPMD_INIT_FUNC_TRACE();\n+\n+\tfor (i = 0; i < dev->data->nb_queue_pairs; i++) {\n+\t\tret = qat_crypto_sym_qp_release(dev, i);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+void qat_dev_info_get(struct rte_cryptodev *dev,\n+\t\t\tstruct rte_cryptodev_info *info)\n+{\n+\tstruct qat_pmd_private *internals = dev->data->dev_private;\n+\n+\tPMD_INIT_FUNC_TRACE();\n+\tif (info != NULL) {\n+\t\tinfo->max_nb_queue_pairs =\n+\t\t\t\tADF_NUM_SYM_QPS_PER_BUNDLE *\n+\t\t\t\tADF_NUM_BUNDLES_PER_DEV;\n+\t\tinfo->feature_flags = dev->feature_flags;\n+\t\tinfo->capabilities = internals->qat_dev_capabilities;\n+\t\tinfo->sym.max_nb_sessions = internals->max_nb_sessions;\n+\t\tinfo->driver_id = cryptodev_qat_driver_id;\n+\t\tinfo->pci_dev = RTE_DEV_TO_PCI(dev->device);\n+\t}\n+}\ndiff --git a/drivers/crypto/qat/qat_device.h b/drivers/crypto/qat/qat_device.h\nnew file mode 100644\nindex 000000000..5c48fdb93\n--- /dev/null\n+++ b/drivers/crypto/qat/qat_device.h\n@@ -0,0 +1,36 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+#ifndef _QAT_DEVICE_H_\n+#define _QAT_DEVICE_H_\n+\n+#include <rte_cryptodev_pmd.h>\n+#include <rte_bus_pci.h>\n+#include \"qat_common.h\"\n+#include \"qat_logs.h\"\n+\n+extern uint8_t cryptodev_qat_driver_id;\n+\n+extern int qat_crypto_sym_qp_release(struct rte_cryptodev *dev,\n+\tuint16_t queue_pair_id);\n+\n+/** private data structure for each QAT device */\n+struct qat_pmd_private {\n+\tunsigned int max_nb_queue_pairs;\n+\t/**< Max number of queue pairs supported by device */\n+\tunsigned int max_nb_sessions;\n+\t/**< Max number of sessions supported by device */\n+\tenum qat_device_gen qat_dev_gen;\n+\t/**< QAT device generation */\n+\tconst struct rte_cryptodev_capabilities *qat_dev_capabilities;\n+};\n+\n+int qat_dev_config(struct rte_cryptodev *dev,\n+\t\tstruct rte_cryptodev_config *config);\n+int qat_dev_start(struct rte_cryptodev *dev);\n+void qat_dev_stop(struct rte_cryptodev *dev);\n+int qat_dev_close(struct rte_cryptodev *dev);\n+void qat_dev_info_get(struct rte_cryptodev *dev,\n+\tstruct rte_cryptodev_info *info);\n+\n+#endif /* _QAT_DEVICE_H_ */\n",
    "prefixes": [
        "v3",
        "02/38"
    ]
}