Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128791/?format=api
http://patchwork.dpdk.org/api/patches/128791/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230619124528.3967275-3-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": "<20230619124528.3967275-3-ktejasree@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230619124528.3967275-3-ktejasree@marvell.com", "date": "2023-06-19T12:45:22", "name": "[2/8] crypto/cnxk: remove packet length checks in crypto offload", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "082633c1b356e0815725d923c16347a8ea36e2ee", "submitter": { "id": 1789, "url": "http://patchwork.dpdk.org/api/people/1789/?format=api", "name": "Tejasree Kondoj", "email": "ktejasree@marvell.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230619124528.3967275-3-ktejasree@marvell.com/mbox/", "series": [ { "id": 28566, "url": "http://patchwork.dpdk.org/api/series/28566/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28566", "date": "2023-06-19T12:45:20", "name": "fixes and improvements to CNXK crypto PMD", "version": 1, "mbox": "http://patchwork.dpdk.org/series/28566/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/128791/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/128791/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 A54A842CFA;\n\tMon, 19 Jun 2023 14:45:50 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6002142D12;\n\tMon, 19 Jun 2023 14:45:41 +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 9A23442BDA\n for <dev@dpdk.org>; Mon, 19 Jun 2023 14:45:39 +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 35JBUFxR012520 for <dev@dpdk.org>; Mon, 19 Jun 2023 05:45:38 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r9a6n5hkt-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 19 Jun 2023 05:45:38 -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, 19 Jun 2023 05:45:37 -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, 19 Jun 2023 05:45:37 -0700", "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 1352D5C68EB;\n Mon, 19 Jun 2023 05:45:34 -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=VqH42p6BgQsUFHix2v6rh1BZV4LfWPBhmzbFqKCpAjo=;\n b=OL2sKH8pG8vjiFqx3c4un7nbH3LP2mc/6/yvWo/S7GIk0jc2PAuLa8RLWpbx5nDNOc1h\n r7+tCRcFn+C6pTQQist+DJSltXxwKAjCxO9tdq9GxIEj+NMymKM8ORoRzFo/Xlt36HPc\n kFEoxTPfvA7yGf9eKXS6YDdORPdHKAqmIKioNQUM/s3M/BD48cXTuYUBEt2ldArwYIaG\n X4kzOJ8GufQSi0wYkPKUT6efmE5U8Cz9YUOJWkGPRNLdbK1sXZGEwFbUssEtwqqy1oI8\n yzz8irGMqehovdIRuF6WKhgFYm3/loo21sG+FNDPB1C8fF1xq5b9FA/kko7JD0uE52p6 Bw==", "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 2/8] crypto/cnxk: remove packet length checks in crypto\n offload", "Date": "Mon, 19 Jun 2023 18:15:22 +0530", "Message-ID": "<20230619124528.3967275-3-ktejasree@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230619124528.3967275-1-ktejasree@marvell.com>", "References": "<20230619124528.3967275-1-ktejasree@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "gK5hSWv1qIeGQgrAiTiYdehiZYKmuFM1", "X-Proofpoint-GUID": "gK5hSWv1qIeGQgrAiTiYdehiZYKmuFM1", "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-19_09,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: Anoob Joseph <anoobj@marvell.com>\n\nWhen performing crypto offload, the packet length of the input/output\nbuffer does not matter. The length that matters is the\ncipher/authentication range specified in crypto_op. Since application\ncan request for ciphering of a small portion of the buffer, the extra\ncomparison of buffer lengths may result in false failures during\nenqueue of OOP operations.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n drivers/crypto/cnxk/cnxk_se.h | 54 +++--------------------------------\n 1 file changed, 4 insertions(+), 50 deletions(-)", "diff": "diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex a85e4c5170..87414eb131 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -2539,23 +2539,6 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\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@@ -2650,32 +2633,18 @@ fill_pdcp_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\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\tuint32_t pkt_len;\n-\n \t\t/* Out of place processing */\n+\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\tif (unlikely(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\t/* Try to make room as much as src has */\n-\t\tpkt_len = rte_pktmbuf_pkt_len(m_dst);\n-\n-\t\tif (unlikely(pkt_len < rte_pktmbuf_pkt_len(m_src))) {\n-\t\t\tpkt_len = rte_pktmbuf_pkt_len(m_src) - pkt_len;\n-\t\t\tif (unlikely(rte_pktmbuf_append(m_dst, pkt_len) == NULL)) {\n-\t\t\t\tplt_dp_err(\"Not enough space in m_dst %p, need %u more\", m_dst,\n-\t\t\t\t\t pkt_len);\n-\t\t\t\tret = -EINVAL;\n-\t\t\t\tgoto err_exit;\n-\t\t\t}\n-\t\t}\n-\n \t\tif (unlikely(prepare_iov_from_pkt(m_dst, fc_params.dst_iov, 0))) {\n \t\t\tplt_dp_err(\"Prepare dst iov failed for m_dst %p\", m_dst);\n \t\t\tret = -EINVAL;\n@@ -2689,7 +2658,8 @@ fill_pdcp_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\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\tret = -ENOMEM;\n+\t\t\tgoto err_exit;\n \t\t}\n \t}\n \n@@ -2798,22 +2768,6 @@ fill_pdcp_chain_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\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 m_dst \"\n-\t\t\t\t\t\t \"%p, need %u 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 (unlikely(prepare_iov_from_pkt(m_dst, fc_params.dst_iov, 0))) {\n \t\t\t\tplt_dp_err(\"Could not prepare m_dst iov %p\", m_dst);\n \t\t\t\tret = -EINVAL;\n", "prefixes": [ "2/8" ] }{ "id": 128791, "url": "