get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128816,
    "url": "http://patchwork.dpdk.org/api/patches/128816/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230620052735.3969606-4-ktejasree@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230620052735.3969606-4-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230620052735.3969606-4-ktejasree@marvell.com",
    "date": "2023-06-20T05:27:30",
    "name": "[v2,3/8] crypto/cnxk: use pt inst for null cipher with null auth",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a4bb5b6aa94dd4f6694a2c9e9e4905953fc63e6b",
    "submitter": {
        "id": 1789,
        "url": "http://patchwork.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230620052735.3969606-4-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 28570,
            "url": "http://patchwork.dpdk.org/api/series/28570/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28570",
            "date": "2023-06-20T05:27:27",
            "name": "fixes and improvements to CNXK crypto PMD",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/28570/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128816/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128816/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 11C1742D02;\n\tTue, 20 Jun 2023 07:28:02 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0F47D42D20;\n\tTue, 20 Jun 2023 07:27:50 +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 2F23142C76\n for <dev@dpdk.org>; Tue, 20 Jun 2023 07:27:48 +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 35K4gxxE025985 for <dev@dpdk.org>; Mon, 19 Jun 2023 22:27:47 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3rb5b303g5-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 19 Jun 2023 22:27:47 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Mon, 19 Jun 2023 22:27:45 -0700",
            "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; Mon, 19 Jun 2023 22:27:45 -0700",
            "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id A44213F7071;\n Mon, 19 Jun 2023 22:27:43 -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=2wE2FMQkR8MSrjSND/GFoeAA+dv7/d18L/fvWUggSrI=;\n b=gBQqodt617myyELltP+EFEhriRG/ZKR8LlLYL4UMyDgra9p0bigBCFaFL88Sam/qFnjY\n IgwHolyHPA5ODcKi4JLIfSLfWmX59Dmy/jNoS+59L43wsVshLe9vCVfPPVsm+OWtVvfc\n fapZCLGgqqgvY90QyRU4fQTMJe+XysRZG+LagKjuHUYPua3WUFFpX1Nma/ruMiVQS1Zy\n /tdna+11PBkJLwH+SMZ03fSv3vHoJ7c2pvnNpC9kvDQLMGa0NURD9Br6v+a1yLtkkZSi\n nE80LRbzaZbsKaLCdF61vHP6CWwXPb/PMl2g+SvQofZSTrpkhh4qHmLPKZWwb/3iVkhy zQ==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Aakash Sasidharan <asasidharan@marvell.com>, Anoob Joseph\n <anoobj@marvell.com>,\n Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,\n Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v2 3/8] crypto/cnxk: use pt inst for null cipher with null\n auth",
        "Date": "Tue, 20 Jun 2023 10:57:30 +0530",
        "Message-ID": "<20230620052735.3969606-4-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230620052735.3969606-1-ktejasree@marvell.com>",
        "References": "<20230620052735.3969606-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "zs49S3e1Dje7CqrWo40pxovJFoSAm3NS",
        "X-Proofpoint-ORIG-GUID": "zs49S3e1Dje7CqrWo40pxovJFoSAm3NS",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26\n definitions=2023-06-20_02,2023-06-16_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: Aakash Sasidharan <asasidharan@marvell.com>\n\nUse passthrough instruction for NULL cipher with NULL\nauth combination.\n\nSigned-off-by: Aakash Sasidharan <asasidharan@marvell.com>\n---\n drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 20 ++++----\n drivers/crypto/cnxk/cnxk_se.h            | 59 ++++++++++++++++--------\n 2 files changed, 50 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\nindex d405786668..2018b0eba5 100644\n--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\n+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\n@@ -526,16 +526,13 @@ cnxk_sess_fill(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xform,\n \t\treturn -EINVAL;\n \t}\n \n-\tif ((c_xfrm == NULL || c_xfrm->cipher.algo == RTE_CRYPTO_CIPHER_NULL) &&\n-\t    a_xfrm != NULL && a_xfrm->auth.algo == RTE_CRYPTO_AUTH_NULL &&\n-\t    a_xfrm->auth.op == RTE_CRYPTO_AUTH_OP_VERIFY) {\n-\t\tplt_dp_err(\"Null cipher + null auth verify is not supported\");\n-\t\treturn -ENOTSUP;\n-\t}\n+\tif ((aead_xfrm == NULL) &&\n+\t    (c_xfrm == NULL || c_xfrm->cipher.algo == RTE_CRYPTO_CIPHER_NULL) &&\n+\t    (a_xfrm == NULL || a_xfrm->auth.algo == RTE_CRYPTO_AUTH_NULL))\n+\t\tsess->passthrough = 1;\n \n \t/* Cipher only */\n-\tif (c_xfrm != NULL &&\n-\t    (a_xfrm == NULL || a_xfrm->auth.algo == RTE_CRYPTO_AUTH_NULL)) {\n+\tif (c_xfrm != NULL && (a_xfrm == NULL || a_xfrm->auth.algo == RTE_CRYPTO_AUTH_NULL)) {\n \t\tif (fill_sess_cipher(c_xfrm, sess))\n \t\t\treturn -ENOTSUP;\n \t\telse\n@@ -662,7 +659,8 @@ cnxk_cpt_inst_w7_get(struct cnxk_se_sess *sess, struct roc_cpt *roc_cpt)\n \t\tinst_w7.s.cptr += 8;\n \n \t/* Set the engine group */\n-\tif (sess->zsk_flag || sess->aes_ctr_eea2 || sess->is_sha3 || sess->is_sm3)\n+\tif (sess->zsk_flag || sess->aes_ctr_eea2 || sess->is_sha3 || sess->is_sm3 ||\n+\t    sess->passthrough)\n \t\tinst_w7.s.egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_SE];\n \telse\n \t\tinst_w7.s.egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];\n@@ -687,7 +685,9 @@ sym_session_configure(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xfor\n \n \tsess_priv->lf = roc_cpt->lf[0];\n \n-\tif (sess_priv->cpt_op & ROC_SE_OP_CIPHER_MASK) {\n+\tif (sess_priv->passthrough)\n+\t\tthr_type = CPT_DP_THREAD_TYPE_PT;\n+\telse if (sess_priv->cpt_op & ROC_SE_OP_CIPHER_MASK) {\n \t\tswitch (sess_priv->roc_se_ctx.fc_type) {\n \t\tcase ROC_SE_FC_GEN:\n \t\t\tif (sess_priv->aes_gcm || sess_priv->aes_ccm || sess_priv->chacha_poly)\ndiff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex 87414eb131..ceb50fa3b6 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -24,6 +24,8 @@ enum cpt_dp_thread_type {\n \tCPT_DP_THREAD_TYPE_PDCP_CHAIN,\n \tCPT_DP_THREAD_TYPE_KASUMI,\n \tCPT_DP_THREAD_AUTH_ONLY,\n+\tCPT_DP_THREAD_GENERIC,\n+\tCPT_DP_THREAD_TYPE_PT,\n };\n \n struct cnxk_se_sess {\n@@ -46,7 +48,8 @@ struct cnxk_se_sess {\n \tuint8_t is_sha3 : 1;\n \tuint8_t short_iv : 1;\n \tuint8_t is_sm3 : 1;\n-\tuint8_t rsvd : 5;\n+\tuint8_t passthrough : 1;\n+\tuint8_t rsvd : 4;\n \tuint8_t mac_len;\n \tuint8_t iv_length;\n \tuint8_t auth_iv_length;\n@@ -636,15 +639,6 @@ cpt_digest_gen_sg_ver1_prep(uint32_t flags, uint64_t d_lens, struct roc_se_fc_pa\n \t\tcpt_inst_w4.s.dlen = data_len;\n \t}\n \n-\t/* Null auth only case enters the if */\n-\tif (unlikely(!hash_type && !ctx->enc_cipher)) {\n-\t\tcpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_MISC;\n-\t\t/* Minor op is passthrough */\n-\t\tcpt_inst_w4.s.opcode_minor = 0x03;\n-\t\t/* Send out completion code only */\n-\t\tcpt_inst_w4.s.param2 = 0x1;\n-\t}\n-\n \t/* DPTR has SG list */\n \tin_buffer = m_vaddr;\n \n@@ -758,15 +752,6 @@ cpt_digest_gen_sg_ver2_prep(uint32_t flags, uint64_t d_lens, struct roc_se_fc_pa\n \t\tcpt_inst_w4.s.dlen = data_len;\n \t}\n \n-\t/* Null auth only case enters the if */\n-\tif (unlikely(!hash_type && !ctx->enc_cipher)) {\n-\t\tcpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_MISC;\n-\t\t/* Minor op is passthrough */\n-\t\tcpt_inst_w4.s.opcode_minor = 0x03;\n-\t\t/* Send out completion code only */\n-\t\tcpt_inst_w4.s.param2 = 0x1;\n-\t}\n-\n \t/* DPTR has SG list */\n \n \t/* TODO Add error check if space will be sufficient */\n@@ -2376,6 +2361,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,\n \tiovec->buf_cnt = index;\n \treturn;\n }\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, struct cpt_inflight_req *infl_req,\n@@ -2592,6 +2578,38 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \treturn ret;\n }\n \n+static inline int\n+fill_passthrough_params(struct rte_crypto_op *cop, struct cpt_inst_s *inst)\n+{\n+\tstruct rte_crypto_sym_op *sym_op = cop->sym;\n+\tstruct rte_mbuf *m_src, *m_dst;\n+\n+\tconst union cpt_inst_w4 w4 = {\n+\t\t.s.opcode_major = ROC_SE_MAJOR_OP_MISC,\n+\t\t.s.opcode_minor = ROC_SE_MISC_MINOR_OP_PASSTHROUGH,\n+\t\t.s.param1 = 1,\n+\t\t.s.param2 = 1,\n+\t\t.s.dlen = 0,\n+\t};\n+\n+\tm_src = sym_op->m_src;\n+\tm_dst = sym_op->m_dst;\n+\n+\tif (unlikely(m_dst != NULL && m_dst != m_src)) {\n+\t\tvoid *src = rte_pktmbuf_mtod_offset(m_src, void *, cop->sym->cipher.data.offset);\n+\t\tvoid *dst = rte_pktmbuf_mtod(m_dst, void *);\n+\t\tint data_len = cop->sym->cipher.data.length;\n+\n+\t\trte_memcpy(dst, src, data_len);\n+\t}\n+\n+\tinst->w0.u64 = 0;\n+\tinst->w5.u64 = 0;\n+\tinst->w4.u64 = w4.u64;\n+\n+\treturn 0;\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@@ -3012,6 +3030,9 @@ cpt_sym_inst_fill(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op, struct cnxk_\n \tint ret;\n \n \tswitch (sess->dp_thr_type) {\n+\tcase CPT_DP_THREAD_TYPE_PT:\n+\t\tret = fill_passthrough_params(op, inst);\n+\t\tbreak;\n \tcase CPT_DP_THREAD_TYPE_PDCP:\n \t\tret = fill_pdcp_params(op, sess, &qp->meta_info, infl_req, inst, is_sg_ver2);\n \t\tbreak;\n",
    "prefixes": [
        "v2",
        "3/8"
    ]
}