get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27934,
    "url": "http://patches.dpdk.org/api/patches/27934/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/059bb008a0c0b2ae3d7dc006ebccc808e9212959.1503651392.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": "<059bb008a0c0b2ae3d7dc006ebccc808e9212959.1503651392.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/059bb008a0c0b2ae3d7dc006ebccc808e9212959.1503651392.git.gaetan.rivet@6wind.com",
    "date": "2017-08-25T09:04:35",
    "name": "[dpdk-dev,13/13] cryptodev: move PCI specific helpers to drivers/crypto",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "31b3e9f015055dab73857a2a8912f837a7493a45",
    "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/059bb008a0c0b2ae3d7dc006ebccc808e9212959.1503651392.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/27934/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/27934/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 2230F912B;\n\tFri, 25 Aug 2017 11:05:17 +0200 (CEST)",
            "from mail-wm0-f50.google.com (mail-wm0-f50.google.com\n\t[74.125.82.50]) by dpdk.org (Postfix) with ESMTP id CF1EE90F4\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 11:05:06 +0200 (CEST)",
            "by mail-wm0-f50.google.com with SMTP id z132so6938415wmg.1\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 02:05:06 -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\tq141sm782350wmb.11.2017.08.25.02.05.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 25 Aug 2017 02:05:04 -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=TGiGPHrgd0f5ET+mVaBge0ZFnn6Ew1OAwoKXRSskBeY=;\n\tb=kGMLsnCu7nxt2iM3yvwyRA4+DGwmnX6Sb6cZioiaKqPy8PBfADg0RXXni2WPX2axRx\n\tYRCJNgJbJHLV4Q1Fa1ohvGgp3mS8B8/utuc7T0X1wimtWePD3OmAVpKtw7fH/XF+8SNT\n\tpICDdsmhS+Itu1IWjqHYYuGSXT/Bx8lPWP6ZoY8NLQxjDl22nZ9Rn/G5Y/YeR0j58cT2\n\tHir/0rgCCrpNwi4ay4LMtUU3952M+0omLczngG0mNUeY2dI95myZZ4XByJgfS5SLw/+7\n\tpJCRp7Pfw4x5itriYlk/qrv+qv0t+Sx2aRNwNDvrA+KEcUiwAhVAnf/J3R3I9iMczeS7\n\tx4SA==",
        "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=TGiGPHrgd0f5ET+mVaBge0ZFnn6Ew1OAwoKXRSskBeY=;\n\tb=e473gpJWEgA/LzGScqLvus7w8aYrkGERubPRnPEaqG1g34XsQP67ey9UVEcYy1mLl7\n\t/+EXteRcfKZq+wvllh8M/yhxEuSPAAwaMjqT4Nm/YbOtR0eYU68rI4vb+Q323r9XbYAC\n\tM8grlUPsTLulJMSrYwOOmCT4NkobMXuTkVRfffkArinv9HC2FP0J5M5m/IzS3Eqn21E0\n\tksSBKMHpjswAp6SB75YxSWCMUDYYhlStO1os0JOuyNnHC6DIaJ4GEaF7C4SzdFFsEU/J\n\t8Wf2yTy7scLMH7sPNJMfi+vB4/QkaKx377zbpqjVa6fpGFOvzvcbijkKgCrNpIChgGGl\n\tFMww==",
        "X-Gm-Message-State": "AHYfb5h/4OEmlQS2LqSpJDk0MfLmn1sIHMMyTbbfn0MMlEbMXZia0TgU\n\tSQcUoIrYasMbKIIvqN8=",
        "X-Received": "by 10.28.229.196 with SMTP id c187mr918432wmh.183.1503651905770; \n\tFri, 25 Aug 2017 02:05:05 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Fri, 25 Aug 2017 11:04:35 +0200",
        "Message-Id": "<059bb008a0c0b2ae3d7dc006ebccc808e9212959.1503651392.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": [
            "<cover.1503651392.git.gaetan.rivet@6wind.com>",
            "<cover.1503651392.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1503651392.git.gaetan.rivet@6wind.com>",
            "<cover.1503651392.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 13/13] 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/Makefile                                 |   2 +-\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 10 files changed, 285 insertions(+), 191 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/Makefile b/drivers/Makefile\nindex 7fef66d..a5d3fa0 100644\n--- a/drivers/Makefile\n+++ b/drivers/Makefile\n@@ -37,7 +37,7 @@ DEPDIRS-mempool := bus\n DIRS-y += net\n DEPDIRS-net := bus mempool\n DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto\n-DEPDIRS-crypto := mempool\n+DEPDIRS-crypto := bus mempool\n DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event\n DEPDIRS-event := bus\n \ndiff --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",
        "13/13"
    ]
}