get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135442,
    "url": "http://patches.dpdk.org/api/patches/135442/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231221123545.510-13-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": "<20231221123545.510-13-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231221123545.510-13-anoobj@marvell.com",
    "date": "2023-12-21T12:35:33",
    "name": "[12/24] common/cnxk: update opad-ipad gen to handle TLS",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7e6f127ae94ef04de454e66519e2729513fbbdc9",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231221123545.510-13-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 30646,
            "url": "http://patches.dpdk.org/api/series/30646/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30646",
            "date": "2023-12-21T12:35:21",
            "name": "Fixes and improvements in crypto cnxk",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30646/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/135442/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/135442/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C4D8F43750;\n\tThu, 21 Dec 2023 13:37:17 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 715F842EA8;\n\tThu, 21 Dec 2023 13:36:25 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 4076742E95\n for <dev@dpdk.org>; Thu, 21 Dec 2023 13:36:24 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 3BLCVojD019540 for <dev@dpdk.org>; Thu, 21 Dec 2023 04:36:23 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3v4nekg0j2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 21 Dec 2023 04:36:23 -0800 (PST)",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 21 Dec 2023 04:36:21 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 21 Dec 2023 04:36:21 -0800",
            "from BG-LT92004.corp.innovium.com (unknown [10.193.71.152])\n by maili.marvell.com (Postfix) with ESMTP id E38AF3F7073;\n Thu, 21 Dec 2023 04:36:18 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=\n pfpt0220; bh=a/m61A7KcO7M8e6waN3f5dpUCBcE8jJT+cLfAh0RxTc=; b=JsO\n R/U4KalYF80xzvOG4+nxaSVKk8gAOjDzUE51vNtz38ls8HYntTo1b5Vqua4IaIxg\n KdfEse79V6A7Dh6lkr09bgEte4JyBqmGMkuqzahFH7723VtMor3fzpW/bUBVYIzw\n G/MX5GUVi5JyPkYr9S6Qa0Y/pQlvnqXbkE+SIvcorp+gn1mYrtBcupicF4TnY+uS\n af3wFW8S31UoZRjoV3cw1PMj07EtKa1MIVyVkAquXYBmutZXeq1GMNDF+vyGAnX8\n 3f2R/te64MDnJaQ1QxUlD/Y2PbevjT45o9MwgnQSiKhGLliRfgIVC9Qea058ZyHa\n 3XQqG1Vx+zjrDCoNm7w==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Jerin Jacob <jerinj@marvell.com>, Vidya Sagar Velumuri\n <vvelumuri@marvell.com>,\n Tejasree Kondoj <ktejasree@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH 12/24] common/cnxk: update opad-ipad gen to handle TLS",
        "Date": "Thu, 21 Dec 2023 18:05:33 +0530",
        "Message-ID": "<20231221123545.510-13-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231221123545.510-1-anoobj@marvell.com>",
        "References": "<20231221123545.510-1-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "A_OsX-83xDQDC06KK1jzxD1WZpwIrnA0",
        "X-Proofpoint-ORIG-GUID": "A_OsX-83xDQDC06KK1jzxD1WZpwIrnA0",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "For TLS opcodes, ipad is at the offset 64 as compared to the packed\nimplementation for IPsec. Extend the function to handle TLS contexts as\nwell.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n drivers/common/cnxk/cnxk_security.c | 15 ++++++++-------\n drivers/common/cnxk/cnxk_security.h |  3 ++-\n 2 files changed, 10 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c\nindex 81991c4697..bdb04fe142 100644\n--- a/drivers/common/cnxk/cnxk_security.c\n+++ b/drivers/common/cnxk/cnxk_security.c\n@@ -9,7 +9,8 @@\n #include \"roc_api.h\"\n \n void\n-cnxk_sec_opad_ipad_gen(struct rte_crypto_sym_xform *auth_xform, uint8_t *hmac_opad_ipad)\n+cnxk_sec_opad_ipad_gen(struct rte_crypto_sym_xform *auth_xform, uint8_t *hmac_opad_ipad,\n+\t\t       bool is_tls)\n {\n \tconst uint8_t *key = auth_xform->auth.key.data;\n \tuint32_t length = auth_xform->auth.key.length;\n@@ -29,11 +30,11 @@ cnxk_sec_opad_ipad_gen(struct rte_crypto_sym_xform *auth_xform, uint8_t *hmac_op\n \tswitch (auth_xform->auth.algo) {\n \tcase RTE_CRYPTO_AUTH_MD5_HMAC:\n \t\troc_hash_md5_gen(opad, (uint32_t *)&hmac_opad_ipad[0]);\n-\t\troc_hash_md5_gen(ipad, (uint32_t *)&hmac_opad_ipad[24]);\n+\t\troc_hash_md5_gen(ipad, (uint32_t *)&hmac_opad_ipad[is_tls ? 64 : 24]);\n \t\tbreak;\n \tcase RTE_CRYPTO_AUTH_SHA1_HMAC:\n \t\troc_hash_sha1_gen(opad, (uint32_t *)&hmac_opad_ipad[0]);\n-\t\troc_hash_sha1_gen(ipad, (uint32_t *)&hmac_opad_ipad[24]);\n+\t\troc_hash_sha1_gen(ipad, (uint32_t *)&hmac_opad_ipad[is_tls ? 64 : 24]);\n \t\tbreak;\n \tcase RTE_CRYPTO_AUTH_SHA256_HMAC:\n \t\troc_hash_sha256_gen(opad, (uint32_t *)&hmac_opad_ipad[0], 256);\n@@ -191,7 +192,7 @@ ot_ipsec_sa_common_param_fill(union roc_ot_ipsec_sa_word2 *w2,\n \t\t\tconst uint8_t *auth_key = auth_xfrm->auth.key.data;\n \t\t\troc_aes_xcbc_key_derive(auth_key, hmac_opad_ipad);\n \t\t} else {\n-\t\t\tcnxk_sec_opad_ipad_gen(auth_xfrm, hmac_opad_ipad);\n+\t\t\tcnxk_sec_opad_ipad_gen(auth_xfrm, hmac_opad_ipad, false);\n \t\t}\n \n \t\ttmp_key = (uint64_t *)hmac_opad_ipad;\n@@ -740,7 +741,7 @@ onf_ipsec_sa_common_param_fill(struct roc_ie_onf_sa_ctl *ctl, uint8_t *salt,\n \t\tkey = cipher_xfrm->cipher.key.data;\n \t\tlength = cipher_xfrm->cipher.key.length;\n \n-\t\tcnxk_sec_opad_ipad_gen(auth_xfrm, hmac_opad_ipad);\n+\t\tcnxk_sec_opad_ipad_gen(auth_xfrm, hmac_opad_ipad, false);\n \t}\n \n \tswitch (length) {\n@@ -1373,7 +1374,7 @@ cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipsec,\n \n \t\t\troc_aes_xcbc_key_derive(auth_key, hmac_opad_ipad);\n \t\t} else if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_NULL) {\n-\t\t\tcnxk_sec_opad_ipad_gen(auth_xform, hmac_opad_ipad);\n+\t\t\tcnxk_sec_opad_ipad_gen(auth_xform, hmac_opad_ipad, false);\n \t\t}\n \t}\n \n@@ -1440,7 +1441,7 @@ cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,\n \n \t\t\troc_aes_xcbc_key_derive(auth_key, hmac_opad_ipad);\n \t\t} else if (auth_xform->auth.algo != RTE_CRYPTO_AUTH_NULL) {\n-\t\t\tcnxk_sec_opad_ipad_gen(auth_xform, hmac_opad_ipad);\n+\t\t\tcnxk_sec_opad_ipad_gen(auth_xform, hmac_opad_ipad, false);\n \t\t}\n \t}\n \ndiff --git a/drivers/common/cnxk/cnxk_security.h b/drivers/common/cnxk/cnxk_security.h\nindex fabf694df4..86ec657cb0 100644\n--- a/drivers/common/cnxk/cnxk_security.h\n+++ b/drivers/common/cnxk/cnxk_security.h\n@@ -70,6 +70,7 @@ int __roc_api cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipse\n \t\t\t\t\t   struct roc_ie_on_outb_sa *out_sa);\n \n __rte_internal\n-void cnxk_sec_opad_ipad_gen(struct rte_crypto_sym_xform *auth_xform, uint8_t *hmac_opad_ipad);\n+void cnxk_sec_opad_ipad_gen(struct rte_crypto_sym_xform *auth_xform, uint8_t *hmac_opad_ipad,\n+\t\t\t    bool is_tls);\n \n #endif /* _CNXK_SECURITY_H__ */\n",
    "prefixes": [
        "12/24"
    ]
}