get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131928,
    "url": "http://patches.dpdk.org/api/patches/131928/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230926055847.2707473-10-ktejasree@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": "<20230926055847.2707473-10-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230926055847.2707473-10-ktejasree@marvell.com",
    "date": "2023-09-26T05:58:41",
    "name": "[v2,09/15] crypto/cnxk: make IV pointers as constant",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "40fba466266d3f0235ce8bc59847047f41db317c",
    "submitter": {
        "id": 1789,
        "url": "http://patches.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@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/20230926055847.2707473-10-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 29629,
            "url": "http://patches.dpdk.org/api/series/29629/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29629",
            "date": "2023-09-26T05:58:32",
            "name": "fixes and improvements to cnxk crypto PMD",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/29629/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/131928/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/131928/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 9C2F04263D;\n\tTue, 26 Sep 2023 08:00:01 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8BF4D40A72;\n\tTue, 26 Sep 2023 07:59:18 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 1CD0340DDC\n for <dev@dpdk.org>; Tue, 26 Sep 2023 07:59:15 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38PJYTTr032212 for <dev@dpdk.org>; Mon, 25 Sep 2023 22:59:15 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t9wcqr1v0-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 25 Sep 2023 22:59:15 -0700",
            "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 Mon, 25 Sep 2023 22:59:13 -0700",
            "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; Mon, 25 Sep 2023 22:59:13 -0700",
            "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 7BC7B3F709D;\n Mon, 25 Sep 2023 22:59:11 -0700 (PDT)"
        ],
        "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=pfpt0220;\n bh=0HB0pNfU0ZC6gRzjanI5KsT5BRYk1LHpY44rJ3kdJ6Q=;\n b=OJTgC0n+42vGZgQSLXR4C12hK6w2/yU3OwFyMB/0RRsWUFqh0WYK+IgZLDoIwWE3CZBM\n ICg/xkNRDAXJssQXuwjcrppxsbI/htiHZ9gwziqZ+kRZW+lps09Au3DEIpnKXJDVUQPr\n LFWPusSk/Me9E8EdWYGAVA7cHV+pFy+UBnkb95sDey6V2tF/nRTSb8Xqmfvxry13eATk\n X7SE7qFliU21wk5YntL5FUw/puxp8skuZEy8KJVjCatoliO+Z9h4CqmnQfiUQVcH94nd\n NUFCsGp8640a1lFNji0eMUl0Suua7Qpdk6/JjLFEq2H9EMr1rWbN9BtC36acPQA0ae4/ 0Q==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Aakash Sasidharan\n <asasidharan@marvell.com>, Gowrishankar Muthukrishnan\n <gmuthukrishn@marvell.com>,\n Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v2 09/15] crypto/cnxk: make IV pointers as constant",
        "Date": "Tue, 26 Sep 2023 11:28:41 +0530",
        "Message-ID": "<20230926055847.2707473-10-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230926055847.2707473-1-ktejasree@marvell.com>",
        "References": "<20230926055847.2707473-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "r6L6J-I61a3gF_PLIQ-IOzXBm4KSs42r",
        "X-Proofpoint-GUID": "r6L6J-I61a3gF_PLIQ-IOzXBm4KSs42r",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-26_04,2023-09-25_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": "Make IV pointers as constant.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n drivers/common/cnxk/roc_se.h  |   4 +-\n drivers/crypto/cnxk/cnxk_se.h | 140 +++++++++++++++++++---------------\n 2 files changed, 80 insertions(+), 64 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h\nindex d540d70616..2a5abd71cf 100644\n--- a/drivers/common/cnxk/roc_se.h\n+++ b/drivers/common/cnxk/roc_se.h\n@@ -360,8 +360,8 @@ struct roc_se_fc_params {\n \t\t\tstruct roc_se_iov_ptr *dst_iov;\n \t\t};\n \t};\n-\tvoid *iv_buf;\n-\tvoid *auth_iv_buf;\n+\tconst void *iv_buf;\n+\tconst void *auth_iv_buf;\n \tstruct roc_se_ctx *ctx;\n \tstruct roc_se_buf_ptr meta_buf;\n \tuint8_t cipher_iv_len;\ndiff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex bf70b0a57c..b8998d401b 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -84,10 +84,10 @@ cpt_pack_iv(uint8_t *iv_src, uint8_t *iv_dst)\n }\n \n static inline void\n-pdcp_iv_copy(uint8_t *iv_d, uint8_t *iv_s, const uint8_t pdcp_alg_type,\n-\t     uint8_t pack_iv)\n+pdcp_iv_copy(uint8_t *iv_d, const uint8_t *iv_s, const uint8_t pdcp_alg_type, uint8_t pack_iv)\n {\n-\tuint32_t *iv_s_temp, iv_temp[4];\n+\tconst uint32_t *iv_s_temp;\n+\tuint32_t iv_temp[4];\n \tint j;\n \n \tif (unlikely(iv_s == NULL)) {\n@@ -101,18 +101,37 @@ pdcp_iv_copy(uint8_t *iv_d, uint8_t *iv_s, const uint8_t pdcp_alg_type,\n \t\t * and BigEndian, MC needs it as IV0 IV1 IV2 IV3\n \t\t */\n \n-\t\tiv_s_temp = (uint32_t *)iv_s;\n+\t\tiv_s_temp = (const uint32_t *)iv_s;\n \n \t\tfor (j = 0; j < 4; j++)\n \t\t\tiv_temp[j] = iv_s_temp[3 - j];\n \t\tmemcpy(iv_d, iv_temp, 16);\n \t} else if ((pdcp_alg_type == ROC_SE_PDCP_ALG_TYPE_ZUC) ||\n \t\t   pdcp_alg_type == ROC_SE_PDCP_ALG_TYPE_AES_CTR) {\n+\t\tmemcpy(iv_d, iv_s, 16);\n \t\tif (pack_iv) {\n-\t\t\tcpt_pack_iv(iv_s, iv_d);\n-\t\t\tmemcpy(iv_d + 6, iv_s + 8, 17);\n-\t\t} else\n-\t\t\tmemcpy(iv_d, iv_s, 16);\n+\t\t\tuint8_t iv_d23, iv_d24;\n+\n+\t\t\t/* Save last two bytes as only 23B IV space is available */\n+\t\t\tiv_d23 = iv_d[23];\n+\t\t\tiv_d24 = iv_d[24];\n+\n+\t\t\t/* Copy remaining part of IV */\n+\t\t\tmemcpy(iv_d + 16, iv_s + 16, 25 - 16);\n+\n+\t\t\t/* Swap IV */\n+\t\t\troc_se_zuc_bytes_swap(iv_d, 25);\n+\n+\t\t\t/* Pack IV */\n+\t\t\tcpt_pack_iv(iv_d, iv_d);\n+\n+\t\t\t/* Move IV */\n+\t\t\tfor (j = 6; j < 23; j++)\n+\t\t\t\tiv_d[j] = iv_d[j + 2];\n+\n+\t\t\tiv_d[23] = iv_d23;\n+\t\t\tiv_d[24] = iv_d24;\n+\t\t}\n \t}\n }\n \n@@ -221,9 +240,9 @@ cpt_mac_len_verify(struct rte_crypto_auth_xform *auth)\n \n static __rte_always_inline int\n sg_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t offset_ctrl,\n-\t     uint8_t *iv_s, int iv_len, uint8_t pack_iv, uint8_t pdcp_alg_type, int32_t inputlen,\n-\t     int32_t outputlen, uint32_t passthrough_len, uint32_t req_flags, int pdcp_flag,\n-\t     int decrypt)\n+\t     const uint8_t *iv_s, int iv_len, uint8_t pack_iv, uint8_t pdcp_alg_type,\n+\t     int32_t inputlen, int32_t outputlen, uint32_t passthrough_len, uint32_t req_flags,\n+\t     int pdcp_flag, int decrypt)\n {\n \tstruct roc_sglist_comp *gather_comp, *scatter_comp;\n \tvoid *m_vaddr = params->meta_buf.vaddr;\n@@ -412,9 +431,9 @@ sg_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t\n \n static __rte_always_inline int\n sg2_inst_prep(struct roc_se_fc_params *params, struct cpt_inst_s *inst, uint64_t offset_ctrl,\n-\t      uint8_t *iv_s, int iv_len, uint8_t pack_iv, uint8_t pdcp_alg_type, int32_t inputlen,\n-\t      int32_t outputlen, uint32_t passthrough_len, uint32_t req_flags, int pdcp_flag,\n-\t      int decrypt)\n+\t      const uint8_t *iv_s, int iv_len, uint8_t pack_iv, uint8_t pdcp_alg_type,\n+\t      int32_t inputlen, int32_t outputlen, uint32_t passthrough_len, uint32_t req_flags,\n+\t      int pdcp_flag, int decrypt)\n {\n \tstruct roc_sg2list_comp *gather_comp, *scatter_comp;\n \tvoid *m_vaddr = params->meta_buf.vaddr;\n@@ -831,9 +850,9 @@ cpt_digest_gen_sg_ver2_prep(uint32_t flags, uint64_t d_lens, struct roc_se_fc_pa\n static inline int\n pdcp_chain_sg1_prep(struct roc_se_fc_params *params, struct roc_se_ctx *cpt_ctx,\n \t\t    struct cpt_inst_s *inst, union cpt_inst_w4 w4, int32_t inputlen,\n-\t\t    uint8_t hdr_len, uint64_t offset_ctrl, uint32_t req_flags, uint8_t *cipher_iv,\n-\t\t    uint8_t *auth_iv, const int pack_iv, const uint8_t pdcp_ci_alg,\n-\t\t    const uint8_t pdcp_auth_alg)\n+\t\t    uint8_t hdr_len, uint64_t offset_ctrl, uint32_t req_flags,\n+\t\t    const uint8_t *cipher_iv, const uint8_t *auth_iv, const int pack_iv,\n+\t\t    const uint8_t pdcp_ci_alg, const uint8_t pdcp_auth_alg)\n {\n \tstruct roc_sglist_comp *scatter_comp, *gather_comp;\n \tvoid *m_vaddr = params->meta_buf.vaddr;\n@@ -940,9 +959,9 @@ pdcp_chain_sg1_prep(struct roc_se_fc_params *params, struct roc_se_ctx *cpt_ctx,\n static inline int\n pdcp_chain_sg2_prep(struct roc_se_fc_params *params, struct roc_se_ctx *cpt_ctx,\n \t\t    struct cpt_inst_s *inst, union cpt_inst_w4 w4, int32_t inputlen,\n-\t\t    uint8_t hdr_len, uint64_t offset_ctrl, uint32_t req_flags, uint8_t *cipher_iv,\n-\t\t    uint8_t *auth_iv, const int pack_iv, const uint8_t pdcp_ci_alg,\n-\t\t    const uint8_t pdcp_auth_alg)\n+\t\t    uint8_t hdr_len, uint64_t offset_ctrl, uint32_t req_flags,\n+\t\t    const uint8_t *cipher_iv, const uint8_t *auth_iv, const int pack_iv,\n+\t\t    const uint8_t pdcp_ci_alg, const uint8_t pdcp_auth_alg)\n {\n \tstruct roc_sg2list_comp *gather_comp, *scatter_comp;\n \tvoid *m_vaddr = params->meta_buf.vaddr;\n@@ -1051,12 +1070,12 @@ cpt_sm_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens, struct roc_se_fc_p\n \tint32_t inputlen, outputlen, enc_dlen;\n \tunion cpt_inst_w4 cpt_inst_w4;\n \tuint32_t passthrough_len = 0;\n+\tconst uint8_t *src = NULL;\n \tstruct roc_se_ctx *se_ctx;\n \tuint32_t encr_data_len;\n \tuint32_t encr_offset;\n \tuint64_t offset_ctrl;\n \tuint8_t iv_len = 16;\n-\tuint8_t *src = NULL;\n \tvoid *offset_vaddr;\n \tint ret;\n \n@@ -1109,7 +1128,7 @@ cpt_sm_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens, struct roc_se_fc_p\n \n \t\tif (likely(iv_len)) {\n \t\t\tvoid *dst = PLT_PTR_ADD(offset_vaddr, ROC_SE_OFF_CTRL_LEN);\n-\t\t\tuint64_t *src = fc_params->iv_buf;\n+\t\t\tconst uint64_t *src = fc_params->iv_buf;\n \n \t\t\trte_memcpy(dst, src, 16);\n \t\t}\n@@ -1142,20 +1161,19 @@ cpt_enc_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \t\t  struct roc_se_fc_params *fc_params, struct cpt_inst_s *inst,\n \t\t  const bool is_sg_ver2)\n {\n-\tuint32_t iv_offset = 0;\n+\tuint32_t encr_data_len, auth_data_len, aad_len = 0;\n+\tuint32_t encr_offset, auth_offset, iv_offset = 0;\n \tint32_t inputlen, outputlen, enc_dlen, auth_dlen;\n-\tstruct roc_se_ctx *se_ctx;\n \tuint32_t cipher_type, hash_type;\n-\tuint32_t mac_len;\n-\tuint8_t iv_len = 16;\n-\tuint32_t encr_offset, auth_offset;\n-\tuint64_t offset_ctrl;\n-\tuint32_t encr_data_len, auth_data_len, aad_len = 0;\n-\tuint32_t passthrough_len = 0;\n \tunion cpt_inst_w4 cpt_inst_w4;\n+\tuint32_t passthrough_len = 0;\n+\tconst uint8_t *src = NULL;\n+\tstruct roc_se_ctx *se_ctx;\n+\tuint64_t offset_ctrl;\n+\tuint8_t iv_len = 16;\n \tvoid *offset_vaddr;\n \tuint8_t op_minor;\n-\tuint8_t *src = NULL;\n+\tuint32_t mac_len;\n \tint ret;\n \n \tencr_offset = ROC_SE_ENCR_OFFSET(d_offs);\n@@ -1279,7 +1297,7 @@ cpt_enc_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \t\tif (likely(iv_len)) {\n \t\t\tuint64_t *dest =\n \t\t\t\t(uint64_t *)((uint8_t *)offset_vaddr + ROC_SE_OFF_CTRL_LEN);\n-\t\t\tuint64_t *src = fc_params->iv_buf;\n+\t\t\tconst uint64_t *src = fc_params->iv_buf;\n \t\t\tdest[0] = src[0];\n \t\t\tdest[1] = src[1];\n \t\t}\n@@ -1312,19 +1330,18 @@ cpt_dec_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \t\t  struct roc_se_fc_params *fc_params, struct cpt_inst_s *inst,\n \t\t  const bool is_sg_ver2)\n {\n-\tuint32_t iv_offset = 0;\n+\tuint32_t encr_data_len, auth_data_len, aad_len = 0;\n+\tuint32_t encr_offset, auth_offset, iv_offset = 0;\n \tint32_t inputlen, outputlen, enc_dlen, auth_dlen;\n-\tstruct roc_se_ctx *se_ctx;\n+\tunion cpt_inst_w4 cpt_inst_w4;\n+\tuint32_t passthrough_len = 0;\n \tint32_t hash_type, mac_len;\n+\tconst uint8_t *src = NULL;\n+\tstruct roc_se_ctx *se_ctx;\n+\tuint64_t offset_ctrl;\n \tuint8_t iv_len = 16;\n-\tuint32_t encr_offset, auth_offset;\n-\tuint32_t encr_data_len, auth_data_len, aad_len = 0;\n-\tuint32_t passthrough_len = 0;\n-\tunion cpt_inst_w4 cpt_inst_w4;\n \tvoid *offset_vaddr;\n \tuint8_t op_minor;\n-\tuint64_t offset_ctrl;\n-\tuint8_t *src = NULL;\n \tint ret;\n \n \tencr_offset = ROC_SE_ENCR_OFFSET(d_offs);\n@@ -1437,7 +1454,7 @@ cpt_dec_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \t\tif (likely(iv_len)) {\n \t\t\tuint64_t *dest =\n \t\t\t\t(uint64_t *)((uint8_t *)offset_vaddr + ROC_SE_OFF_CTRL_LEN);\n-\t\t\tuint64_t *src = fc_params->iv_buf;\n+\t\t\tconst uint64_t *src = fc_params->iv_buf;\n \t\t\tdest[0] = src[0];\n \t\t\tdest[1] = src[1];\n \t\t}\n@@ -1472,7 +1489,7 @@ cpt_pdcp_chain_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n {\n \tuint32_t encr_data_len, auth_data_len, aad_len, passthr_len, pad_len, hdr_len;\n \tuint32_t encr_offset, auth_offset, iv_offset = 0;\n-\tuint8_t *auth_iv = NULL, *cipher_iv = NULL;\n+\tconst uint8_t *auth_iv = NULL, *cipher_iv = NULL;\n \tuint8_t pdcp_ci_alg, pdcp_auth_alg;\n \tunion cpt_inst_w4 cpt_inst_w4;\n \tstruct roc_se_ctx *se_ctx;\n@@ -1581,18 +1598,18 @@ 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+\tuint32_t encr_data_len, auth_data_len;\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-\tuint32_t mac_len = 0;\n-\tuint8_t pdcp_alg_type;\n-\tuint32_t encr_offset, auth_offset;\n-\tuint32_t encr_data_len, auth_data_len;\n-\tint flags, iv_len;\n-\tuint64_t offset_ctrl;\n \tuint64_t *offset_vaddr;\n-\tuint8_t *iv_s;\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-\tunion cpt_inst_w4 cpt_inst_w4;\n+\tuint64_t offset_ctrl;\n+\tint flags, iv_len;\n \tint ret;\n \n \tse_ctx = params->ctx;\n@@ -1617,7 +1634,6 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\t\tiv_len = params->auth_iv_len;\n \n \t\t\tif (iv_len == 25) {\n-\t\t\t\troc_se_zuc_bytes_swap(iv_s, iv_len);\n \t\t\t\tiv_len -= 2;\n \t\t\t\tpack_iv = 1;\n \t\t\t}\n@@ -1653,7 +1669,6 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\tpdcp_alg_type = se_ctx->pdcp_ci_alg;\n \n \t\tif (iv_len == 25) {\n-\t\t\troc_se_zuc_bytes_swap(iv_s, iv_len);\n \t\t\tiv_len -= 2;\n \t\t\tpack_iv = 1;\n \t\t}\n@@ -1739,16 +1754,16 @@ static __rte_always_inline int\n cpt_kasumi_enc_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+\tuint32_t encr_data_len, auth_data_len;\n \tint32_t inputlen = 0, outputlen = 0;\n+\tuint32_t encr_offset, auth_offset;\n+\tconst uint8_t *iv_s, iv_len = 8;\n+\tunion cpt_inst_w4 cpt_inst_w4;\n \tstruct roc_se_ctx *se_ctx;\n+\tuint64_t offset_ctrl;\n \tuint32_t mac_len = 0;\n-\tuint32_t encr_offset, auth_offset;\n-\tuint32_t encr_data_len, auth_data_len;\n-\tint flags;\n-\tuint8_t *iv_s, iv_len = 8;\n \tuint8_t dir = 0;\n-\tuint64_t offset_ctrl;\n-\tunion cpt_inst_w4 cpt_inst_w4;\n+\tint flags;\n \n \tencr_offset = ROC_SE_ENCR_OFFSET(d_offs) / 8;\n \tauth_offset = ROC_SE_AUTH_OFFSET(d_offs) / 8;\n@@ -1756,17 +1771,15 @@ cpt_kasumi_enc_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \tauth_data_len = ROC_SE_AUTH_DLEN(d_lens);\n \n \tse_ctx = params->ctx;\n-\tiv_s = params->iv_buf;\n \tflags = se_ctx->zsk_flags;\n \tmac_len = se_ctx->mac_len;\n \n-\tdir = iv_s[8] & 0x1;\n \tcpt_inst_w4.u64 = se_ctx->template_w4.u64;\n \n \tif (flags == 0x0) {\n+\t\tiv_s = params->iv_buf;\n \t\t/* Consider IV len */\n \t\tencr_offset += iv_len;\n-\t\tauth_offset += iv_len;\n \n \t\tinputlen = encr_offset + (RTE_ALIGN(encr_data_len, 8) / 8);\n \t\toutputlen = inputlen;\n@@ -1778,6 +1791,9 @@ cpt_kasumi_enc_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\t\treturn -1;\n \t\t}\n \t} else {\n+\t\tiv_s = params->auth_iv_buf;\n+\t\tdir = iv_s[8] & 0x1;\n+\n \t\tinputlen = auth_offset + (RTE_ALIGN(auth_data_len, 8) / 8);\n \t\toutputlen = mac_len;\n \t\t/* iv offset is 0 */\n@@ -3206,7 +3222,7 @@ fill_digest_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \n \t\t\t/* Store it at end of auth iv */\n \t\t\tiv_buf[8] = direction;\n-\t\t\tparams.iv_buf = iv_buf;\n+\t\t\tparams.auth_iv_buf = iv_buf;\n \t\t}\n \t}\n \n",
    "prefixes": [
        "v2",
        "09/15"
    ]
}