get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65585,
    "url": "http://patches.dpdk.org/api/patches/65585/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580908578-3384-5-git-send-email-anoobj@marvell.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": "<1580908578-3384-5-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1580908578-3384-5-git-send-email-anoobj@marvell.com",
    "date": "2020-02-05T13:16:16",
    "name": "[4/6] common/cpt: fix error path when cipher and auth key are not set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0890d7c2908410bfaf11d31cc7e92227aff60a4c",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1580908578-3384-5-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 8429,
            "url": "http://patches.dpdk.org/api/series/8429/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8429",
            "date": "2020-02-05T13:16:12",
            "name": "code improvements for OCTEON TX crypto PMDs",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8429/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65585/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65585/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 11633A04FA;\n\tWed,  5 Feb 2020 14:17:19 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C56DD1C1E1;\n\tWed,  5 Feb 2020 14:16:54 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1C09D1C1D3\n for <dev@dpdk.org>; Wed,  5 Feb 2020 14:16:52 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 015DFMiV004806; Wed, 5 Feb 2020 05:16:52 -0800",
            "from sc-exch01.marvell.com ([199.233.58.181])\n by mx0a-0016f401.pphosted.com with ESMTP id 2xyhmtauvf-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 05 Feb 2020 05:16:52 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 5 Feb 2020 05:16:51 -0800",
            "from SC-EXCH02.marvell.com (10.93.176.82) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 5 Feb 2020 05:16:50 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Wed, 5 Feb 2020 05:16:50 -0800",
            "from ajoseph83.caveonetworks.com (unknown [10.29.45.60])\n by maili.marvell.com (Postfix) with ESMTP id 9E48E3F72F8;\n Wed,  5 Feb 2020 05:16:48 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=pE3/0+gfh+sfm3ftWPbWkfVnW1LD1ZNS4c9dgzrsSN8=;\n b=CNkWe5RReWysthNIX3Eshm7QlQuMuYGvHTBpNSV+jNNpwXotz4Jmp07PwuKs7lpRpfKO\n cBip5N9X6fRtmrihQ37ncmIrqnUrN8Frx8XTM3wWYjNPWHXPFm3WW3dUPEU4pTD5rrv7\n +aEjAwumN5t7fIgDLd8bkZCKLgObO/1PMIAfFX3izx5qQ1VJVjBjCZxfCEsNrYORqBW4\n pS2HF1fE/a978Eh98z9kZL1f83wb/RaSFKSxXpReNDCKCtRYUfR4clHZwrvCpbv4Aron\n oALK9aMQHhouXbuSHIQ+KIuEpKL4QwsvZ4SMOqJZRl9NLUY+tgCuNO/ujEHF15JEB+Nb +Q==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>",
        "CC": "Archana Muniganti <marchana@marvell.com>, <dev@dpdk.org>, Anoob Joseph\n <anoobj@marvell.com>",
        "Date": "Wed, 5 Feb 2020 18:46:16 +0530",
        "Message-ID": "<1580908578-3384-5-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1580908578-3384-1-git-send-email-anoobj@marvell.com>",
        "References": "<1580908578-3384-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-02-05_04:2020-02-04,\n 2020-02-05 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 4/6] common/cpt: fix error path when cipher and\n\tauth key are not set",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Archana Muniganti <marchana@marvell.com>\n\nReturning error when cipher and auth key are not getting set\n\nFixes: 6cc54096520d (\"crypto/octeontx: add supported sessions\")\n\nSigned-off-by: Archana Muniganti <marchana@marvell.com>\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n drivers/common/cpt/cpt_ucode.h | 32 +++++++++++++++++++++-----------\n 1 file changed, 21 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h\nindex 4ef87c2..081249c 100644\n--- a/drivers/common/cpt/cpt_ucode.h\n+++ b/drivers/common/cpt/cpt_ucode.h\n@@ -298,7 +298,7 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key,\n \t\tcpt_fc_ciph_set_key_kasumi_f8_cbc(cpt_ctx, key, key_len);\n \t\tgoto success;\n \tdefault:\n-\t\tbreak;\n+\t\treturn -1;\n \t}\n \n \t/* Only for FC_GEN case */\n@@ -2616,10 +2616,13 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,\n \tsess->iv_length = aead_form->iv.length;\n \tsess->aad_length = aead_form->aad_length;\n \n-\tcpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,\n-\t\t\taead_form->key.length, NULL);\n+\tif (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,\n+\t\t\taead_form->key.length, NULL)))\n+\t\treturn -1;\n \n-\tcpt_fc_auth_set_key(ctx, auth_type, NULL, 0, aead_form->digest_length);\n+\tif (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,\n+\t\t\taead_form->digest_length)))\n+\t\treturn -1;\n \n \treturn 0;\n }\n@@ -2719,8 +2722,9 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,\n \tsess->iv_length = c_form->iv.length;\n \tsess->is_null = is_null;\n \n-\tcpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type, c_form->key.data,\n-\t\t\t    c_form->key.length, NULL);\n+\tif (unlikely(cpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type,\n+\t\t\tc_form->key.data, c_form->key.length, NULL)))\n+\t\treturn -1;\n \n \treturn 0;\n }\n@@ -2814,8 +2818,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,\n \t\tsess->auth_iv_offset = a_form->iv.offset;\n \t\tsess->auth_iv_length = a_form->iv.length;\n \t}\n-\tcpt_fc_auth_set_key(SESS_PRIV(sess), auth_type, a_form->key.data,\n-\t\t\t    a_form->key.length, a_form->digest_length);\n+\tif (unlikely(cpt_fc_auth_set_key(SESS_PRIV(sess), auth_type,\n+\t\t\ta_form->key.data, a_form->key.length,\n+\t\t\ta_form->digest_length)))\n+\t\treturn -1;\n \n \treturn 0;\n }\n@@ -2858,9 +2864,13 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,\n \tsess->iv_length = a_form->iv.length;\n \tsess->mac_len = a_form->digest_length;\n \n-\tcpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,\n-\t\t\ta_form->key.length, NULL);\n-\tcpt_fc_auth_set_key(ctx, auth_type, NULL, 0, a_form->digest_length);\n+\tif (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,\n+\t\t\ta_form->key.length, NULL)))\n+\t\treturn -1;\n+\n+\tif (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,\n+\t\t\ta_form->digest_length)))\n+\t\treturn -1;\n \n \treturn 0;\n }\n",
    "prefixes": [
        "4/6"
    ]
}