get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30232,
    "url": "http://patches.dpdk.org/api/patches/30232/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/3f7e5ce9fb5a7aae05ae58bfb55dab66fa1bc94b.1507804944.git.gaetan.rivet@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<3f7e5ce9fb5a7aae05ae58bfb55dab66fa1bc94b.1507804944.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/3f7e5ce9fb5a7aae05ae58bfb55dab66fa1bc94b.1507804944.git.gaetan.rivet@6wind.com",
    "date": "2017-10-12T10:45:35",
    "name": "[dpdk-dev,v5,08/20] cryptodev: move PCI specific helpers to drivers/crypto",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dc4af1f84af009a383751ce54c6774f111b2cfe2",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/3f7e5ce9fb5a7aae05ae58bfb55dab66fa1bc94b.1507804944.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30232/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/30232/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 4FC351B259;\n\tThu, 12 Oct 2017 12:46:26 +0200 (CEST)",
            "from mail-wm0-f53.google.com (mail-wm0-f53.google.com\n\t[74.125.82.53]) by dpdk.org (Postfix) with ESMTP id D7C011B222\n\tfor <dev@dpdk.org>; Thu, 12 Oct 2017 12:46:14 +0200 (CEST)",
            "by mail-wm0-f53.google.com with SMTP id u138so12190061wmu.4\n\tfor <dev@dpdk.org>; Thu, 12 Oct 2017 03:46:14 -0700 (PDT)",
            "from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tz192sm16481146wmz.28.2017.10.12.03.46.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 12 Oct 2017 03:46:13 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=Y79vRqUq65fdHVNIkkf1P65wNXoaNuwgj8lwvqaUL2Y=;\n\tb=0ng2ftaGZ+XrWE6JWRw/UKW2EYMLPSsOODWvQRtY5k45Ih6btbBuQmGoMQOQ1/JYRN\n\tfUS+nwsjm6SdvBZ3Lj1H/J7YVNxOPMf3++ysjmpJD+JfCMGZLbUmUhJNk1B5ONlRZY21\n\tM8D+wu9cSJRuI7FbDBgIAVBO4UO52N591x14iuMeOCE1jRVk4YMjLx8tcLik1I/4F2qC\n\tSorCfx23kfrrOVQhwjBx8eiqCCoxwdFKq4wYKtbCoHnhm/kPvtoN3pO/QtC+lHXQhzyM\n\t2WdDlDiZSXiaVDNnsW9zu4JbJLWC6RUA8pSxphxXygwpxMo7TyrGD/19cZzrTcNzlQox\n\to6sg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=Y79vRqUq65fdHVNIkkf1P65wNXoaNuwgj8lwvqaUL2Y=;\n\tb=X0PeAsNHpN8Xt3hjGNjvS/Z5DfHx1CzBhsRcC7n0DU+fhGjeY9ViDQu9TWapPPMisG\n\tHaLgU8JoQ3aaTcNTU2Vg8EJzvUEXsj5oL2NYkBDWQQCUlOc0AfF0IaxGaPMX0OAzzI8V\n\t9pk7PjjdC4Nbp2Q3s/JL59g/6MGmi+BvaGkqhhIw6X1dnN9O8n82EjPbMQkeQxaJy/Xv\n\t8vv4y4iik3/ieM00dqE0EPcKBKDbOdVF8ct5BCEvNVMUxafIeMMCyUsqSdUZXMxCSRrf\n\t2wd73a1Dr0eena7gbfhIVDUJyO0lreIvmvfQ311LfbjQwbifPkZWN21N1VxdpwEEn2M2\n\tstcQ==",
        "X-Gm-Message-State": "AMCzsaWKTV945/2s330YF7r/C42I/tVmomKJ8yjrkwGzMJg6ObbJFh5K\n\t7BppejjLE1HLL/2Cf9KRFXdSnJnL",
        "X-Google-Smtp-Source": "AOwi7QDaQip+op3J2y8F/FOC8A1gwK9IdhRrn855aZDl3A27SMghPtRcjpqYA08jQw+5Ik4XdExKBA==",
        "X-Received": "by 10.28.203.136 with SMTP id b130mr1671416wmg.105.1507805173960;\n\tThu, 12 Oct 2017 03:46:13 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Thu, 12 Oct 2017 12:45:35 +0200",
        "Message-Id": "<3f7e5ce9fb5a7aae05ae58bfb55dab66fa1bc94b.1507804944.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": [
            "<cover.1507804944.git.gaetan.rivet@6wind.com>",
            "<cover.1507804944.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1507795823.git.gaetan.rivet@6wind.com>\n\t<cover.1507804944.git.gaetan.rivet@6wind.com>",
            "<cover.1507804944.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v5 08/20] cryptodev: move PCI specific helpers to\n\tdrivers/crypto",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "Those helpers rely on the PCI bus driver implementation.\nOther similar libraries relied on the bus-specifics being handled in\ninlined functions, to be compiled on demand by drivers, once the proper\nPCI dependency has been settled. This seems unsafe.\n\nMove the PCI-specific helpers out of the lib directory to the\ndrivers/crypto directory, properly following the dependency hierarchy.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n drivers/crypto/Makefile                          |   4 +-\n drivers/crypto/pci/Makefile                      |  52 +++++++++\n drivers/crypto/pci/rte_cryptodev_pci.c           | 128 +++++++++++++++++++++++\n drivers/crypto/pci/rte_cryptodev_pci.h           |  94 +++++++++++++++++\n drivers/crypto/pci/rte_cryptodev_pci_version.map |   7 ++\n lib/librte_cryptodev/Makefile                    |   1 -\n lib/librte_cryptodev/rte_cryptodev_pci.h         |  92 ----------------\n lib/librte_cryptodev/rte_cryptodev_pmd.c         |  94 -----------------\n lib/librte_cryptodev/rte_cryptodev_version.map   |   2 -\n 9 files changed, 284 insertions(+), 190 deletions(-)\n create mode 100644 drivers/crypto/pci/Makefile\n create mode 100644 drivers/crypto/pci/rte_cryptodev_pci.c\n create mode 100644 drivers/crypto/pci/rte_cryptodev_pci.h\n create mode 100644 drivers/crypto/pci/rte_cryptodev_pci_version.map\n delete mode 100644 lib/librte_cryptodev/rte_cryptodev_pci.h",
    "diff": "diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile\nindex 7a719b9..cfd6cb6 100644\n--- a/drivers/crypto/Makefile\n+++ b/drivers/crypto/Makefile\n@@ -33,6 +33,8 @@ include $(RTE_SDK)/mk/rte.vars.mk\n \n core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev\n \n+DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci\n+DEPDIRS-pci = $(core-libs)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm\n DEPDIRS-aesni_gcm = $(core-libs)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb\n@@ -42,7 +44,7 @@ DEPDIRS-armv8 = $(core-libs)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += openssl\n DEPDIRS-openssl = $(core-libs)\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat\n-DEPDIRS-qat = $(core-libs)\n+DEPDIRS-qat = $(core-libs) librte_cryptodev_pci\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += scheduler\n DEPDIRS-scheduler = $(core-libs) librte_kvargs librte_reorder\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g\ndiff --git a/drivers/crypto/pci/Makefile b/drivers/crypto/pci/Makefile\nnew file mode 100644\nindex 0000000..da819f2\n--- /dev/null\n+++ b/drivers/crypto/pci/Makefile\n@@ -0,0 +1,52 @@\n+#   BSD LICENSE\n+#\n+#   Copyright(c) 2017 6WIND S.A. All rights reserved.\n+#\n+#   Redistribution and use in source and binary forms, with or without\n+#   modification, are permitted provided that the following conditions\n+#   are met:\n+#\n+#     * Redistributions of source code must retain the above copyright\n+#       notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above copyright\n+#       notice, this list of conditions and the following disclaimer in\n+#       the documentation and/or other materials provided with the\n+#       distribution.\n+#     * Neither the name of 6WIND S.A. nor the names of its\n+#       contributors may be used to endorse or promote products derived\n+#       from this software without specific prior written permission.\n+#\n+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+#   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+# library name\n+LIB = librte_cryptodev_pci.a\n+\n+# library version\n+LIBABIVER := 1\n+\n+# build flags\n+CFLAGS += -O3\n+CFLAGS += $(WERROR_FLAGS)\n+\n+# library source files\n+SRCS-y += rte_cryptodev_pci.c\n+\n+# export include files\n+SYMLINK-y-include += rte_cryptodev_pci.h\n+\n+# versioning export map\n+EXPORT_MAP := rte_cryptodev_pci_version.map\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/crypto/pci/rte_cryptodev_pci.c b/drivers/crypto/pci/rte_cryptodev_pci.c\nnew file mode 100644\nindex 0000000..a2a1366\n--- /dev/null\n+++ b/drivers/crypto/pci/rte_cryptodev_pci.c\n@@ -0,0 +1,128 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2017 6WIND S.A. All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of the copyright holder nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <rte_malloc.h>\n+\n+#include \"rte_cryptodev_pci.h\"\n+\n+int\n+rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,\n+\t\t\tsize_t private_data_size,\n+\t\t\tcryptodev_pci_init_t dev_init)\n+{\n+\tstruct rte_cryptodev *cryptodev;\n+\n+\tchar cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];\n+\n+\tint retval;\n+\n+\trte_pci_device_name(&pci_dev->addr, cryptodev_name,\n+\t\t\tsizeof(cryptodev_name));\n+\n+\tcryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());\n+\tif (cryptodev == NULL)\n+\t\treturn -ENOMEM;\n+\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\tcryptodev->data->dev_private =\n+\t\t\t\trte_zmalloc_socket(\n+\t\t\t\t\t\t\"cryptodev private structure\",\n+\t\t\t\t\t\tprivate_data_size,\n+\t\t\t\t\t\tRTE_CACHE_LINE_SIZE,\n+\t\t\t\t\t\trte_socket_id());\n+\n+\t\tif (cryptodev->data->dev_private == NULL)\n+\t\t\trte_panic(\"Cannot allocate memzone for private \"\n+\t\t\t\t\t\"device data\");\n+\t}\n+\n+\tcryptodev->device = &pci_dev->device;\n+\n+\t/* init user callbacks */\n+\tTAILQ_INIT(&(cryptodev->link_intr_cbs));\n+\n+\t/* Invoke PMD device initialization function */\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);\n+\tretval = dev_init(cryptodev);\n+\tif (retval == 0)\n+\t\treturn 0;\n+\n+\tCDEV_LOG_ERR(\"driver %s: crypto_dev_init(vendor_id=0x%x device_id=0x%x)\"\n+\t\t\t\" failed\", pci_dev->device.driver->name,\n+\t\t\t(unsigned int) pci_dev->id.vendor_id,\n+\t\t\t(unsigned int) pci_dev->id.device_id);\n+\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\trte_free(cryptodev->data->dev_private);\n+\n+\t/* free crypto device */\n+\trte_cryptodev_pmd_release_device(cryptodev);\n+\n+\treturn -ENXIO;\n+}\n+\n+int\n+rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,\n+\t\tcryptodev_pci_uninit_t dev_uninit)\n+{\n+\tstruct rte_cryptodev *cryptodev;\n+\tchar cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];\n+\tint ret;\n+\n+\tif (pci_dev == NULL)\n+\t\treturn -EINVAL;\n+\n+\trte_pci_device_name(&pci_dev->addr, cryptodev_name,\n+\t\t\tsizeof(cryptodev_name));\n+\n+\tcryptodev = rte_cryptodev_pmd_get_named_dev(cryptodev_name);\n+\tif (cryptodev == NULL)\n+\t\treturn -ENODEV;\n+\n+\t/* Invoke PMD device uninit function */\n+\tif (dev_uninit) {\n+\t\tret = dev_uninit(cryptodev);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\t/* free crypto device */\n+\trte_cryptodev_pmd_release_device(cryptodev);\n+\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\trte_free(cryptodev->data->dev_private);\n+\n+\tcryptodev->device = NULL;\n+\tcryptodev->data = NULL;\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/crypto/pci/rte_cryptodev_pci.h b/drivers/crypto/pci/rte_cryptodev_pci.h\nnew file mode 100644\nindex 0000000..97b6f1e\n--- /dev/null\n+++ b/drivers/crypto/pci/rte_cryptodev_pci.h\n@@ -0,0 +1,94 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of the copyright holder nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _RTE_CRYPTODEV_PCI_H_\n+#define _RTE_CRYPTODEV_PCI_H_\n+\n+#include <rte_pci.h>\n+#include <rte_bus_pci.h>\n+#include <rte_cryptodev.h>\n+#include <rte_cryptodev_pmd.h>\n+\n+/**\n+ * Initialisation function of a crypto driver invoked for each matching\n+ * crypto PCI device detected during the PCI probing phase.\n+ *\n+ * @param\tdev\tThe dev pointer is the address of the *rte_cryptodev*\n+ *\t\t\tstructure associated with the matching device and which\n+ *\t\t\thas been [automatically] allocated in the\n+ *\t\t\t*rte_crypto_devices* array.\n+ *\n+ * @return\n+ *   - 0: Success, the device is properly initialised by the driver.\n+ *        In particular, the driver MUST have set up the *dev_ops* pointer\n+ *        of the *dev* structure.\n+ *   - <0: Error code of the device initialisation failure.\n+ */\n+typedef int (*cryptodev_pci_init_t)(struct rte_cryptodev *dev);\n+\n+/**\n+ * Finalisation function of a driver invoked for each matching\n+ * PCI device detected during the PCI closing phase.\n+ *\n+ * @param\tdev\tThe dev pointer is the address of the *rte_cryptodev*\n+ *\t\t\tstructure associated with the matching device and which\n+ *\t\t\thas been [automatically] allocated in the\n+ *\t\t\t*rte_crypto_devices* array.\n+ *\n+ *  * @return\n+ *   - 0: Success, the device is properly finalised by the driver.\n+ *        In particular, the driver MUST free the *dev_ops* pointer\n+ *        of the *dev* structure.\n+ *   - <0: Error code of the device initialisation failure.\n+ */\n+typedef int (*cryptodev_pci_uninit_t)(struct rte_cryptodev *dev);\n+\n+/**\n+ * @internal\n+ * Wrapper for use by pci drivers as a .probe function to attach to a crypto\n+ * interface.\n+ */\n+int\n+rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,\n+\t\t\tsize_t private_data_size,\n+\t\t\tcryptodev_pci_init_t dev_init);\n+\n+/**\n+ * @internal\n+ * Wrapper for use by pci drivers as a .remove function to detach a crypto\n+ * interface.\n+ */\n+int\n+rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,\n+\t\tcryptodev_pci_uninit_t dev_uninit);\n+\n+#endif /* _RTE_CRYPTODEV_PCI_H_ */\ndiff --git a/drivers/crypto/pci/rte_cryptodev_pci_version.map b/drivers/crypto/pci/rte_cryptodev_pci_version.map\nnew file mode 100644\nindex 0000000..0510fef\n--- /dev/null\n+++ b/drivers/crypto/pci/rte_cryptodev_pci_version.map\n@@ -0,0 +1,7 @@\n+DPDK_17.11 {\n+\tglobal:\n+\n+\trte_cryptodev_pci_generic_probe;\n+\trte_cryptodev_pci_generic_remove;\n+\n+};\ndiff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile\nindex 6ac331b..bd94cf7 100644\n--- a/lib/librte_cryptodev/Makefile\n+++ b/lib/librte_cryptodev/Makefile\n@@ -49,7 +49,6 @@ SYMLINK-y-include += rte_crypto_sym.h\n SYMLINK-y-include += rte_cryptodev.h\n SYMLINK-y-include += rte_cryptodev_pmd.h\n SYMLINK-y-include += rte_cryptodev_vdev.h\n-SYMLINK-y-include += rte_cryptodev_pci.h\n \n # versioning export map\n EXPORT_MAP := rte_cryptodev_version.map\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_pci.h b/lib/librte_cryptodev/rte_cryptodev_pci.h\ndeleted file mode 100644\nindex 67eda96..0000000\n--- a/lib/librte_cryptodev/rte_cryptodev_pci.h\n+++ /dev/null\n@@ -1,92 +0,0 @@\n-/*-\n- *   BSD LICENSE\n- *\n- *   Copyright(c) 2017 Intel Corporation. All rights reserved.\n- *\n- *   Redistribution and use in source and binary forms, with or without\n- *   modification, are permitted provided that the following conditions\n- *   are met:\n- *\n- *     * Redistributions of source code must retain the above copyright\n- *       notice, this list of conditions and the following disclaimer.\n- *     * Redistributions in binary form must reproduce the above copyright\n- *       notice, this list of conditions and the following disclaimer in\n- *       the documentation and/or other materials provided with the\n- *       distribution.\n- *     * Neither the name of the copyright holder nor the names of its\n- *       contributors may be used to endorse or promote products derived\n- *       from this software without specific prior written permission.\n- *\n- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _RTE_CRYPTODEV_PCI_H_\n-#define _RTE_CRYPTODEV_PCI_H_\n-\n-#include <rte_pci.h>\n-#include \"rte_cryptodev.h\"\n-\n-/**\n- * Initialisation function of a crypto driver invoked for each matching\n- * crypto PCI device detected during the PCI probing phase.\n- *\n- * @param\tdev\tThe dev pointer is the address of the *rte_cryptodev*\n- *\t\t\tstructure associated with the matching device and which\n- *\t\t\thas been [automatically] allocated in the\n- *\t\t\t*rte_crypto_devices* array.\n- *\n- * @return\n- *   - 0: Success, the device is properly initialised by the driver.\n- *        In particular, the driver MUST have set up the *dev_ops* pointer\n- *        of the *dev* structure.\n- *   - <0: Error code of the device initialisation failure.\n- */\n-typedef int (*cryptodev_pci_init_t)(struct rte_cryptodev *dev);\n-\n-/**\n- * Finalisation function of a driver invoked for each matching\n- * PCI device detected during the PCI closing phase.\n- *\n- * @param\tdev\tThe dev pointer is the address of the *rte_cryptodev*\n- *\t\t\tstructure associated with the matching device and which\n- *\t\t\thas been [automatically] allocated in the\n- *\t\t\t*rte_crypto_devices* array.\n- *\n- *  * @return\n- *   - 0: Success, the device is properly finalised by the driver.\n- *        In particular, the driver MUST free the *dev_ops* pointer\n- *        of the *dev* structure.\n- *   - <0: Error code of the device initialisation failure.\n- */\n-typedef int (*cryptodev_pci_uninit_t)(struct rte_cryptodev *dev);\n-\n-/**\n- * @internal\n- * Wrapper for use by pci drivers as a .probe function to attach to a crypto\n- * interface.\n- */\n-int\n-rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,\n-\t\t\tsize_t private_data_size,\n-\t\t\tcryptodev_pci_init_t dev_init);\n-\n-/**\n- * @internal\n- * Wrapper for use by pci drivers as a .remove function to detach a crypto\n- * interface.\n- */\n-int\n-rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,\n-\t\tcryptodev_pci_uninit_t dev_uninit);\n-\n-#endif /* _RTE_CRYPTODEV_PCI_H_ */\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c\nindex a57faad..ec5c33b 100644\n--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c\n+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c\n@@ -33,7 +33,6 @@\n #include <rte_malloc.h>\n \n #include \"rte_cryptodev_vdev.h\"\n-#include \"rte_cryptodev_pci.h\"\n #include \"rte_cryptodev_pmd.h\"\n \n /**\n@@ -154,96 +153,3 @@ rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,\n \trte_kvargs_free(kvlist);\n \treturn ret;\n }\n-\n-int\n-rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,\n-\t\t\tsize_t private_data_size,\n-\t\t\tcryptodev_pci_init_t dev_init)\n-{\n-\tstruct rte_cryptodev *cryptodev;\n-\n-\tchar cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];\n-\n-\tint retval;\n-\n-\trte_pci_device_name(&pci_dev->addr, cryptodev_name,\n-\t\t\tsizeof(cryptodev_name));\n-\n-\tcryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());\n-\tif (cryptodev == NULL)\n-\t\treturn -ENOMEM;\n-\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n-\t\tcryptodev->data->dev_private =\n-\t\t\t\trte_zmalloc_socket(\n-\t\t\t\t\t\t\"cryptodev private structure\",\n-\t\t\t\t\t\tprivate_data_size,\n-\t\t\t\t\t\tRTE_CACHE_LINE_SIZE,\n-\t\t\t\t\t\trte_socket_id());\n-\n-\t\tif (cryptodev->data->dev_private == NULL)\n-\t\t\trte_panic(\"Cannot allocate memzone for private \"\n-\t\t\t\t\t\"device data\");\n-\t}\n-\n-\tcryptodev->device = &pci_dev->device;\n-\n-\t/* init user callbacks */\n-\tTAILQ_INIT(&(cryptodev->link_intr_cbs));\n-\n-\t/* Invoke PMD device initialization function */\n-\tRTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);\n-\tretval = dev_init(cryptodev);\n-\tif (retval == 0)\n-\t\treturn 0;\n-\n-\tCDEV_LOG_ERR(\"driver %s: crypto_dev_init(vendor_id=0x%x device_id=0x%x)\"\n-\t\t\t\" failed\", pci_dev->device.driver->name,\n-\t\t\t(unsigned int) pci_dev->id.vendor_id,\n-\t\t\t(unsigned int) pci_dev->id.device_id);\n-\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\trte_free(cryptodev->data->dev_private);\n-\n-\t/* free crypto device */\n-\trte_cryptodev_pmd_release_device(cryptodev);\n-\n-\treturn -ENXIO;\n-}\n-\n-int\n-rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,\n-\t\tcryptodev_pci_uninit_t dev_uninit)\n-{\n-\tstruct rte_cryptodev *cryptodev;\n-\tchar cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];\n-\tint ret;\n-\n-\tif (pci_dev == NULL)\n-\t\treturn -EINVAL;\n-\n-\trte_pci_device_name(&pci_dev->addr, cryptodev_name,\n-\t\t\tsizeof(cryptodev_name));\n-\n-\tcryptodev = rte_cryptodev_pmd_get_named_dev(cryptodev_name);\n-\tif (cryptodev == NULL)\n-\t\treturn -ENODEV;\n-\n-\t/* Invoke PMD device uninit function */\n-\tif (dev_uninit) {\n-\t\tret = dev_uninit(cryptodev);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n-\n-\t/* free crypto device */\n-\trte_cryptodev_pmd_release_device(cryptodev);\n-\n-\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\trte_free(cryptodev->data->dev_private);\n-\n-\tcryptodev->device = NULL;\n-\tcryptodev->data = NULL;\n-\n-\treturn 0;\n-}\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map\nindex e9ba88a..496253d 100644\n--- a/lib/librte_cryptodev/rte_cryptodev_version.map\n+++ b/lib/librte_cryptodev/rte_cryptodev_version.map\n@@ -68,8 +68,6 @@ DPDK_17.08 {\n \trte_cryptodev_get_aead_algo_enum;\n \trte_cryptodev_get_header_session_size;\n \trte_cryptodev_get_private_session_size;\n-\trte_cryptodev_pci_generic_probe;\n-\trte_cryptodev_pci_generic_remove;\n \trte_cryptodev_sym_capability_check_aead;\n \trte_cryptodev_sym_session_init;\n \trte_cryptodev_sym_session_clear;\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "08/20"
    ]
}