get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135443,
    "url": "http://patches.dpdk.org/api/patches/135443/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231221123545.510-14-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-14-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231221123545.510-14-anoobj@marvell.com",
    "date": "2023-12-21T12:35:34",
    "name": "[13/24] common/cnxk: add TLS record contexts",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d56817b3d602a5bb036762f193e30641c5c58e18",
    "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-14-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/135443/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/135443/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 2EDAC43750;\n\tThu, 21 Dec 2023 13:37:24 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8EE2142E99;\n\tThu, 21 Dec 2023 13:36:28 +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 3789042EAC\n for <dev@dpdk.org>; Thu, 21 Dec 2023 13:36:27 +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 3BLCVJZF019120 for <dev@dpdk.org>; Thu, 21 Dec 2023 04:36:26 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3v4nekg0j6-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:25 -0800 (PST)",
            "from DC5-EXCH01.marvell.com (10.69.176.38) 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:24 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 21 Dec 2023 04:36:24 -0800",
            "from BG-LT92004.corp.innovium.com (unknown [10.193.71.152])\n by maili.marvell.com (Postfix) with ESMTP id 937E83F7079;\n Thu, 21 Dec 2023 04:36:21 -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=UKXKPDO+soD3v87UrKQCMng1X1fCg9UxOv0GO+tJkLs=; b=Z6K\n 7aPHScTORkKj7Hs0aqpCX2/qQvdHKOk5t3KjuyjT1rwzbtjO0XTTrmObegLDRg7z\n jsOVKoZWK+TmgpdbfP2drRFmJO0BPZeK9wARkuYJPS+vjvvEwRwAYVQ/GN7ntaML\n RRdRNhUvuupDR35GOwy5yLxdSwpS+hQrMoDd/lvZCIX3c990u1kiNG64w1AWRT5a\n mxYcsPDMH5WL+9Vn6OprFptrfPdXXcWI1OlCi4UIT6ao38X0Lb4VlKnr2FQHWOlO\n p0Q3XmJPX3vhV33vOMVp6fdI8i8yYbrN7/+g5ug26a0akg5F0NTF6//kRXD000Zk\n QampRqaoP7TXuuYitRw==",
        "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 13/24] common/cnxk: add TLS record contexts",
        "Date": "Thu, 21 Dec 2023 18:05:34 +0530",
        "Message-ID": "<20231221123545.510-14-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": "jpVOciLjPRxfN5Knvy6w3Qiqn1w5h4pJ",
        "X-Proofpoint-ORIG-GUID": "jpVOciLjPRxfN5Knvy6w3Qiqn1w5h4pJ",
        "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": "Add TLS record read and write contexts.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n drivers/common/cnxk/roc_cpt.h       |   4 +-\n drivers/common/cnxk/roc_ie_ot_tls.h | 199 ++++++++++++++++++++++++++++\n drivers/common/cnxk/roc_se.h        |  11 ++\n 3 files changed, 211 insertions(+), 3 deletions(-)\n create mode 100644 drivers/common/cnxk/roc_ie_ot_tls.h",
    "diff": "diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h\nindex 001e71c55e..5a2b5caeb0 100644\n--- a/drivers/common/cnxk/roc_cpt.h\n+++ b/drivers/common/cnxk/roc_cpt.h\n@@ -55,6 +55,7 @@\n #define ROC_CPT_AES_CBC_IV_LEN\t16\n #define ROC_CPT_SHA1_HMAC_LEN\t12\n #define ROC_CPT_SHA2_HMAC_LEN\t16\n+#define ROC_CPT_DES_IV_LEN\t8\n \n #define ROC_CPT_DES3_KEY_LEN\t    24\n #define ROC_CPT_AES128_KEY_LEN\t    16\n@@ -71,9 +72,6 @@\n #define ROC_CPT_DES_BLOCK_LENGTH 8\n #define ROC_CPT_AES_BLOCK_LENGTH 16\n \n-#define ROC_CPT_AES_GCM_ROUNDUP_BYTE_LEN 4\n-#define ROC_CPT_AES_CBC_ROUNDUP_BYTE_LEN 16\n-\n /* Salt length for AES-CTR/GCM/CCM and AES-GMAC */\n #define ROC_CPT_SALT_LEN 4\n \ndiff --git a/drivers/common/cnxk/roc_ie_ot_tls.h b/drivers/common/cnxk/roc_ie_ot_tls.h\nnew file mode 100644\nindex 0000000000..61955ef4d1\n--- /dev/null\n+++ b/drivers/common/cnxk/roc_ie_ot_tls.h\n@@ -0,0 +1,199 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2023 Marvell.\n+ */\n+\n+#ifndef __ROC_IE_OT_TLS_H__\n+#define __ROC_IE_OT_TLS_H__\n+\n+#include \"roc_platform.h\"\n+\n+#define ROC_IE_OT_TLS_CTX_ILEN\t\t     1\n+#define ROC_IE_OT_TLS_CTX_HDR_SIZE\t     1\n+#define ROC_IE_OT_TLS_AR_WIN_SIZE_MAX\t     4096\n+#define ROC_IE_OT_TLS_LOG_MIN_AR_WIN_SIZE_M1 5\n+\n+/* u64 array size to fit anti replay window bits */\n+#define ROC_IE_OT_TLS_AR_WINBITS_SZ                                                                \\\n+\t(PLT_ALIGN_CEIL(ROC_IE_OT_TLS_AR_WIN_SIZE_MAX, BITS_PER_LONG_LONG) / BITS_PER_LONG_LONG)\n+\n+/* CN10K TLS opcodes */\n+#define ROC_IE_OT_TLS_MAJOR_OP_RECORD_ENC 0x16UL\n+#define ROC_IE_OT_TLS_MAJOR_OP_RECORD_DEC 0x17UL\n+\n+#define ROC_IE_OT_TLS_CTX_MAX_OPAD_IPAD_LEN 128\n+#define ROC_IE_OT_TLS_CTX_MAX_KEY_IV_LEN    48\n+#define ROC_IE_OT_TLS_CTX_MAX_IV_LEN\t    16\n+\n+enum roc_ie_ot_tls_mac_type {\n+\tROC_IE_OT_TLS_MAC_MD5 = 1,\n+\tROC_IE_OT_TLS_MAC_SHA1 = 2,\n+\tROC_IE_OT_TLS_MAC_SHA2_256 = 4,\n+\tROC_IE_OT_TLS_MAC_SHA2_384 = 5,\n+\tROC_IE_OT_TLS_MAC_SHA2_512 = 6,\n+};\n+\n+enum roc_ie_ot_tls_cipher_type {\n+\tROC_IE_OT_TLS_CIPHER_3DES = 1,\n+\tROC_IE_OT_TLS_CIPHER_AES_CBC = 3,\n+\tROC_IE_OT_TLS_CIPHER_AES_GCM = 7,\n+\tROC_IE_OT_TLS_CIPHER_AES_CCM = 10,\n+};\n+\n+enum roc_ie_ot_tls_ver {\n+\tROC_IE_OT_TLS_VERSION_TLS_12 = 1,\n+\tROC_IE_OT_TLS_VERSION_DTLS_12 = 2,\n+};\n+\n+enum roc_ie_ot_tls_aes_key_len {\n+\tROC_IE_OT_TLS_AES_KEY_LEN_128 = 1,\n+\tROC_IE_OT_TLS_AES_KEY_LEN_256 = 3,\n+};\n+\n+enum {\n+\tROC_IE_OT_TLS_IV_SRC_DEFAULT = 0,\n+\tROC_IE_OT_TLS_IV_SRC_FROM_SA = 1,\n+};\n+\n+struct roc_ie_ot_tls_read_ctx_update_reg {\n+\tuint64_t ar_base;\n+\tuint64_t ar_valid_mask;\n+\tuint64_t hard_life;\n+\tuint64_t soft_life;\n+\tuint64_t mib_octs;\n+\tuint64_t mib_pkts;\n+\tuint64_t ar_winbits[ROC_IE_OT_TLS_AR_WINBITS_SZ];\n+};\n+\n+union roc_ie_ot_tls_param2 {\n+\tuint16_t u16;\n+\tstruct {\n+\t\tuint8_t msg_type;\n+\t\tuint8_t rsvd;\n+\t} s;\n+};\n+\n+struct roc_ie_ot_tls_read_sa {\n+\t/* Word0 */\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint64_t ar_win : 3;\n+\t\t\tuint64_t hard_life_dec : 1;\n+\t\t\tuint64_t soft_life_dec : 1;\n+\t\t\tuint64_t count_glb_octets : 1;\n+\t\t\tuint64_t count_glb_pkts : 1;\n+\t\t\tuint64_t count_mib_bytes : 1;\n+\n+\t\t\tuint64_t count_mib_pkts : 1;\n+\t\t\tuint64_t hw_ctx_off : 7;\n+\n+\t\t\tuint64_t ctx_id : 16;\n+\n+\t\t\tuint64_t orig_pkt_fabs : 1;\n+\t\t\tuint64_t orig_pkt_free : 1;\n+\t\t\tuint64_t pkind : 6;\n+\n+\t\t\tuint64_t rsvd0 : 1;\n+\t\t\tuint64_t et_ovrwr : 1;\n+\t\t\tuint64_t pkt_output : 2;\n+\t\t\tuint64_t pkt_format : 1;\n+\t\t\tuint64_t defrag_opt : 2;\n+\t\t\tuint64_t x2p_dst : 1;\n+\n+\t\t\tuint64_t ctx_push_size : 7;\n+\t\t\tuint64_t rsvd1 : 1;\n+\n+\t\t\tuint64_t ctx_hdr_size : 2;\n+\t\t\tuint64_t aop_valid : 1;\n+\t\t\tuint64_t rsvd2 : 1;\n+\t\t\tuint64_t ctx_size : 4;\n+\t\t} s;\n+\t\tuint64_t u64;\n+\t} w0;\n+\n+\t/* Word1 */\n+\tuint64_t w1_rsvd3;\n+\n+\t/* Word2 */\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint64_t version_select : 4;\n+\t\t\tuint64_t aes_key_len : 2;\n+\t\t\tuint64_t cipher_select : 4;\n+\t\t\tuint64_t mac_select : 4;\n+\t\t\tuint64_t rsvd4 : 50;\n+\t\t} s;\n+\t\tuint64_t u64;\n+\t} w2;\n+\n+\t/* Word3 */\n+\tuint64_t w3_rsvd5;\n+\n+\t/* Word4 - Word9 */\n+\tuint8_t cipher_key[ROC_IE_OT_TLS_CTX_MAX_KEY_IV_LEN];\n+\n+\t/* Word10 - Word25 */\n+\tuint8_t opad_ipad[ROC_IE_OT_TLS_CTX_MAX_OPAD_IPAD_LEN];\n+\n+\t/* Word26 - Word32 */\n+\tstruct roc_ie_ot_tls_read_ctx_update_reg ctx;\n+};\n+\n+struct roc_ie_ot_tls_write_sa {\n+\t/* Word0 */\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint64_t rsvd0 : 3;\n+\t\t\tuint64_t hard_life_dec : 1;\n+\t\t\tuint64_t soft_life_dec : 1;\n+\t\t\tuint64_t count_glb_octets : 1;\n+\t\t\tuint64_t count_glb_pkts : 1;\n+\t\t\tuint64_t count_mib_bytes : 1;\n+\n+\t\t\tuint64_t count_mib_pkts : 1;\n+\t\t\tuint64_t hw_ctx_off : 7;\n+\n+\t\t\tuint64_t rsvd1 : 32;\n+\n+\t\t\tuint64_t ctx_push_size : 7;\n+\t\t\tuint64_t rsvd2 : 1;\n+\n+\t\t\tuint64_t ctx_hdr_size : 2;\n+\t\t\tuint64_t aop_valid : 1;\n+\t\t\tuint64_t rsvd3 : 1;\n+\t\t\tuint64_t ctx_size : 4;\n+\t\t} s;\n+\t\tuint64_t u64;\n+\t} w0;\n+\n+\t/* Word1 */\n+\tuint64_t w1_rsvd4;\n+\n+\t/* Word2 */\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint64_t version_select : 4;\n+\t\t\tuint64_t aes_key_len : 2;\n+\t\t\tuint64_t cipher_select : 4;\n+\t\t\tuint64_t mac_select : 4;\n+\t\t\tuint64_t iv_at_cptr : 1;\n+\t\t\tuint64_t rsvd5 : 49;\n+\t\t} s;\n+\t\tuint64_t u64;\n+\t} w2;\n+\n+\t/* Word3 */\n+\tuint64_t w3_rsvd6;\n+\n+\t/* Word4 - Word9 */\n+\tuint8_t cipher_key[ROC_IE_OT_TLS_CTX_MAX_KEY_IV_LEN];\n+\n+\t/* Word10 - Word25 */\n+\tuint8_t opad_ipad[ROC_IE_OT_TLS_CTX_MAX_OPAD_IPAD_LEN];\n+\n+\t/* Word26 */\n+\tuint64_t w26_rsvd7;\n+\n+\t/* Word27 */\n+\tuint64_t seq_num;\n+};\n+#endif /* __ROC_IE_OT_TLS_H__ */\ndiff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h\nindex d8cbd58c9a..abb8c6a149 100644\n--- a/drivers/common/cnxk/roc_se.h\n+++ b/drivers/common/cnxk/roc_se.h\n@@ -5,6 +5,8 @@\n #ifndef __ROC_SE_H__\n #define __ROC_SE_H__\n \n+#include \"roc_constants.h\"\n+\n /* SE opcodes */\n #define ROC_SE_MAJOR_OP_FC\t      0x33\n #define ROC_SE_FC_MINOR_OP_ENCRYPT    0x0\n@@ -162,6 +164,15 @@ typedef enum {\n \tROC_SE_ERR_GC_ICV_MISCOMPARE = 0x4c,\n \tROC_SE_ERR_GC_DATA_UNALIGNED = 0x4d,\n \n+\tROC_SE_ERR_SSL_RECORD_LEN_INVALID = 0x82,\n+\tROC_SE_ERR_SSL_CTX_LEN_INVALID = 0x83,\n+\tROC_SE_ERR_SSL_CIPHER_UNSUPPORTED = 0x84,\n+\tROC_SE_ERR_SSL_MAC_UNSUPPORTED = 0x85,\n+\tROC_SE_ERR_SSL_VERSION_UNSUPPORTED = 0x86,\n+\tROC_SE_ERR_SSL_MAC_MISMATCH = 0x89,\n+\tROC_SE_ERR_SSL_PKT_REPLAY_SEQ_OUT_OF_WINDOW = 0xC1,\n+\tROC_SE_ERR_SSL_PKT_REPLAY_SEQ = 0xC9,\n+\n \t/* API Layer */\n \tROC_SE_ERR_REQ_PENDING = 0xfe,\n \tROC_SE_ERR_REQ_TIMEOUT = 0xff,\n",
    "prefixes": [
        "13/24"
    ]
}