get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118783,
    "url": "http://patches.dpdk.org/api/patches/118783/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221020111453.1982947-5-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": "<20221020111453.1982947-5-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221020111453.1982947-5-ktejasree@marvell.com",
    "date": "2022-10-20T11:14:51",
    "name": "[11/13] crypto/cnxk: switch to SG when metabuf is allocated",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "6751dcbf7a30f9eeae7179fe27b8a297474af436",
    "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/20221020111453.1982947-5-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 25341,
            "url": "http://patches.dpdk.org/api/series/25341/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25341",
            "date": "2022-10-20T11:14:47",
            "name": "fixes and improvements to cnxk crypto PMD",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/25341/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118783/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/118783/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 32E1BA0552;\n\tThu, 20 Oct 2022 13:15:23 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B543142D5B;\n\tThu, 20 Oct 2022 13:15:07 +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 2FFF142D45\n for <dev@dpdk.org>; Thu, 20 Oct 2022 13:15:06 +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 29K6Q4Hr008931\n for <dev@dpdk.org>; Thu, 20 Oct 2022 04:15:05 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kb1258wj6-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 20 Oct 2022 04:15:05 -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 Thu, 20 Oct 2022 04:15:04 -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; Thu, 20 Oct 2022 04:15:04 -0700",
            "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 6156E3F70BE;\n Thu, 20 Oct 2022 04:15:02 -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=9aWIQj4UiSZOpWZY1O/NfHVOk3cYDPDPpprKe4qdgwo=;\n b=kS1j0idhbIqcYy121a/w5GBUglDzTixMI5ljUO5m2yAPxkOBQCrKkjgsoNq8DYkNmlc2\n Y8RoiDr/diuifd1oI5/mWWMfy/jrU2uIbSwauWNwY/7ChoS3DLEaKc7HWb/B4FFqtjNG\n 8+cp8GPLQKY9//Jsnrf4rQ2eha8CwcnJAt4YzWfmvB3+zq2ecMYP5FB3j2Q5a+16JJ0b\n iQD9ko96RzH7F0YqAa2hgNYqr9ONTOB4uKgjhUOfRptiUwRuIu/Xtlyd0auEdzJzKCSM\n mSasKDAQAbjB7knliA0qzG7MBziSWQahc19f5HuWmUWz3NkKBMr7YcIkEKioYnMUsQke GA==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Vidya Sagar Velumuri\n <vvelumuri@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH 11/13] crypto/cnxk: switch to SG when metabuf is allocated",
        "Date": "Thu, 20 Oct 2022 16:44:51 +0530",
        "Message-ID": "<20221020111453.1982947-5-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221020111453.1982947-1-ktejasree@marvell.com>",
        "References": "<20221020111453.1982947-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "gDq9rUstLrkTKfMs6FxAUVRuSjGEZ5Sd",
        "X-Proofpoint-ORIG-GUID": "gDq9rUstLrkTKfMs6FxAUVRuSjGEZ5Sd",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-10-20_03,2022-10-20_01,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": "From: Anoob Joseph <anoobj@marvell.com>\n\nMetabuf would be allocated only when SG is required. Check the pointer\ninstead of flags.\n\nCoverity issue: 381018\nFixes: d3bff77cc371 (\"crypto/cnxk: separate out PDCP chain datapath\")\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n drivers/crypto/cnxk/cnxk_se.h | 33 ++++++---------------------------\n 1 file changed, 6 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex abb9965d3e..ac97b864b9 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -1177,14 +1177,7 @@ cpt_enc_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \toffset_ctrl = rte_cpu_to_be_64(((uint64_t)encr_offset << 16) | ((uint64_t)iv_offset << 8) |\n \t\t\t\t       ((uint64_t)auth_offset));\n \n-\t/*\n-\t * In cn9k, cn10k since we have a limitation of\n-\t * IV & Offset control word not part of instruction\n-\t * and need to be part of Data Buffer, we check if\n-\t * head room is there and then only do the Direct mode processing\n-\t */\n-\tif (likely((flags & ROC_SE_SINGLE_BUF_INPLACE) &&\n-\t\t   (flags & ROC_SE_SINGLE_BUF_HEADROOM))) {\n+\tif (likely(fc_params->meta_buf.vaddr == NULL)) {\n \t\tvoid *dm_vaddr = fc_params->bufs[0].vaddr;\n \n \t\t/* Use Direct mode */\n@@ -1336,13 +1329,7 @@ cpt_dec_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,\n \toffset_ctrl = rte_cpu_to_be_64(((uint64_t)encr_offset << 16) | ((uint64_t)iv_offset << 8) |\n \t\t\t\t       ((uint64_t)auth_offset));\n \n-\t/*\n-\t * In cn9k, cn10k since we have a limitation of\n-\t * IV & Offset control word not part of instruction\n-\t * and need to be part of Data Buffer, we check if\n-\t * head room is there and then only do the Direct mode processing\n-\t */\n-\tif (likely((flags & ROC_SE_SINGLE_BUF_INPLACE) && (flags & ROC_SE_SINGLE_BUF_HEADROOM))) {\n+\tif (likely(fc_params->meta_buf.vaddr == NULL)) {\n \t\tvoid *dm_vaddr = fc_params->bufs[0].vaddr;\n \n \t\t/* Use Direct mode */\n@@ -1398,6 +1385,7 @@ cpt_pdcp_chain_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\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+\tvoid *m_vaddr = params->meta_buf.vaddr;\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@@ -1462,8 +1450,7 @@ cpt_pdcp_chain_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \n \tinputlen += (encr_offset + pad_len);\n \n-\tif (likely(((req_flags & ROC_SE_SINGLE_BUF_INPLACE)) &&\n-\t\t   ((req_flags & ROC_SE_SINGLE_BUF_HEADROOM)))) {\n+\tif (likely(m_vaddr == NULL)) {\n \n \t\tdm_vaddr = params->bufs[0].vaddr;\n \n@@ -1489,9 +1476,7 @@ cpt_pdcp_chain_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\tpdcp_iv_copy(iv_d, auth_iv, pdcp_auth_alg, pack_iv);\n \n \t} else {\n-\n \t\tstruct roc_se_sglist_comp *scatter_comp, *gather_comp;\n-\t\tvoid *m_vaddr = params->meta_buf.vaddr;\n \t\tuint32_t i, g_size_bytes, s_size_bytes;\n \t\tuint8_t *in_buffer;\n \t\tuint32_t size;\n@@ -1711,14 +1696,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \tcpt_inst_w4.s.param1 = encr_data_len;\n \tcpt_inst_w4.s.param2 = auth_data_len;\n \n-\t/*\n-\t * In cn9k, cn10k since we have a limitation of\n-\t * IV & Offset control word not part of instruction\n-\t * and need to be part of Data Buffer, we check if\n-\t * head room is there and then only do the Direct mode processing\n-\t */\n-\tif (likely((req_flags & ROC_SE_SINGLE_BUF_INPLACE) &&\n-\t\t   (req_flags & ROC_SE_SINGLE_BUF_HEADROOM))) {\n+\tif (likely(params->meta_buf.vaddr == NULL)) {\n \t\tvoid *dm_vaddr = params->bufs[0].vaddr;\n \n \t\t/* Use Direct mode */\n@@ -2889,6 +2867,7 @@ fill_pdcp_chain_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,\n \t\t}\n \t}\n \n+\tfc_params.meta_buf.vaddr = NULL;\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",
    "prefixes": [
        "11/13"
    ]
}