get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97606,
    "url": "http://patchwork.dpdk.org/api/patches/97606/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210831140127.31775-5-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": "<20210831140127.31775-5-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210831140127.31775-5-ktejasree@marvell.com",
    "date": "2021-08-31T14:01:23",
    "name": "[4/8] crypto/cnxk: use rlen from CPT result with lookaside",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9b297114f20204b32d0498a5e47d294145b3e63a",
    "submitter": {
        "id": 1789,
        "url": "http://patchwork.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@marvell.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210831140127.31775-5-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 18562,
            "url": "http://patchwork.dpdk.org/api/series/18562/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18562",
            "date": "2021-08-31T14:01:19",
            "name": "add lookaside IPsec additional features",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18562/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97606/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97606/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 333B0A0C46;\n\tTue, 31 Aug 2021 15:08:23 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 223B540E78;\n\tTue, 31 Aug 2021 15:08:23 +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 12B0340E78\n for <dev@dpdk.org>; Tue, 31 Aug 2021 15:08:20 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17VCMRwx029338\n for <dev@dpdk.org>; Tue, 31 Aug 2021 06:08:20 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 3asf15hhmm-3\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 31 Aug 2021 06:08:20 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 31 Aug 2021 06:08:18 -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.18 via Frontend\n Transport; Tue, 31 Aug 2021 06:08:18 -0700",
            "from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 6BAF75B6926;\n Tue, 31 Aug 2021 06:08:15 -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=BvVBskFpXqL3N3xVEd19mNQv3g19pam59TQnzbhbIQ4=;\n b=PI5we9G1VB9ViRMz+/zK5cIJWfi3d2d0Df8egpFloc7V12GDi5F2cfzWIgCtBpHXa6do\n LmBqrB3RxpfXSLqY11YPNBMx2ZzIDtp40gsjMs1ZOddhBrvVw6zTKIuRKhbro4WmKMO7\n 65GBfqhs6bc30JVZGiqr7UTKnu8x4vz5528UGGagllXqs/BKrPAhw2Od7fCTi06BO4LX\n Z2zHGZYTrZny4dYsNoFF/6n5a2A/lSuaQpNKWVjkfkqtCKvCyKgU+TQ+tEk28R0pPcb2\n cPyqp4yEz4feXCM65gXwXBQR7QqWa3Hgx4ve+gxtCE6JPwxjCMqvqNmEs7aE/Y7yFidA BA==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>,\n Anoob Joseph <anoobj@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>, Archana Muniganti\n <marchana@marvell.com>, Srujana Challa <schalla@marvell.com>, \"Nithin\n Dabilpuram\" <ndabilpuram@marvell.com>,\n Jerin Jacob <jerinj@marvell.com>, <dev@dpdk.org>",
        "Date": "Tue, 31 Aug 2021 19:31:23 +0530",
        "Message-ID": "<20210831140127.31775-5-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210831140127.31775-1-ktejasree@marvell.com>",
        "References": "<20210831140127.31775-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "Rx4_6ZLNG2D7BqH_TYiNVnnIu1ao4o9B",
        "X-Proofpoint-GUID": "Rx4_6ZLNG2D7BqH_TYiNVnnIu1ao4o9B",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-08-31_05,2021-08-31_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH 4/8] crypto/cnxk: use rlen from CPT result with\n lookaside",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Use rlen from CPT result with lookaside operations\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 40 ++++++-----------------\n drivers/crypto/cnxk/cn10k_ipsec.c         |  4 +--\n drivers/crypto/cnxk/cn10k_ipsec.h         |  4 +--\n drivers/crypto/cnxk/cn10k_ipsec_la_ops.h  | 28 ++--------------\n 4 files changed, 15 insertions(+), 61 deletions(-)",
    "diff": "diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\nindex 15f66c2515..780a321cf7 100644\n--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\n+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c\n@@ -48,7 +48,7 @@ cn10k_cpt_sym_temp_sess_create(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op)\n \n static __rte_always_inline int __rte_hot\n cpt_sec_inst_fill(struct rte_crypto_op *op, struct cn10k_sec_session *sess,\n-\t\t  struct cpt_inflight_req *infl_req, struct cpt_inst_s *inst)\n+\t\t  struct cpt_inst_s *inst)\n {\n \tstruct rte_crypto_sym_op *sym_op = op->sym;\n \tunion roc_ot_ipsec_sa_word2 *w2;\n@@ -70,10 +70,8 @@ cpt_sec_inst_fill(struct rte_crypto_op *op, struct cn10k_sec_session *sess,\n \n \tif (w2->s.dir == ROC_IE_OT_SA_DIR_OUTBOUND)\n \t\tret = process_outb_sa(op, sa, inst);\n-\telse {\n-\t\tinfl_req->op_flags |= CPT_OP_FLAGS_IPSEC_DIR_INBOUND;\n+\telse\n \t\tret = process_inb_sa(op, sa, inst);\n-\t}\n \n \treturn ret;\n }\n@@ -122,8 +120,7 @@ cn10k_cpt_fill_inst(struct cnxk_cpt_qp *qp, struct rte_crypto_op *ops[],\n \t\tif (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {\n \t\t\tsec_sess = get_sec_session_private_data(\n \t\t\t\tsym_op->sec_session);\n-\t\t\tret = cpt_sec_inst_fill(op, sec_sess, infl_req,\n-\t\t\t\t\t\t&inst[0]);\n+\t\t\tret = cpt_sec_inst_fill(op, sec_sess, &inst[0]);\n \t\t\tif (unlikely(ret))\n \t\t\t\treturn 0;\n \t\t\tw7 = sec_sess->sa.inst.w7;\n@@ -334,30 +331,13 @@ cn10k_cpt_crypto_adapter_enqueue(uintptr_t tag_op, struct rte_crypto_op *op)\n \n static inline void\n cn10k_cpt_sec_post_process(struct rte_crypto_op *cop,\n-\t\t\t   struct cpt_inflight_req *infl_req)\n+\t\t\t   struct cpt_cn10k_res_s *res)\n {\n-\tstruct rte_crypto_sym_op *sym_op = cop->sym;\n-\tstruct rte_mbuf *m = sym_op->m_src;\n-\tstruct rte_ipv6_hdr *ip6;\n-\tstruct rte_ipv4_hdr *ip;\n-\tuint16_t m_len;\n-\n-\tif (infl_req->op_flags & CPT_OP_FLAGS_IPSEC_DIR_INBOUND) {\n-\t\tip = (struct rte_ipv4_hdr *)rte_pktmbuf_mtod(m, char *);\n-\n-\t\tif (((ip->version_ihl & 0xf0) >> RTE_IPV4_IHL_MULTIPLIER) ==\n-\t\t    IPVERSION) {\n-\t\t\tm_len = rte_be_to_cpu_16(ip->total_length);\n-\t\t} else {\n-\t\t\tPLT_ASSERT(((ip->version_ihl & 0xf0) >>\n-\t\t\t\t    RTE_IPV4_IHL_MULTIPLIER) == 6);\n-\t\t\tip6 = (struct rte_ipv6_hdr *)ip;\n-\t\t\tm_len = rte_be_to_cpu_16(ip6->payload_len) +\n-\t\t\t\tsizeof(struct rte_ipv6_hdr);\n-\t\t}\n-\t\tm->data_len = m_len;\n-\t\tm->pkt_len = m_len;\n-\t}\n+\tstruct rte_mbuf *m = cop->sym->m_src;\n+\tconst uint16_t m_len = res->rlen;\n+\n+\tm->data_len = m_len;\n+\tm->pkt_len = m_len;\n }\n \n static inline void\n@@ -385,7 +365,7 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp,\n \t\tcop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n \t\tif (cop->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {\n \t\t\tif (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {\n-\t\t\t\tcn10k_cpt_sec_post_process(cop, infl_req);\n+\t\t\t\tcn10k_cpt_sec_post_process(cop, res);\n \t\t\t\treturn;\n \t\t\t}\n \ndiff --git a/drivers/crypto/cnxk/cn10k_ipsec.c b/drivers/crypto/cnxk/cn10k_ipsec.c\nindex 944e0a7e3b..98110872a3 100644\n--- a/drivers/crypto/cnxk/cn10k_ipsec.c\n+++ b/drivers/crypto/cnxk/cn10k_ipsec.c\n@@ -176,9 +176,7 @@ cn10k_ipsec_outb_sa_create(struct roc_cpt *roc_cpt,\n \tif (ret)\n \t\treturn ret;\n \n-\tsa->partial_len = rlens.partial_len;\n-\tsa->roundup_byte = rlens.roundup_byte;\n-\tsa->roundup_len = rlens.roundup_len;\n+\tsa->max_extended_len = rlens.max_extended_len;\n \n \t/* pre-populate CPT INST word 4 */\n \tinst_w4.u64 = 0;\ndiff --git a/drivers/crypto/cnxk/cn10k_ipsec.h b/drivers/crypto/cnxk/cn10k_ipsec.h\nindex c30492e149..bc52c60179 100644\n--- a/drivers/crypto/cnxk/cn10k_ipsec.h\n+++ b/drivers/crypto/cnxk/cn10k_ipsec.h\n@@ -20,9 +20,7 @@ struct cn10k_ipsec_sa {\n \t};\n \t/** Pre-populated CPT inst words */\n \tstruct cnxk_cpt_inst_tmpl inst;\n-\tuint8_t partial_len;\n-\tuint8_t roundup_len;\n-\tuint8_t roundup_byte;\n+\tuint16_t max_extended_len;\n };\n \n struct cn10k_sec_session {\ndiff --git a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h\nindex 1e9ebb594a..fe91638c99 100644\n--- a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h\n+++ b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h\n@@ -12,40 +12,21 @@\n #include \"cn10k_ipsec.h\"\n #include \"cnxk_cryptodev.h\"\n \n-static __rte_always_inline int32_t\n-ipsec_po_out_rlen_get(struct cn10k_ipsec_sa *sess, uint32_t plen)\n-{\n-\tuint32_t enc_payload_len;\n-\n-\tenc_payload_len =\n-\t\tRTE_ALIGN_CEIL(plen + sess->roundup_len, sess->roundup_byte);\n-\n-\treturn sess->partial_len + enc_payload_len;\n-}\n-\n static __rte_always_inline int\n process_outb_sa(struct rte_crypto_op *cop, struct cn10k_ipsec_sa *sess,\n \t\tstruct cpt_inst_s *inst)\n {\n \tstruct rte_crypto_sym_op *sym_op = cop->sym;\n \tstruct rte_mbuf *m_src = sym_op->m_src;\n-\tuint32_t dlen, rlen, extend_tail;\n-\tchar *mdata;\n-\n-\tdlen = rte_pktmbuf_pkt_len(m_src);\n-\trlen = ipsec_po_out_rlen_get(sess, dlen);\n \n-\textend_tail = rlen - dlen;\n-\n-\tmdata = rte_pktmbuf_append(m_src, extend_tail);\n-\tif (unlikely(mdata == NULL)) {\n+\tif (unlikely(rte_pktmbuf_tailroom(m_src) < sess->max_extended_len)) {\n \t\tplt_dp_err(\"Not enough tail room\");\n \t\treturn -ENOMEM;\n \t}\n \n \t/* Prepare CPT instruction */\n \tinst->w4.u64 = sess->inst.w4;\n-\tinst->w4.s.dlen = dlen;\n+\tinst->w4.s.dlen = rte_pktmbuf_pkt_len(m_src);\n \tinst->dptr = rte_pktmbuf_iova(m_src);\n \tinst->rptr = inst->dptr;\n \n@@ -58,13 +39,10 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn10k_ipsec_sa *sa,\n {\n \tstruct rte_crypto_sym_op *sym_op = cop->sym;\n \tstruct rte_mbuf *m_src = sym_op->m_src;\n-\tuint32_t dlen;\n-\n-\tdlen = rte_pktmbuf_pkt_len(m_src);\n \n \t/* Prepare CPT instruction */\n \tinst->w4.u64 = sa->inst.w4;\n-\tinst->w4.s.dlen = dlen;\n+\tinst->w4.s.dlen = rte_pktmbuf_pkt_len(m_src);\n \tinst->dptr = rte_pktmbuf_iova(m_src);\n \tinst->rptr = inst->dptr;\n \n",
    "prefixes": [
        "4/8"
    ]
}