get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135448,
    "url": "http://patches.dpdk.org/api/patches/135448/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231221123545.510-20-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-20-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231221123545.510-20-anoobj@marvell.com",
    "date": "2023-12-21T12:35:40",
    "name": "[19/24] crypto/cnxk: replace PDCP with PDCP chain opcode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6fb8324acc2ff46fa56fe2b0f8e8df374a11eaa0",
    "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-20-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/135448/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/135448/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 1599343750;\n\tThu, 21 Dec 2023 13:38:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5D04542ECC;\n\tThu, 21 Dec 2023 13:36:55 +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 068C640A81\n for <dev@dpdk.org>; Thu, 21 Dec 2023 13:36:51 +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 3BLCVS33019305 for <dev@dpdk.org>; Thu, 21 Dec 2023 04:36:51 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3v4nekg0jq-3\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 21 Dec 2023 04:36:50 -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:40 -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:40 -0800",
            "from BG-LT92004.corp.innovium.com (unknown [10.193.71.152])\n by maili.marvell.com (Postfix) with ESMTP id 9214E3F7073;\n Thu, 21 Dec 2023 04:36:37 -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=aSvQTe7WBotnt/6UMdsXoi/VeGt3AGV8Tm7AVNbZOBI=; b=Nvo\n EABwpyKMUTUr6n0VkXMuhSnL9eD2C/5myHbCN/BGjS0iLIQGKCjgmc/t2mzrd7iV\n nq1J6MvhrKxQtrs+mSbdozMm9USphO5y8fHINBn4JjvinDFwGd6uvzB7ad/0mhtR\n zMYBKKqB1s/saGfmw8ymHWzFUAp3DjQRhDo7LecckaiJKU3K7ZaXatdwQ3EVdA5o\n QS7v/QwbEj0Gm1wz+sISltVTfsl1akQLdv9kAD7TPXIu57Sg92nRCKsUyXeMHr9t\n co6FRdI2FtgkQd9m0pLU/vOkAf29SxlAp5xtBu7x5r6Ruzit+03kLuA12S4C/1/D\n UFx0sfYySUgaPEWxrUw==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH 19/24] crypto/cnxk: replace PDCP with PDCP chain opcode",
        "Date": "Thu, 21 Dec 2023 18:05:40 +0530",
        "Message-ID": "<20231221123545.510-20-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": "yeqoZOeDtkbW3YFvi-CRTMawQzhIFlds",
        "X-Proofpoint-ORIG-GUID": "yeqoZOeDtkbW3YFvi-CRTMawQzhIFlds",
        "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": "From: Tejasree Kondoj <ktejasree@marvell.com>\n\nReplacing PDCP opcode with PDCP chain opcode.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n drivers/common/cnxk/roc_se.c  | 331 +++++++++-------------------------\n drivers/common/cnxk/roc_se.h  |  18 +-\n drivers/crypto/cnxk/cnxk_se.h |  96 +++++-----\n 3 files changed, 135 insertions(+), 310 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_se.c b/drivers/common/cnxk/roc_se.c\nindex 6ced4ef789..4e00268149 100644\n--- a/drivers/common/cnxk/roc_se.c\n+++ b/drivers/common/cnxk/roc_se.c\n@@ -88,13 +88,20 @@ cpt_ciph_type_set(roc_se_cipher_type type, struct roc_se_ctx *ctx, uint16_t key_\n \t\tfc_type = ROC_SE_FC_GEN;\n \t\tbreak;\n \tcase ROC_SE_ZUC_EEA3:\n-\t\tif (chained_op) {\n-\t\t\tif (unlikely(key_len != 16))\n+\t\tif (unlikely(key_len != 16)) {\n+\t\t\t/*\n+\t\t\t * ZUC 256 is not supported with older microcode\n+\t\t\t * where pdcp_iv_offset is 16\n+\t\t\t */\n+\t\t\tif (chained_op || (ctx->pdcp_iv_offset == 16)) {\n+\t\t\t\tplt_err(\"ZUC 256 is not supported with chained operations\");\n \t\t\t\treturn -1;\n+\t\t\t}\n+\t\t}\n+\t\tif (chained_op)\n \t\t\tfc_type = ROC_SE_PDCP_CHAIN;\n-\t\t} else {\n+\t\telse\n \t\t\tfc_type = ROC_SE_PDCP;\n-\t\t}\n \t\tbreak;\n \tcase ROC_SE_SNOW3G_UEA2:\n \t\tif (unlikely(key_len != 16))\n@@ -197,33 +204,6 @@ cpt_hmac_opad_ipad_gen(roc_se_auth_type auth_type, const uint8_t *key, uint16_t\n \t}\n }\n \n-static int\n-cpt_pdcp_key_type_set(struct roc_se_zuc_snow3g_ctx *zs_ctx, uint16_t key_len)\n-{\n-\troc_se_aes_type key_type = 0;\n-\n-\tif (roc_model_is_cn9k()) {\n-\t\tif (key_len != 16) {\n-\t\t\tplt_err(\"Only key len 16 is supported on cn9k\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\t}\n-\n-\tswitch (key_len) {\n-\tcase 16:\n-\t\tkey_type = ROC_SE_AES_128_BIT;\n-\t\tbreak;\n-\tcase 32:\n-\t\tkey_type = ROC_SE_AES_256_BIT;\n-\t\tbreak;\n-\tdefault:\n-\t\tplt_err(\"Invalid AES key len\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\tzs_ctx->zuc.otk_ctx.w0.s.key_len = key_type;\n-\treturn 0;\n-}\n-\n static int\n cpt_pdcp_chain_key_type_get(uint16_t key_len)\n {\n@@ -247,36 +227,6 @@ cpt_pdcp_chain_key_type_get(uint16_t key_len)\n \treturn key_type;\n }\n \n-static int\n-cpt_pdcp_mac_len_set(struct roc_se_zuc_snow3g_ctx *zs_ctx, uint16_t mac_len)\n-{\n-\troc_se_pdcp_mac_len_type mac_type = 0;\n-\n-\tif (roc_model_is_cn9k()) {\n-\t\tif (mac_len != 4) {\n-\t\t\tplt_err(\"Only mac len 4 is supported on cn9k\");\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\t}\n-\n-\tswitch (mac_len) {\n-\tcase 4:\n-\t\tmac_type = ROC_SE_PDCP_MAC_LEN_32_BIT;\n-\t\tbreak;\n-\tcase 8:\n-\t\tmac_type = ROC_SE_PDCP_MAC_LEN_64_BIT;\n-\t\tbreak;\n-\tcase 16:\n-\t\tmac_type = ROC_SE_PDCP_MAC_LEN_128_BIT;\n-\t\tbreak;\n-\tdefault:\n-\t\tplt_err(\"Invalid ZUC MAC len\");\n-\t\treturn -ENOTSUP;\n-\t}\n-\tzs_ctx->zuc.otk_ctx.w0.s.mac_len = mac_type;\n-\treturn 0;\n-}\n-\n static void\n cpt_zuc_const_update(uint8_t *zuc_const, int key_len, int mac_len)\n {\n@@ -300,32 +250,27 @@ cpt_zuc_const_update(uint8_t *zuc_const, int key_len, int mac_len)\n }\n \n int\n-roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type,\n-\t\t    const uint8_t *key, uint16_t key_len, uint16_t mac_len)\n+roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type, const uint8_t *key,\n+\t\t    uint16_t key_len, uint16_t mac_len)\n {\n-\tstruct roc_se_zuc_snow3g_chain_ctx *zs_ch_ctx;\n-\tstruct roc_se_zuc_snow3g_ctx *zs_ctx;\n \tstruct roc_se_kasumi_ctx *k_ctx;\n+\tstruct roc_se_pdcp_ctx *pctx;\n \tstruct roc_se_context *fctx;\n \tuint8_t opcode_minor;\n-\tuint8_t pdcp_alg;\n \tbool chained_op;\n-\tint ret;\n \n \tif (se_ctx == NULL)\n \t\treturn -1;\n \n-\tzs_ctx = &se_ctx->se_ctx.zs_ctx;\n-\tzs_ch_ctx = &se_ctx->se_ctx.zs_ch_ctx;\n+\tpctx = &se_ctx->se_ctx.pctx;\n \tk_ctx = &se_ctx->se_ctx.k_ctx;\n \tfctx = &se_ctx->se_ctx.fctx;\n \n \tchained_op = se_ctx->ciph_then_auth || se_ctx->auth_then_ciph;\n \n \tif ((type >= ROC_SE_ZUC_EIA3) && (type <= ROC_SE_KASUMI_F9_ECB)) {\n-\t\tuint8_t *zuc_const;\n \t\tuint32_t keyx[4];\n-\t\tuint8_t *ci_key;\n+\t\tint key_type;\n \n \t\tif (!key_len)\n \t\t\treturn -1;\n@@ -335,98 +280,64 @@ roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type,\n \t\t\treturn -1;\n \t\t}\n \n-\t\tif (roc_model_is_cn9k()) {\n-\t\t\tci_key = zs_ctx->zuc.onk_ctx.ci_key;\n-\t\t\tzuc_const = zs_ctx->zuc.onk_ctx.zuc_const;\n-\t\t} else {\n-\t\t\tci_key = zs_ctx->zuc.otk_ctx.ci_key;\n-\t\t\tzuc_const = zs_ctx->zuc.otk_ctx.zuc_const;\n-\t\t}\n-\n \t\t/* For ZUC/SNOW3G/Kasumi */\n \t\tswitch (type) {\n \t\tcase ROC_SE_SNOW3G_UIA2:\n-\t\t\tif (chained_op) {\n-\t\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.state_conf =\n-\t\t\t\t\tROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\t\tctx->w0.s.auth_type =\n-\t\t\t\t\tROC_SE_PDCP_CHAIN_ALG_TYPE_SNOW3G;\n-\t\t\t\tctx->w0.s.mac_len = mac_len;\n-\t\t\t\tctx->w0.s.auth_key_len = key_len;\n-\t\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n-\t\t\t\tcpt_snow3g_key_gen(key, keyx);\n-\t\t\t\tmemcpy(ctx->st.auth_key, keyx, key_len);\n-\t\t\t} else {\n-\t\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\t\tROC_SE_PDCP_ALG_TYPE_SNOW3G;\n-\t\t\t\tzs_ctx->zuc.otk_ctx.w0.s.mac_len =\n-\t\t\t\t\tROC_SE_PDCP_MAC_LEN_32_BIT;\n-\t\t\t\tcpt_snow3g_key_gen(key, keyx);\n-\t\t\t\tmemcpy(ci_key, keyx, key_len);\n+\t\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\t\tpctx->w0.s.auth_type = ROC_SE_PDCP_CHAIN_ALG_TYPE_SNOW3G;\n+\t\t\tpctx->w0.s.mac_len = mac_len;\n+\t\t\tpctx->w0.s.auth_key_len = key_len;\n+\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n+\t\t\tcpt_snow3g_key_gen(key, keyx);\n+\t\t\tmemcpy(pctx->st.auth_key, keyx, key_len);\n+\n+\t\t\tif (!chained_op)\n \t\t\t\tse_ctx->fc_type = ROC_SE_PDCP;\n-\t\t\t}\n \t\t\tse_ctx->pdcp_auth_alg = ROC_SE_PDCP_ALG_TYPE_SNOW3G;\n \t\t\tse_ctx->zsk_flags = 0x1;\n \t\t\tbreak;\n \t\tcase ROC_SE_ZUC_EIA3:\n-\t\t\tif (chained_op) {\n-\t\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\t\tctx->w0.s.state_conf =\n-\t\t\t\t\tROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\t\tctx->w0.s.auth_type =\n-\t\t\t\t\tROC_SE_PDCP_CHAIN_ALG_TYPE_ZUC;\n-\t\t\t\tctx->w0.s.mac_len = mac_len;\n-\t\t\t\tctx->w0.s.auth_key_len = key_len;\n-\t\t\t\tmemcpy(ctx->st.auth_key, key, key_len);\n-\t\t\t\tcpt_zuc_const_update(ctx->st.auth_zuc_const,\n-\t\t\t\t\t\t     key_len, mac_len);\n-\t\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n-\t\t\t} else {\n-\t\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\t\tROC_SE_PDCP_ALG_TYPE_ZUC;\n-\t\t\t\tret = cpt_pdcp_key_type_set(zs_ctx, key_len);\n-\t\t\t\tif (ret)\n-\t\t\t\t\treturn ret;\n-\t\t\t\tret = cpt_pdcp_mac_len_set(zs_ctx, mac_len);\n-\t\t\t\tif (ret)\n-\t\t\t\t\treturn ret;\n-\t\t\t\tmemcpy(ci_key, key, key_len);\n-\t\t\t\tif (key_len == 32)\n-\t\t\t\t\troc_se_zuc_bytes_swap(ci_key, key_len);\n-\t\t\t\tcpt_zuc_const_update(zuc_const, key_len,\n-\t\t\t\t\t\t     mac_len);\n-\t\t\t\tse_ctx->fc_type = ROC_SE_PDCP;\n+\t\t\tif (unlikely(key_len != 16)) {\n+\t\t\t\t/*\n+\t\t\t\t * ZUC 256 is not supported with older microcode\n+\t\t\t\t * where pdcp_iv_offset is 16\n+\t\t\t\t */\n+\t\t\t\tif (chained_op || (se_ctx->pdcp_iv_offset == 16)) {\n+\t\t\t\t\tplt_err(\"ZUC 256 is not supported with chained operations\");\n+\t\t\t\t\treturn -1;\n+\t\t\t\t}\n \t\t\t}\n+\t\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n+\t\t\tif (key_type < 0)\n+\t\t\t\treturn key_type;\n+\t\t\tpctx->w0.s.auth_key_len = key_type;\n+\t\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\t\tpctx->w0.s.auth_type = ROC_SE_PDCP_CHAIN_ALG_TYPE_ZUC;\n+\t\t\tpctx->w0.s.mac_len = mac_len;\n+\t\t\tmemcpy(pctx->st.auth_key, key, key_len);\n+\t\t\tif (key_len == 32)\n+\t\t\t\troc_se_zuc_bytes_swap(pctx->st.auth_key, key_len);\n+\t\t\tcpt_zuc_const_update(pctx->st.auth_zuc_const, key_len, mac_len);\n+\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n+\n+\t\t\tif (!chained_op)\n+\t\t\t\tse_ctx->fc_type = ROC_SE_PDCP;\n \t\t\tse_ctx->pdcp_auth_alg = ROC_SE_PDCP_ALG_TYPE_ZUC;\n \t\t\tse_ctx->zsk_flags = 0x1;\n \t\t\tbreak;\n \t\tcase ROC_SE_AES_CMAC_EIA2:\n-\t\t\tif (chained_op) {\n-\t\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\t\tint key_type;\n-\t\t\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n-\t\t\t\tif (key_type < 0)\n-\t\t\t\t\treturn key_type;\n-\t\t\t\tctx->w0.s.auth_key_len = key_type;\n-\t\t\t\tctx->w0.s.state_conf =\n-\t\t\t\t\tROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\t\tctx->w0.s.auth_type =\n-\t\t\t\t\tROC_SE_PDCP_ALG_TYPE_AES_CTR;\n-\t\t\t\tctx->w0.s.mac_len = mac_len;\n-\t\t\t\tmemcpy(ctx->st.auth_key, key, key_len);\n-\t\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n-\t\t\t} else {\n-\t\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\t\tROC_SE_PDCP_ALG_TYPE_AES_CTR;\n-\t\t\t\tzs_ctx->zuc.otk_ctx.w0.s.mac_len =\n-\t\t\t\t\tROC_SE_PDCP_MAC_LEN_32_BIT;\n-\t\t\t\tmemcpy(ci_key, key, key_len);\n+\t\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n+\t\t\tif (key_type < 0)\n+\t\t\t\treturn key_type;\n+\t\t\tpctx->w0.s.auth_key_len = key_type;\n+\t\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\t\tpctx->w0.s.auth_type = ROC_SE_PDCP_ALG_TYPE_AES_CTR;\n+\t\t\tpctx->w0.s.mac_len = mac_len;\n+\t\t\tmemcpy(pctx->st.auth_key, key, key_len);\n+\t\t\tse_ctx->fc_type = ROC_SE_PDCP_CHAIN;\n+\n+\t\t\tif (!chained_op)\n \t\t\t\tse_ctx->fc_type = ROC_SE_PDCP;\n-\t\t\t}\n \t\t\tse_ctx->pdcp_auth_alg = ROC_SE_PDCP_ALG_TYPE_AES_CMAC;\n \t\t\tse_ctx->eia2 = 1;\n \t\t\tse_ctx->zsk_flags = 0x1;\n@@ -454,11 +365,8 @@ roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type,\n \n \t\tse_ctx->mac_len = mac_len;\n \t\tse_ctx->hash_type = type;\n-\t\tpdcp_alg = zs_ctx->zuc.otk_ctx.w0.s.alg_type;\n \t\tif (chained_op)\n \t\t\topcode_minor = se_ctx->ciph_then_auth ? 2 : 3;\n-\t\telse if (roc_model_is_cn9k())\n-\t\t\topcode_minor = ((1 << 7) | (pdcp_alg << 5) | 1);\n \t\telse\n \t\t\topcode_minor = ((1 << 4) | 1);\n \n@@ -513,29 +421,18 @@ int\n roc_se_ciph_key_set(struct roc_se_ctx *se_ctx, roc_se_cipher_type type, const uint8_t *key,\n \t\t    uint16_t key_len)\n {\n-\tbool chained_op = se_ctx->ciph_then_auth || se_ctx->auth_then_ciph;\n-\tstruct roc_se_zuc_snow3g_ctx *zs_ctx = &se_ctx->se_ctx.zs_ctx;\n \tstruct roc_se_context *fctx = &se_ctx->se_ctx.fctx;\n-\tstruct roc_se_zuc_snow3g_chain_ctx *zs_ch_ctx;\n+\tstruct roc_se_pdcp_ctx *pctx;\n \tuint8_t opcode_minor = 0;\n-\tuint8_t *zuc_const;\n \tuint32_t keyx[4];\n-\tuint8_t *ci_key;\n+\tint key_type;\n \tint i, ret;\n \n \t/* For NULL cipher, no processing required. */\n \tif (type == ROC_SE_PASSTHROUGH)\n \t\treturn 0;\n \n-\tzs_ch_ctx = &se_ctx->se_ctx.zs_ch_ctx;\n-\n-\tif (roc_model_is_cn9k()) {\n-\t\tci_key = zs_ctx->zuc.onk_ctx.ci_key;\n-\t\tzuc_const = zs_ctx->zuc.onk_ctx.zuc_const;\n-\t} else {\n-\t\tci_key = zs_ctx->zuc.otk_ctx.ci_key;\n-\t\tzuc_const = zs_ctx->zuc.otk_ctx.zuc_const;\n-\t}\n+\tpctx = &se_ctx->se_ctx.pctx;\n \n \tif ((type == ROC_SE_AES_GCM) || (type == ROC_SE_AES_CCM))\n \t\tse_ctx->template_w4.s.opcode_minor = BIT(5);\n@@ -615,72 +512,38 @@ roc_se_ciph_key_set(struct roc_se_ctx *se_ctx, roc_se_cipher_type type, const ui\n \t\tfctx->enc.enc_cipher = ROC_SE_DES3_CBC;\n \t\tgoto success;\n \tcase ROC_SE_SNOW3G_UEA2:\n-\t\tif (chained_op == true) {\n-\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.state_conf =\n-\t\t\t\tROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.cipher_type =\n-\t\t\t\tROC_SE_PDCP_CHAIN_ALG_TYPE_SNOW3G;\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.ci_key_len = key_len;\n-\t\t\tcpt_snow3g_key_gen(key, keyx);\n-\t\t\tmemcpy(ctx->st.ci_key, keyx, key_len);\n-\t\t} else {\n-\t\t\tzs_ctx->zuc.otk_ctx.w0.s.key_len = ROC_SE_AES_128_BIT;\n-\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\tROC_SE_PDCP_ALG_TYPE_SNOW3G;\n-\t\t\tcpt_snow3g_key_gen(key, keyx);\n-\t\t\tmemcpy(ci_key, keyx, key_len);\n-\t\t}\n+\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\tpctx->w0.s.cipher_type = ROC_SE_PDCP_CHAIN_ALG_TYPE_SNOW3G;\n+\t\tpctx->w0.s.ci_key_len = key_len;\n+\t\tcpt_snow3g_key_gen(key, keyx);\n+\t\tmemcpy(pctx->st.ci_key, keyx, key_len);\n \t\tse_ctx->pdcp_ci_alg = ROC_SE_PDCP_ALG_TYPE_SNOW3G;\n \t\tse_ctx->zsk_flags = 0;\n \t\tgoto success;\n \tcase ROC_SE_ZUC_EEA3:\n-\t\tif (chained_op == true) {\n-\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.state_conf =\n-\t\t\t\tROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.cipher_type =\n-\t\t\t\tROC_SE_PDCP_CHAIN_ALG_TYPE_ZUC;\n-\t\t\tmemcpy(ctx->st.ci_key, key, key_len);\n-\t\t\tmemcpy(ctx->st.ci_zuc_const, zuc_key128, 32);\n-\t\t\tzs_ch_ctx->zuc.onk_ctx.w0.s.ci_key_len = key_len;\n-\t\t} else {\n-\t\t\tret = cpt_pdcp_key_type_set(zs_ctx, key_len);\n-\t\t\tif (ret)\n-\t\t\t\treturn ret;\n-\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\tROC_SE_PDCP_ALG_TYPE_ZUC;\n-\t\t\tmemcpy(ci_key, key, key_len);\n-\t\t\tif (key_len == 32) {\n-\t\t\t\troc_se_zuc_bytes_swap(ci_key, key_len);\n-\t\t\t\tmemcpy(zuc_const, zuc_key256, 16);\n-\t\t\t} else\n-\t\t\t\tmemcpy(zuc_const, zuc_key128, 32);\n-\t\t}\n-\n+\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n+\t\tif (key_type < 0)\n+\t\t\treturn key_type;\n+\t\tpctx->w0.s.ci_key_len = key_type;\n+\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\tpctx->w0.s.cipher_type = ROC_SE_PDCP_CHAIN_ALG_TYPE_ZUC;\n+\t\tmemcpy(pctx->st.ci_key, key, key_len);\n+\t\tif (key_len == 32) {\n+\t\t\troc_se_zuc_bytes_swap(pctx->st.ci_key, key_len);\n+\t\t\tmemcpy(pctx->st.ci_zuc_const, zuc_key256, 16);\n+\t\t} else\n+\t\t\tmemcpy(pctx->st.ci_zuc_const, zuc_key128, 32);\n \t\tse_ctx->pdcp_ci_alg = ROC_SE_PDCP_ALG_TYPE_ZUC;\n \t\tse_ctx->zsk_flags = 0;\n \t\tgoto success;\n \tcase ROC_SE_AES_CTR_EEA2:\n-\t\tif (chained_op == true) {\n-\t\t\tstruct roc_se_onk_zuc_chain_ctx *ctx =\n-\t\t\t\t&zs_ch_ctx->zuc.onk_ctx;\n-\t\t\tint key_type;\n-\t\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n-\t\t\tif (key_type < 0)\n-\t\t\t\treturn key_type;\n-\t\t\tctx->w0.s.ci_key_len = key_type;\n-\t\t\tctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n-\t\t\tctx->w0.s.cipher_type = ROC_SE_PDCP_ALG_TYPE_AES_CTR;\n-\t\t\tmemcpy(ctx->st.ci_key, key, key_len);\n-\t\t} else {\n-\t\t\tzs_ctx->zuc.otk_ctx.w0.s.key_len = ROC_SE_AES_128_BIT;\n-\t\t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type =\n-\t\t\t\tROC_SE_PDCP_ALG_TYPE_AES_CTR;\n-\t\t\tmemcpy(ci_key, key, key_len);\n-\t\t}\n+\t\tkey_type = cpt_pdcp_chain_key_type_get(key_len);\n+\t\tif (key_type < 0)\n+\t\t\treturn key_type;\n+\t\tpctx->w0.s.ci_key_len = key_type;\n+\t\tpctx->w0.s.state_conf = ROC_SE_PDCP_CHAIN_CTX_KEY_IV;\n+\t\tpctx->w0.s.cipher_type = ROC_SE_PDCP_ALG_TYPE_AES_CTR;\n+\t\tmemcpy(pctx->st.ci_key, key, key_len);\n \t\tse_ctx->pdcp_ci_alg = ROC_SE_PDCP_ALG_TYPE_AES_CTR;\n \t\tse_ctx->zsk_flags = 0;\n \t\tgoto success;\n@@ -720,20 +583,6 @@ roc_se_ciph_key_set(struct roc_se_ctx *se_ctx, roc_se_cipher_type type, const ui\n \treturn 0;\n }\n \n-void\n-roc_se_ctx_swap(struct roc_se_ctx *se_ctx)\n-{\n-\tstruct roc_se_zuc_snow3g_ctx *zs_ctx = &se_ctx->se_ctx.zs_ctx;\n-\n-\tif (roc_model_is_cn9k())\n-\t\treturn;\n-\n-\tif (se_ctx->fc_type == ROC_SE_PDCP_CHAIN)\n-\t\treturn;\n-\n-\tzs_ctx->zuc.otk_ctx.w0.u64 = htobe64(zs_ctx->zuc.otk_ctx.w0.u64);\n-}\n-\n void\n roc_se_ctx_init(struct roc_se_ctx *roc_se_ctx)\n {\n@@ -745,15 +594,13 @@ roc_se_ctx_init(struct roc_se_ctx *roc_se_ctx)\n \tcase ROC_SE_FC_GEN:\n \t\tctx_len = sizeof(struct roc_se_context);\n \t\tbreak;\n+\tcase ROC_SE_PDCP_CHAIN:\n \tcase ROC_SE_PDCP:\n-\t\tctx_len = sizeof(struct roc_se_zuc_snow3g_ctx);\n+\t\tctx_len = sizeof(struct roc_se_pdcp_ctx);\n \t\tbreak;\n \tcase ROC_SE_KASUMI:\n \t\tctx_len = sizeof(struct roc_se_kasumi_ctx);\n \t\tbreak;\n-\tcase ROC_SE_PDCP_CHAIN:\n-\t\tctx_len = sizeof(struct roc_se_zuc_snow3g_chain_ctx);\n-\t\tbreak;\n \tcase ROC_SE_SM:\n \t\tctx_len = sizeof(struct roc_se_sm_context);\n \t\tbreak;\ndiff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h\nindex abb8c6a149..d62c40b310 100644\n--- a/drivers/common/cnxk/roc_se.h\n+++ b/drivers/common/cnxk/roc_se.h\n@@ -246,7 +246,7 @@ struct roc_se_onk_zuc_ctx {\n \tuint8_t zuc_const[32];\n };\n \n-struct roc_se_onk_zuc_chain_ctx {\n+struct roc_se_pdcp_ctx {\n \tunion {\n \t\tuint64_t u64;\n \t\tstruct {\n@@ -278,19 +278,6 @@ struct roc_se_onk_zuc_chain_ctx {\n \t} st;\n };\n \n-struct roc_se_zuc_snow3g_chain_ctx {\n-\tunion {\n-\t\tstruct roc_se_onk_zuc_chain_ctx onk_ctx;\n-\t} zuc;\n-};\n-\n-struct roc_se_zuc_snow3g_ctx {\n-\tunion {\n-\t\tstruct roc_se_onk_zuc_ctx onk_ctx;\n-\t\tstruct roc_se_otk_zuc_ctx otk_ctx;\n-\t} zuc;\n-};\n-\n struct roc_se_kasumi_ctx {\n \tuint8_t reg_A[8];\n \tuint8_t ci_key[16];\n@@ -356,8 +343,7 @@ struct roc_se_ctx {\n \t\t} w0;\n \t\tunion {\n \t\t\tstruct roc_se_context fctx;\n-\t\t\tstruct roc_se_zuc_snow3g_ctx zs_ctx;\n-\t\t\tstruct roc_se_zuc_snow3g_chain_ctx zs_ch_ctx;\n+\t\t\tstruct roc_se_pdcp_ctx pctx;\n \t\t\tstruct roc_se_kasumi_ctx k_ctx;\n \t\t\tstruct roc_se_sm_context sm_ctx;\n \t\t};\ndiff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex 1aec7dea9f..8193e96a92 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -298,8 +298,13 @@ sg_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t\n \tiv_d = ((uint8_t *)offset_vaddr + ROC_SE_OFF_CTRL_LEN);\n \n \tif (pdcp_flag) {\n-\t\tif (likely(iv_len))\n-\t\t\tpdcp_iv_copy(iv_d, iv_s, pdcp_alg_type, pack_iv);\n+\t\tif (likely(iv_len)) {\n+\t\t\tif (zsk_flags == 0x1)\n+\t\t\t\tpdcp_iv_copy(iv_d + params->pdcp_iv_offset, iv_s, pdcp_alg_type,\n+\t\t\t\t\t     pack_iv);\n+\t\t\telse\n+\t\t\t\tpdcp_iv_copy(iv_d, iv_s, pdcp_alg_type, pack_iv);\n+\t\t}\n \t} else {\n \t\tif (likely(iv_len))\n \t\t\tmemcpy(iv_d, iv_s, iv_len);\n@@ -375,7 +380,7 @@ sg_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t\n \ti = 0;\n \tscatter_comp = (struct roc_sglist_comp *)((uint8_t *)gather_comp + g_size_bytes);\n \n-\tif (zsk_flags == 0x1) {\n+\tif ((zsk_flags == 0x1) && (se_ctx->fc_type == ROC_SE_KASUMI)) {\n \t\t/* IV in SLIST only for EEA3 & UEA2 or for F8 */\n \t\tiv_len = 0;\n \t}\n@@ -492,8 +497,13 @@ sg2_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t\n \n \tiv_d = ((uint8_t *)offset_vaddr + ROC_SE_OFF_CTRL_LEN);\n \tif (pdcp_flag) {\n-\t\tif (likely(iv_len))\n-\t\t\tpdcp_iv_copy(iv_d, iv_s, pdcp_alg_type, pack_iv);\n+\t\tif (likely(iv_len)) {\n+\t\t\tif (zsk_flags == 0x1)\n+\t\t\t\tpdcp_iv_copy(iv_d + params->pdcp_iv_offset, iv_s, pdcp_alg_type,\n+\t\t\t\t\t     pack_iv);\n+\t\t\telse\n+\t\t\t\tpdcp_iv_copy(iv_d, iv_s, pdcp_alg_type, pack_iv);\n+\t\t}\n \t} else {\n \t\tif (likely(iv_len))\n \t\t\tmemcpy(iv_d, iv_s, iv_len);\n@@ -567,7 +577,7 @@ sg2_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t\n \ti = 0;\n \tscatter_comp = (struct roc_sg2list_comp *)((uint8_t *)gather_comp + g_size_bytes);\n \n-\tif (zsk_flags == 0x1) {\n+\tif ((zsk_flags == 0x1) && (se_ctx->fc_type == ROC_SE_KASUMI)) {\n \t\t/* IV in SLIST only for EEA3 & UEA2 or for F8 */\n \t\tiv_len = 0;\n \t}\n@@ -1617,28 +1627,34 @@ static __rte_always_inline int\n cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\t  struct roc_se_fc_params *params, struct cpt_inst_s *inst, const bool is_sg_ver2)\n {\n+\t/*\n+\t * pdcp_iv_offset is auth_iv_offset wrt cipher_iv_offset which is\n+\t * 16 with old microcode without ZUC 256 support\n+\t * whereas it is 24 with new microcode which has ZUC 256.\n+\t * So iv_len reserved is 32B for cipher and auth IVs with old microcode\n+\t * and 48B with new microcode.\n+\t */\n+\tconst int iv_len = params->pdcp_iv_offset * 2;\n+\tstruct roc_se_ctx *se_ctx = params->ctx;\n \tuint32_t encr_data_len, auth_data_len;\n+\tconst int flags = se_ctx->zsk_flags;\n \tuint32_t encr_offset, auth_offset;\n \tunion cpt_inst_w4 cpt_inst_w4;\n \tint32_t inputlen, outputlen;\n-\tstruct roc_se_ctx *se_ctx;\n \tuint64_t *offset_vaddr;\n \tuint8_t pdcp_alg_type;\n \tuint32_t mac_len = 0;\n \tconst uint8_t *iv_s;\n \tuint8_t pack_iv = 0;\n \tuint64_t offset_ctrl;\n-\tint flags, iv_len;\n \tint ret;\n \n-\tse_ctx = params->ctx;\n-\tflags = se_ctx->zsk_flags;\n \tmac_len = se_ctx->mac_len;\n \n \tcpt_inst_w4.u64 = se_ctx->template_w4.u64;\n-\tcpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_PDCP;\n \n \tif (flags == 0x1) {\n+\t\tcpt_inst_w4.s.opcode_minor = 1;\n \t\tiv_s = params->auth_iv_buf;\n \n \t\t/*\n@@ -1650,47 +1666,32 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\tpdcp_alg_type = se_ctx->pdcp_auth_alg;\n \n \t\tif (pdcp_alg_type != ROC_SE_PDCP_ALG_TYPE_AES_CMAC) {\n-\t\t\tiv_len = params->auth_iv_len;\n \n-\t\t\tif (iv_len == 25) {\n-\t\t\t\tiv_len -= 2;\n+\t\t\tif (params->auth_iv_len == 25)\n \t\t\t\tpack_iv = 1;\n-\t\t\t}\n \n \t\t\tauth_offset = auth_offset / 8;\n-\n-\t\t\t/* consider iv len */\n-\t\t\tauth_offset += iv_len;\n-\n-\t\t\tinputlen =\n-\t\t\t\tauth_offset + (RTE_ALIGN(auth_data_len, 8) / 8);\n-\t\t} else {\n-\t\t\tiv_len = 16;\n-\n-\t\t\t/* consider iv len */\n-\t\t\tauth_offset += iv_len;\n-\n-\t\t\tinputlen = auth_offset + auth_data_len;\n-\n-\t\t\t/* length should be in bits */\n-\t\t\tauth_data_len *= 8;\n+\t\t\tauth_data_len = RTE_ALIGN(auth_data_len, 8) / 8;\n \t\t}\n \n-\t\toutputlen = mac_len;\n+\t\t/* consider iv len */\n+\t\tauth_offset += iv_len;\n+\n+\t\tinputlen = auth_offset + auth_data_len;\n+\t\toutputlen = iv_len + mac_len;\n \n \t\toffset_ctrl = rte_cpu_to_be_64((uint64_t)auth_offset);\n+\t\tcpt_inst_w4.s.param1 = auth_data_len;\n \n \t\tencr_data_len = 0;\n \t\tencr_offset = 0;\n \t} else {\n+\t\tcpt_inst_w4.s.opcode_minor = 0;\n \t\tiv_s = params->iv_buf;\n-\t\tiv_len = params->cipher_iv_len;\n \t\tpdcp_alg_type = se_ctx->pdcp_ci_alg;\n \n-\t\tif (iv_len == 25) {\n-\t\t\tiv_len -= 2;\n+\t\tif (params->cipher_iv_len == 25)\n \t\t\tpack_iv = 1;\n-\t\t}\n \n \t\t/*\n \t\t * Microcode expects offsets in bytes\n@@ -1700,6 +1701,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \n \t\tencr_offset = ROC_SE_ENCR_OFFSET(d_offs);\n \t\tencr_offset = encr_offset / 8;\n+\n \t\t/* consider iv len */\n \t\tencr_offset += iv_len;\n \n@@ -1707,10 +1709,11 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\toutputlen = inputlen;\n \n \t\t/* iv offset is 0 */\n-\t\toffset_ctrl = rte_cpu_to_be_64((uint64_t)encr_offset << 16);\n+\t\toffset_ctrl = rte_cpu_to_be_64((uint64_t)encr_offset);\n \n \t\tauth_data_len = 0;\n \t\tauth_offset = 0;\n+\t\tcpt_inst_w4.s.param1 = (RTE_ALIGN(encr_data_len, 8) / 8);\n \t}\n \n \tif (unlikely((encr_offset >> 16) || (auth_offset >> 8))) {\n@@ -1720,12 +1723,6 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\treturn -1;\n \t}\n \n-\t/*\n-\t * Lengths are expected in bits.\n-\t */\n-\tcpt_inst_w4.s.param1 = encr_data_len;\n-\tcpt_inst_w4.s.param2 = auth_data_len;\n-\n \t/*\n \t * In cn9k, cn10k since we have a limitation of\n \t * IV & Offset control word not part of instruction\n@@ -1738,6 +1735,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \n \t\t/* Use Direct mode */\n \n+\t\tcpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_PDCP_CHAIN;\n \t\toffset_vaddr = (uint64_t *)((uint8_t *)dm_vaddr - ROC_SE_OFF_CTRL_LEN - iv_len);\n \n \t\t/* DPTR */\n@@ -1753,6 +1751,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\t*offset_vaddr = offset_ctrl;\n \t\tinst->w4.u64 = cpt_inst_w4.u64;\n \t} else {\n+\t\tcpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_PDCP_CHAIN | ROC_DMA_MODE_SG;\n \t\tinst->w4.u64 = cpt_inst_w4.u64;\n \t\tif (is_sg_ver2)\n \t\t\tret = sg2_inst_prep(params, inst, offset_ctrl, iv_s, iv_len, pack_iv,\n@@ -2243,8 +2242,6 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)\n \t\t\t\t\t c_form->key.length)))\n \t\treturn -1;\n \n-\tif ((enc_type >= ROC_SE_ZUC_EEA3) && (enc_type <= ROC_SE_AES_CTR_EEA2))\n-\t\troc_se_ctx_swap(&sess->roc_se_ctx);\n \treturn 0;\n }\n \n@@ -2403,15 +2400,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)\n \t\tsess->auth_iv_offset = a_form->iv.offset;\n \t\tsess->auth_iv_length = a_form->iv.length;\n \t}\n-\tif (unlikely(roc_se_auth_key_set(&sess->roc_se_ctx, auth_type,\n-\t\t\t\t\t a_form->key.data, a_form->key.length,\n-\t\t\t\t\t a_form->digest_length)))\n+\tif (unlikely(roc_se_auth_key_set(&sess->roc_se_ctx, auth_type, a_form->key.data,\n+\t\t\t\t\t a_form->key.length, a_form->digest_length)))\n \t\treturn -1;\n \n-\tif ((auth_type >= ROC_SE_ZUC_EIA3) &&\n-\t    (auth_type <= ROC_SE_AES_CMAC_EIA2))\n-\t\troc_se_ctx_swap(&sess->roc_se_ctx);\n-\n \treturn 0;\n }\n \n",
    "prefixes": [
        "19/24"
    ]
}