Show a patch.

Update a patch.

Update a patch.

GET /api/patches/41064/
Content-Type: application/json
Vary: Accept

    "id": 41064,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "{}",
        "commit_url_format": ""
    "msgid": "<>",
    "list_archive_url": "",
    "date": "2018-06-13T12:14:15",
    "name": "[v3,31/38] crypto/qat: register appropriately named device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7d347e6d50b25374e9c78c3e0c02243709c267db",
    "submitter": {
        "id": 949,
        "url": "",
        "name": "Tomasz Jozwiak",
        "email": ""
    "delegate": {
        "id": 22,
        "url": "",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": ""
    "mbox": "",
    "series": [
            "id": 111,
            "url": "",
            "web_url": "",
            "date": "2018-06-13T12:13:44",
            "name": "crypto/qat: refactor to support multiple services",
            "version": 3,
            "mbox": ""
    "comments": "",
    "check": "success",
    "checks": "",
    "tags": {},
    "related": [],
    "headers": {
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH v3 31/38] crypto/qat: register appropriately\n\tnamed device",
        "List-Post": "<>",
        "X-Mailer": "git-send-email 2.7.4",
        "X-Original-To": "",
        "Errors-To": "",
        "List-Subscribe": "<>,\n\t<>",
        "From": "Tomasz Jozwiak <>",
        "Return-Path": "<>",
        "X-BeenThere": "",
        "List-Archive": "<>",
        "Date": "Wed, 13 Jun 2018 14:14:15 +0200",
        "Precedence": "list",
        "In-Reply-To": "<>",
        "Message-Id": "<>",
        "X-Mailman-Version": "2.1.15",
        "References": "<>\n\t<>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "Delivered-To": "",
        "List-Id": "DPDK patches and discussions <>",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id 69FA71F015;\n\tWed, 13 Jun 2018 14:15:53 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id 2801E1EF5E\n\tfor <>; Wed, 13 Jun 2018 14:15:08 +0200 (CEST)",
            "from ([])\n\tby with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jun 2018 05:15:07 -0700",
            "from (HELO localhost.localdomain)\n\t([])\n\tby with ESMTP; 13 Jun 2018 05:15:06 -0700"
        "List-Unsubscribe": "<>,\n\t<>",
        "Sender": "\"dev\" <>",
        "X-ExtLoop1": "1",
        "List-Help": "<>",
        "To": ",\n\,\n\",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,218,1526367600\"; d=\"scan'208\";a=\"63727837\""
    "content": "From: Fiona Trahe <>\n\nFor every QAT PCI device probed, populate a local rte_device\ncontaining an rte_driver. The rte_driver was created in a previous\npatch to provide a crypto-specific driver name: \"crypto_qat\".\nThis was previously only used for driver registration, now it's also\nused in device creation.\nThis allows applications to find devices driven by \"crypto_qat\".\n\nSigned-off-by: Fiona Trahe <>\n---\n drivers/crypto/qat/qat_device.h  |  5 +++++\n drivers/crypto/qat/qat_sym_pmd.c | 38 ++++++++++++++++++++------------\n 2 files changed, 29 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/crypto/qat/qat_device.h b/drivers/crypto/qat/qat_device.h\nindex 4201a1c71..3df6520c3 100644\n--- a/drivers/crypto/qat/qat_device.h\n+++ b/drivers/crypto/qat/qat_device.h\n@@ -50,6 +50,11 @@ struct qat_pci_device {\n \t/* Data relating to symmetric crypto service */\n \tstruct qat_sym_dev_private *sym_dev;\n \t/**< link back to cryptodev private data */\n+\tstruct rte_device sym_rte_dev;\n+\t/**< This represents the crypto subset of this pci device.\n+\t * Register with this rather than with the one in\n+\t * pci_dev so that its driver can have a crypto-specific name\n+\t */\n \n \t/* Data relating to compression service */\n \ndiff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c\nindex e6760b8f8..28e579b77 100644\n--- a/drivers/crypto/qat/qat_sym_pmd.c\n+++ b/drivers/crypto/qat/qat_sym_pmd.c\n@@ -232,6 +232,18 @@ qat_sym_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,\n \treturn qat_dequeue_op_burst(qp, (void **)ops, nb_ops);\n }\n \n+/* An rte_driver is needed in the registration of both the device and the driver\n+ * with cryptodev.\n+ * The actual qat pci's rte_driver can't be used as its name represents\n+ * the whole pci device with all services. Think of this as a holder for a name\n+ * for the crypto part of the pci device.\n+ */\n+static const char qat_sym_drv_name[] = RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);\n+static const struct rte_driver cryptodev_qat_sym_driver = {\n+\ = qat_sym_drv_name,\n+\t.alias = qat_sym_drv_name\n+};\n+\n int\n qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)\n {\n@@ -249,12 +261,19 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)\n \t\t\tqat_pci_dev->name, \"sym\");\n \tPMD_DRV_LOG(DEBUG, \"Creating QAT SYM device %s\", name);\n \n+\t/* Populate subset device to use in cryptodev device creation */\n+\tqat_pci_dev->sym_rte_dev.driver = &cryptodev_qat_sym_driver;\n+\tqat_pci_dev->sym_rte_dev.numa_node =\n+\t\t\t\tqat_pci_dev->pci_dev->device.numa_node;\n+\tqat_pci_dev->sym_rte_dev.devargs = NULL;\n+\n \tcryptodev = rte_cryptodev_pmd_create(name,\n-\t\t\t&qat_pci_dev->pci_dev->device, &init_params);\n+\t\t\t&(qat_pci_dev->sym_rte_dev), &init_params);\n \n \tif (cryptodev == NULL)\n \t\treturn -ENODEV;\n \n+\tqat_pci_dev-> = cryptodev->data->name;\n \tcryptodev->driver_id = cryptodev_qat_driver_id;\n \tcryptodev->dev_ops = &crypto_qat_ops;\n \n@@ -287,7 +306,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)\n \t}\n \n \tPMD_DRV_LOG(DEBUG, \"Created QAT SYM device %s as cryptodev instance %d\",\n-\t\t\tname, internals->sym_dev_id);\n+\t\t\tcryptodev->data->name, internals->sym_dev_id);\n \treturn 0;\n }\n \n@@ -304,23 +323,14 @@ qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev)\n \t/* free crypto device */\n \tcryptodev = rte_cryptodev_pmd_get_dev(qat_pci_dev->sym_dev->sym_dev_id);\n \trte_cryptodev_pmd_destroy(cryptodev);\n+\tqat_pci_dev-> = NULL;\n \tqat_pci_dev->sym_dev = NULL;\n \n \treturn 0;\n }\n \n \n-/* An rte_driver is needed in the registration of both the device and the driver\n- * with cryptodev.\n- * The actual qat pci's rte_driver can't be used as its name represents\n- * the whole pci device with all services. Think of this as a holder for a name\n- * for the crypto part of the pci device.\n- */\n-static const char qat_sym_drv_name[] = RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);\n-static struct rte_driver cryptodev_qat_sym_driver = {\n-\ = qat_sym_drv_name,\n-\t.alias = qat_sym_drv_name\n-};\n static struct cryptodev_driver qat_crypto_drv;\n-RTE_PMD_REGISTER_CRYPTO_DRIVER(qat_crypto_drv, cryptodev_qat_sym_driver,\n+RTE_PMD_REGISTER_CRYPTO_DRIVER(qat_crypto_drv,\n+\t\tcryptodev_qat_sym_driver,\n \t\tcryptodev_qat_driver_id);\n",
    "prefixes": [