get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114750,
    "url": "http://patches.dpdk.org/api/patches/114750/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220809105356.561-7-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": "<20220809105356.561-7-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220809105356.561-7-anoobj@marvell.com",
    "date": "2022-08-09T10:53:44",
    "name": "[v2,06/18] crypto/cnxk: add separate datapath for pdcp cipher operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fbf68c9c3607d2ae0fec206a3e5d6f8c7b6151ff",
    "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/20220809105356.561-7-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 24235,
            "url": "http://patches.dpdk.org/api/series/24235/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24235",
            "date": "2022-08-09T10:53:38",
            "name": "Fixes and improvements in cnxk crypto PMDs",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/24235/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114750/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/114750/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 CA7A9A00C2;\n\tTue,  9 Aug 2022 12:54:46 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C731B42BDC;\n\tTue,  9 Aug 2022 12:54:18 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id F3FC042BDA\n for <dev@dpdk.org>; Tue,  9 Aug 2022 12:54:17 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 2791TKc5017274\n for <dev@dpdk.org>; Tue, 9 Aug 2022 03:54:17 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hudy6sphe-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 09 Aug 2022 03:54:17 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 9 Aug 2022 03:54:15 -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.2 via Frontend\n Transport; Tue, 9 Aug 2022 03:54:15 -0700",
            "from BG-LT92004.corp.innovium.com (unknown [10.193.69.70])\n by maili.marvell.com (Postfix) with ESMTP id 33F723F7065;\n Tue,  9 Aug 2022 03:54:12 -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=ZoncwHScaA1cg6x9JgJyPj146wXnAIm6ACWMN/APXOg=;\n b=D5U6TsctK0Hj1dw6q1nAUCc0KavUmGznBTarMh9c6fojIzCvsE0q/8UROgh2NjOnib4+\n 2vXnYlRGUOXt7/CM3xEi0ock2NCiZXlwtjXYczQXiIuDWf118AX1Q+Y7CY9TdWlsqwYG\n 4EzV9ukb4BqEBLcpqs9BNqmu2TrwKTst6lwC9m6x4ifZn5SgYknC3Yg3iSFL0R3mn7Gw\n c/eAW9zDufWrAjreBHxW6vSnoZN8jkIb8X2vyF0ouXhxU3Ujpp1HowCmifZZMa5VbJu3\n BG3Mu+i8phChkghhfiq0GZg0Y6nE/FTcEl2F5h9DRpJGfT/jJIXnnDUsrdmXwdYFq1lD 9A==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Jerin Jacob <jerinj@marvell.com>",
        "CC": "Archana Muniganti <marchana@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v2 06/18] crypto/cnxk: add separate datapath for pdcp cipher\n operation",
        "Date": "Tue, 9 Aug 2022 16:23:44 +0530",
        "Message-ID": "<20220809105356.561-7-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220809105356.561-1-anoobj@marvell.com>",
        "References": "<20220808080606.220-1-anoobj@marvell.com>\n <20220809105356.561-1-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "U2JVJJNPXUChQwdW1QkNYBkBJhDFW14l",
        "X-Proofpoint-ORIG-GUID": "U2JVJJNPXUChQwdW1QkNYBkBJhDFW14l",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1\n definitions=2022-08-09_03,2022-08-09_02,2022-06-22_01",
        "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 separate datapath for PDCP opcode performing cipher operation.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n drivers/crypto/cnxk/cn10k_cryptodev_ops.c |  19 ---\n drivers/crypto/cnxk/cn9k_cryptodev_ops.c  |  27 +---\n drivers/crypto/cnxk/cnxk_se.h             | 177 +++++++++++++++++++---\n 3 files changed, 158 insertions(+), 65 deletions(-)",
    "diff": "diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\nindex bfa6374005..1b70d02e2a 100644\n--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\n+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\n@@ -77,25 +77,6 @@ cpt_sec_inst_fill(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,\n \treturn ret;\n }\n \n-static __rte_always_inline int __rte_hot\n-cpt_sym_inst_fill(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,\n-\t\t  struct cnxk_se_sess *sess, struct cpt_inflight_req *infl_req,\n-\t\t  struct cpt_inst_s *inst)\n-{\n-\tuint64_t cpt_op;\n-\tint ret;\n-\n-\tcpt_op = sess->cpt_op;\n-\n-\tif (cpt_op & ROC_SE_OP_CIPHER_MASK)\n-\t\tret = fill_fc_params(op, sess, &qp->meta_info, infl_req, inst);\n-\telse\n-\t\tret = fill_digest_params(op, sess, &qp->meta_info, infl_req,\n-\t\t\t\t\t inst);\n-\n-\treturn ret;\n-}\n-\n static inline int\n cn10k_cpt_fill_inst(struct cnxk_cpt_qp *qp, struct rte_crypto_op *ops[],\n \t\t    struct cpt_inst_s inst[], struct cpt_inflight_req *infl_req)\ndiff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c\nindex 2182c1bd2f..3d69723809 100644\n--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c\n+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c\n@@ -17,27 +17,6 @@\n #include \"cnxk_cryptodev_ops.h\"\n #include \"cnxk_se.h\"\n \n-static __rte_always_inline int __rte_hot\n-cn9k_cpt_sym_inst_fill(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,\n-\t\t       struct cnxk_se_sess *sess,\n-\t\t       struct cpt_inflight_req *infl_req,\n-\t\t       struct cpt_inst_s *inst)\n-{\n-\tuint64_t cpt_op;\n-\tint ret;\n-\n-\tcpt_op = sess->cpt_op;\n-\n-\tif (sess->roc_se_ctx.fc_type == ROC_SE_PDCP_CHAIN)\n-\t\tret = fill_pdcp_chain_params(op, sess, &qp->meta_info, infl_req, inst);\n-\telse if (cpt_op & ROC_SE_OP_CIPHER_MASK)\n-\t\tret = fill_fc_params(op, sess, &qp->meta_info, infl_req, inst);\n-\telse\n-\t\tret = fill_digest_params(op, sess, &qp->meta_info, infl_req, inst);\n-\n-\treturn ret;\n-}\n-\n static __rte_always_inline int __rte_hot\n cn9k_cpt_sec_inst_fill(struct rte_crypto_op *op,\n \t\t       struct cpt_inflight_req *infl_req,\n@@ -118,8 +97,7 @@ cn9k_cpt_inst_prep(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,\n \t\t\tsym_op = op->sym;\n \t\t\tsess = get_sym_session_private_data(\n \t\t\t\tsym_op->session, cn9k_cryptodev_driver_id);\n-\t\t\tret = cn9k_cpt_sym_inst_fill(qp, op, sess, infl_req,\n-\t\t\t\t\t\t     inst);\n+\t\t\tret = cpt_sym_inst_fill(qp, op, sess, infl_req, inst);\n \t\t\tinst->w7.u64 = sess->cpt_inst_w7;\n \t\t} else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)\n \t\t\tret = cn9k_cpt_sec_inst_fill(op, infl_req, inst);\n@@ -130,8 +108,7 @@ cn9k_cpt_inst_prep(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,\n \t\t\t\treturn -1;\n \t\t\t}\n \n-\t\t\tret = cn9k_cpt_sym_inst_fill(qp, op, sess, infl_req,\n-\t\t\t\t\t\t     inst);\n+\t\t\tret = cpt_sym_inst_fill(qp, op, sess, infl_req, inst);\n \t\t\tif (unlikely(ret)) {\n \t\t\t\tsym_session_clear(cn9k_cryptodev_driver_id,\n \t\t\t\t\t\t  op->sym->session);\ndiff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex 2b477284c0..35d074ea34 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -1865,8 +1865,6 @@ cpt_fc_dec_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \n \tif (likely(fc_type == ROC_SE_FC_GEN)) {\n \t\tret = cpt_dec_hmac_prep(flags, d_offs, d_lens, fc_params, inst);\n-\t} else if (fc_type == ROC_SE_PDCP) {\n-\t\tret = cpt_pdcp_alg_prep(flags, d_offs, d_lens, fc_params, inst);\n \t} else if (fc_type == ROC_SE_KASUMI) {\n \t\tret = cpt_kasumi_dec_prep(d_offs, d_lens, fc_params, inst);\n \t}\n@@ -2400,8 +2398,8 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,\n \n static __rte_always_inline int\n fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n-\t       struct cpt_qp_meta_info *m_info,\n-\t       struct cpt_inflight_req *infl_req, struct cpt_inst_s *inst)\n+\t       struct cpt_qp_meta_info *m_info, struct cpt_inflight_req *infl_req,\n+\t       struct cpt_inst_s *inst, const bool is_kasumi)\n {\n \tstruct roc_se_ctx *ctx = &sess->roc_se_ctx;\n \tuint8_t op_minor = ctx->template_w4.s.opcode_minor;\n@@ -2424,7 +2422,9 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \tint ret;\n \n \tfc_params.cipher_iv_len = sess->iv_length;\n-\tfc_params.auth_iv_len = sess->auth_iv_length;\n+\tfc_params.auth_iv_len = 0;\n+\tfc_params.auth_iv_buf = NULL;\n+\tfc_params.iv_buf = NULL;\n \n \tif (likely(sess->iv_length)) {\n \t\tflags |= ROC_SE_VALID_IV_BUF;\n@@ -2440,13 +2440,15 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t\t}\n \t}\n \n-\tif (sess->zsk_flag) {\n+\t/* Kasumi would need auth IV */\n+\tif (is_kasumi && sess->zsk_flag) {\n+\t\tfc_params.auth_iv_len = sess->auth_iv_length;\n \t\tif (sess->auth_iv_length)\n \t\t\tfc_params.auth_iv_buf =\n \t\t\t\trte_crypto_op_ctod_offset(cop, uint8_t *, sess->auth_iv_offset);\n-\t\tif (sess->zsk_flag != ROC_SE_ZS_EA)\n-\t\t\tinplace = 0;\n+\t\tinplace = 0;\n \t}\n+\n \tm_src = sym_op->m_src;\n \tm_dst = sym_op->m_dst;\n \n@@ -2508,14 +2510,6 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t\td_lens = ci_data_length;\n \t\td_lens = (d_lens << 32) | a_data_length;\n \n-\t\tif (sess->auth_first)\n-\t\t\tmc_hash_off = a_data_offset + a_data_length;\n-\t\telse\n-\t\t\tmc_hash_off = ci_data_offset + ci_data_length;\n-\n-\t\tif (mc_hash_off < (a_data_offset + a_data_length)) {\n-\t\t\tmc_hash_off = (a_data_offset + a_data_length);\n-\t\t}\n \t\t/* for gmac, salt should be updated like in gcm */\n \t\tif (unlikely(sess->is_gmac)) {\n \t\t\tuint8_t *salt;\n@@ -2529,6 +2523,14 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t\tif (likely(sess->mac_len)) {\n \t\t\tstruct rte_mbuf *m = cpt_m_dst_get(cpt_op, m_src, m_dst);\n \n+\t\t\tif (sess->auth_first)\n+\t\t\t\tmc_hash_off = a_data_offset + a_data_length;\n+\t\t\telse\n+\t\t\t\tmc_hash_off = ci_data_offset + ci_data_length;\n+\n+\t\t\tif (mc_hash_off < (a_data_offset + a_data_length))\n+\t\t\t\tmc_hash_off = (a_data_offset + a_data_length);\n+\n \t\t\t/* hmac immediately following data is best case */\n \t\t\tif (!(op_minor & ROC_SE_FC_MINOR_OP_HMAC_FIRST) &&\n \t\t\t    (unlikely(rte_pktmbuf_mtod(m, uint8_t *) +\n@@ -2599,11 +2601,8 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t}\n \n \tif (unlikely(!((flags & ROC_SE_SINGLE_BUF_INPLACE) &&\n-\t\t       (flags & ROC_SE_SINGLE_BUF_HEADROOM) &&\n-\t\t       ((ctx->fc_type != ROC_SE_KASUMI) &&\n-\t\t\t(ctx->fc_type != ROC_SE_HASH_HMAC))))) {\n-\t\tmdata = alloc_op_meta(&fc_params.meta_buf, m_info->mlen,\n-\t\t\t\t      m_info->pool, infl_req);\n+\t\t       (flags & ROC_SE_SINGLE_BUF_HEADROOM) && !is_kasumi))) {\n+\t\tmdata = alloc_op_meta(&fc_params.meta_buf, m_info->mlen, m_info->pool, infl_req);\n \t\tif (mdata == NULL) {\n \t\t\tplt_dp_err(\"Error allocating meta buffer for request\");\n \t\t\treturn -ENOMEM;\n@@ -2632,6 +2631,112 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \treturn ret;\n }\n \n+static __rte_always_inline int\n+fill_pdcp_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n+\t\t struct cpt_qp_meta_info *m_info, struct cpt_inflight_req *infl_req,\n+\t\t struct cpt_inst_s *inst)\n+{\n+\tstruct rte_crypto_sym_op *sym_op = cop->sym;\n+\tstruct roc_se_fc_params fc_params;\n+\tuint32_t c_data_len, c_data_off;\n+\tstruct rte_mbuf *m_src, *m_dst;\n+\tuint64_t d_offs, d_lens;\n+\tchar src[SRC_IOV_SIZE];\n+\tchar dst[SRC_IOV_SIZE];\n+\tvoid *mdata = NULL;\n+\tuint32_t flags = 0;\n+\tint ret;\n+\n+\t/* Cipher only */\n+\n+\tfc_params.cipher_iv_len = sess->iv_length;\n+\tfc_params.auth_iv_len = 0;\n+\tfc_params.iv_buf = NULL;\n+\tfc_params.auth_iv_buf = NULL;\n+\n+\tif (likely(sess->iv_length))\n+\t\tfc_params.iv_buf = rte_crypto_op_ctod_offset(cop, uint8_t *, sess->iv_offset);\n+\n+\tm_src = sym_op->m_src;\n+\tm_dst = sym_op->m_dst;\n+\n+\tc_data_len = sym_op->cipher.data.length;\n+\tc_data_off = sym_op->cipher.data.offset;\n+\n+\td_offs = (uint64_t)c_data_off << 16;\n+\td_lens = (uint64_t)c_data_len << 32;\n+\n+\tfc_params.ctx_buf.vaddr = &sess->roc_se_ctx;\n+\n+\tif (likely(m_dst == NULL || m_src == m_dst)) {\n+\t\tfc_params.dst_iov = fc_params.src_iov = (void *)src;\n+\t\tprepare_iov_from_pkt_inplace(m_src, &fc_params, &flags);\n+\t} else {\n+\t\t/* Out of place processing */\n+\t\tfc_params.src_iov = (void *)src;\n+\t\tfc_params.dst_iov = (void *)dst;\n+\n+\t\t/* Store SG I/O in the api for reuse */\n+\t\tif (prepare_iov_from_pkt(m_src, fc_params.src_iov, 0)) {\n+\t\t\tplt_dp_err(\"Prepare src iov failed\");\n+\t\t\tret = -EINVAL;\n+\t\t\tgoto err_exit;\n+\t\t}\n+\n+\t\tif (unlikely(m_dst != NULL)) {\n+\t\t\tuint32_t pkt_len;\n+\n+\t\t\t/* Try to make room as much as src has */\n+\t\t\tpkt_len = rte_pktmbuf_pkt_len(m_dst);\n+\n+\t\t\tif (unlikely(pkt_len < rte_pktmbuf_pkt_len(m_src))) {\n+\t\t\t\tpkt_len = rte_pktmbuf_pkt_len(m_src) - pkt_len;\n+\t\t\t\tif (!rte_pktmbuf_append(m_dst, pkt_len)) {\n+\t\t\t\t\tplt_dp_err(\"Not enough space in \"\n+\t\t\t\t\t\t   \"m_dst %p, need %u\"\n+\t\t\t\t\t\t   \" more\",\n+\t\t\t\t\t\t   m_dst, pkt_len);\n+\t\t\t\t\tret = -EINVAL;\n+\t\t\t\t\tgoto err_exit;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (prepare_iov_from_pkt(m_dst, fc_params.dst_iov, 0)) {\n+\t\t\t\tplt_dp_err(\"Prepare dst iov failed for \"\n+\t\t\t\t\t   \"m_dst %p\",\n+\t\t\t\t\t   m_dst);\n+\t\t\t\tret = -EINVAL;\n+\t\t\t\tgoto err_exit;\n+\t\t\t}\n+\t\t} else {\n+\t\t\tfc_params.dst_iov = (void *)src;\n+\t\t}\n+\t}\n+\n+\tif (unlikely(!((flags & ROC_SE_SINGLE_BUF_INPLACE) &&\n+\t\t       (flags & ROC_SE_SINGLE_BUF_HEADROOM)))) {\n+\t\tmdata = alloc_op_meta(&fc_params.meta_buf, m_info->mlen, m_info->pool, infl_req);\n+\t\tif (mdata == NULL) {\n+\t\t\tplt_dp_err(\"Could not allocate meta buffer\");\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t}\n+\n+\tret = cpt_pdcp_alg_prep(flags, d_offs, d_lens, &fc_params, inst);\n+\tif (unlikely(ret)) {\n+\t\tplt_dp_err(\"Could not prepare instruction\");\n+\t\tgoto free_mdata_and_exit;\n+\t}\n+\n+\treturn 0;\n+\n+free_mdata_and_exit:\n+\tif (infl_req->op_flags & CPT_OP_FLAGS_METABUF)\n+\t\trte_mempool_put(m_info->pool, infl_req->mdata);\n+err_exit:\n+\treturn ret;\n+}\n+\n static __rte_always_inline int\n fill_pdcp_chain_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t\t       struct cpt_qp_meta_info *m_info, struct cpt_inflight_req *infl_req,\n@@ -2974,4 +3079,34 @@ fill_digest_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n err_exit:\n \treturn ret;\n }\n+\n+static __rte_always_inline int __rte_hot\n+cpt_sym_inst_fill(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op, struct cnxk_se_sess *sess,\n+\t\t  struct cpt_inflight_req *infl_req, struct cpt_inst_s *inst)\n+{\n+\tuint64_t cpt_op = sess->cpt_op;\n+\tint ret;\n+\n+\tif (cpt_op & ROC_SE_OP_CIPHER_MASK) {\n+\t\tswitch (sess->roc_se_ctx.fc_type) {\n+\t\tcase ROC_SE_PDCP_CHAIN:\n+\t\t\tret = fill_pdcp_chain_params(op, sess, &qp->meta_info, infl_req, inst);\n+\t\t\tbreak;\n+\t\tcase ROC_SE_PDCP:\n+\t\t\tret = fill_pdcp_params(op, sess, &qp->meta_info, infl_req, inst);\n+\t\t\tbreak;\n+\t\tcase ROC_SE_KASUMI:\n+\t\t\tret = fill_fc_params(op, sess, &qp->meta_info, infl_req, inst, true);\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tret = fill_fc_params(op, sess, &qp->meta_info, infl_req, inst, false);\n+\t\t\tbreak;\n+\t\t}\n+\t} else {\n+\t\tret = fill_digest_params(op, sess, &qp->meta_info, infl_req, inst);\n+\t}\n+\n+\treturn ret;\n+}\n+\n #endif /*_CNXK_SE_H_ */\n",
    "prefixes": [
        "v2",
        "06/18"
    ]
}