Show a patch.

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

{
    "id": 41812,
    "url": "http://patches.dpdk.org/api/patches/41812/",
    "web_url": "http://patches.dpdk.org/patch/41812/",
    "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": "<20180628005304.26544-17-pablo.de.lara.guarch@intel.com>",
    "date": "2018-06-28T00:53:04",
    "name": "[v3,16/16] cryptodev: check if symmetric sessions are supported",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ba3e66833450bfee7ae81c1f96b73146481151d1",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/",
        "name": "Pablo de Lara",
        "email": "pablo.de.lara.guarch@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/41812/mbox/",
    "series": [
        {
            "id": 286,
            "url": "http://patches.dpdk.org/api/series/286/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=286",
            "date": "2018-06-28T00:52:48",
            "name": "Cryptodev API changes for 18.08",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/286/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41812/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41812/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.14.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4CE1E1B3AE;\n\tThu, 28 Jun 2018 11:00:14 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 2277D1B1C3\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 10:59:54 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Jun 2018 01:59:54 -0700",
            "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby orsmga002.jf.intel.com with ESMTP; 28 Jun 2018 01:59:44 -0700"
        ],
        "References": "<20180608220234.10170-1-pablo.de.lara.guarch@intel.com>\n\t<20180628005304.26544-1-pablo.de.lara.guarch@intel.com>",
        "X-Amp-File-Uploaded": "False",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<20180628005304.26544-17-pablo.de.lara.guarch@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,282,1526367600\"; d=\"scan'208\";a=\"70667222\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Pablo de Lara <pablo.de.lara.guarch@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": "<20180628005304.26544-1-pablo.de.lara.guarch@intel.com>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "declan.doherty@intel.com, akhil.goyal@nxp.com,\n\tshally.verma@caviumnetworks.com, ravi1.kumar@amd.com,\n\tjerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com,\n\tfiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Thu, 28 Jun 2018 01:53:04 +0100",
        "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions\n\tare supported"
    },
    "content": "Since asymmetric functionality will be implemented soon,\nnot all PMDs must support symmetric sessions.\nTherefore, a check is added if a device does not implement\nthe symmetric functions, meaning that the device does not\nsupport symmetric operations.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n lib/librte_cryptodev/rte_cryptodev.c | 4 ++++\n lib/librte_cryptodev/rte_cryptodev.h | 4 +++-\n 2 files changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c\nindex 7af527075..58fb21056 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.c\n+++ b/lib/librte_cryptodev/rte_cryptodev.c\n@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,\n \n \tindex = dev->driver_id;\n \n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);\n+\n \tif (sess->sess_private_data[index] == NULL) {\n \t\tret = dev->dev_ops->sym_session_configure(dev, xforms,\n \t\t\t\t\t\t\tsess, mp);\n@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,\n \tif (dev == NULL || sess == NULL)\n \t\treturn -EINVAL;\n \n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);\n+\n \tdev->dev_ops->sym_session_clear(dev, sess);\n \n \treturn 0;\ndiff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h\nindex 32a210b00..c1066d01e 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.h\n+++ b/lib/librte_cryptodev/rte_cryptodev.h\n@@ -896,7 +896,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);\n  * @return\n  *  - On success, zero.\n  *  - -EINVAL if input parameters are invalid.\n- *  - -ENOTSUP if crypto device does not support the crypto transform.\n+ *  - -ENOTSUP if crypto device does not support the crypto transform or\n+ *    does not support symmetric operations.\n  *  - -ENOMEM if the private session could not be allocated.\n  */\n int\n@@ -917,6 +918,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,\n  * @return\n  *  - 0 if successful.\n  *  - -EINVAL if device is invalid or session is NULL.\n+ *  - -ENOTSUP if crypto device does not support symmetric operations.\n  */\n int\n rte_cryptodev_sym_session_clear(uint8_t dev_id,\n",
    "prefixes": [
        "v3",
        "16/16"
    ]
}