Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/124512/?format=api
http://patches.dpdk.org/api/patches/124512/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230224094014.3246764-7-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": "<20230224094014.3246764-7-ktejasree@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230224094014.3246764-7-ktejasree@marvell.com", "date": "2023-02-24T09:40:09", "name": "[v2,06/11] common/cnxk: ensure flush inval completion with CSR read", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "14ffc17c1bc8756b11bdeffa25935a00bb4b7dea", "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/20230224094014.3246764-7-ktejasree@marvell.com/mbox/", "series": [ { "id": 27169, "url": "http://patches.dpdk.org/api/series/27169/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27169", "date": "2023-02-24T09:40:03", "name": "fixes and improvements to cnxk crypto PMD", "version": 2, "mbox": "http://patches.dpdk.org/series/27169/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/124512/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/124512/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 4784A41D5F;\n\tFri, 24 Feb 2023 10:41:02 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6C19F42BB1;\n\tFri, 24 Feb 2023 10:40:34 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id D03254161A\n for <dev@dpdk.org>; Fri, 24 Feb 2023 10:40:31 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 31O6nQhq032724 for <dev@dpdk.org>; Fri, 24 Feb 2023 01:40:31 -0800", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nxfkwb2h9-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 24 Feb 2023 01:40:31 -0800", "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.42;\n Fri, 24 Feb 2023 01:40:28 -0800", "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.42 via Frontend\n Transport; Fri, 24 Feb 2023 01:40:28 -0800", "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 5BF935B692A;\n Fri, 24 Feb 2023 01:40:27 -0800 (PST)" ], "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=Sg0ujwxArllnOhBwOP1bL5V+tOBeY3susLa8FGs75GI=;\n b=GknjlZ3I/ZY7qG/7YTlGjdzrVAgoqWYJPdnaLIX0vHyBUNPNb+SZHap1Za+t13Dorxry\n CXtLAawgSFol9/CVSSv/4xphSwYQeYMiA8ncNTzJQy+7feqmb/KFRqcDVn6cqYHvCNVy\n Kwqh7PBzCfw3sAKSRVrs+3P/CktsNsHnmL58qOJNr+W4/gV0H3/WRYOWJSWQmY9Z79By\n gFeuAdYlVjS/rsYsujimV9503mwpr2O5uq7VgOvW0vUydLWzbn8wNokfi+V+W5nCikx/\n HUoZItbikPONiY/ZpoUpzjPJR/GBZu6dFT5g9YKP3aaAu95Z3/tSa/NXOiRbLaROFWDK Yw==", "From": "Tejasree Kondoj <ktejasree@marvell.com>", "To": "Akhil Goyal <gakhil@marvell.com>", "CC": "Anoob Joseph <anoobj@marvell.com>, Gowrishankar Muthukrishnan\n <gmuthukrishn@marvell.com>, <dev@dpdk.org>", "Subject": "[PATCH v2 06/11] common/cnxk: ensure flush inval completion with CSR\n read", "Date": "Fri, 24 Feb 2023 15:10:09 +0530", "Message-ID": "<20230224094014.3246764-7-ktejasree@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230224094014.3246764-1-ktejasree@marvell.com>", "References": "<20230224094014.3246764-1-ktejasree@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "IwydD0UOwxrT287cIr1DpP9fTlwxyRIj", "X-Proofpoint-ORIG-GUID": "IwydD0UOwxrT287cIr1DpP9fTlwxyRIj", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22\n definitions=2023-02-24_05,2023-02-23_01,2023-02-09_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\nIf a CSR read is issued after a write, the read would block till the\nwrite operation is complete. This would help in determining when the\nFLUSH+INVALIDATE operation is complete.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n drivers/common/cnxk/hw/cpt.h | 11 +++++++++++\n drivers/common/cnxk/roc_cpt.c | 16 ++++++++++++++++\n drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 4 ----\n 3 files changed, 27 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h\nindex d378a4eadd..44ff8b08b2 100644\n--- a/drivers/common/cnxk/hw/cpt.h\n+++ b/drivers/common/cnxk/hw/cpt.h\n@@ -100,6 +100,17 @@ union cpt_lf_ctx_flush {\n \t} s;\n };\n \n+union cpt_lf_ctx_err {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t flush_st_flt : 1;\n+\t\tuint64_t busy_flr : 1;\n+\t\tuint64_t busy_sw_flush : 1;\n+\t\tuint64_t reload_faulted : 1;\n+\t\tuint64_t reserved_4_63 : 1;\n+\t} s;\n+};\n+\n union cpt_lf_ctx_reload {\n \tuint64_t u;\n \tstruct {\ndiff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c\nindex cf514be69f..dff2fbf2a4 100644\n--- a/drivers/common/cnxk/roc_cpt.c\n+++ b/drivers/common/cnxk/roc_cpt.c\n@@ -783,6 +783,7 @@ int\n roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr, bool inval)\n {\n \tunion cpt_lf_ctx_flush reg;\n+\tunion cpt_lf_ctx_err err;\n \n \tif (lf == NULL) {\n \t\tplt_err(\"Could not trigger CTX flush\");\n@@ -795,6 +796,21 @@ roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr, bool inval)\n \n \tplt_write64(reg.u, lf->rbase + CPT_LF_CTX_FLUSH);\n \n+\tplt_atomic_thread_fence(__ATOMIC_ACQ_REL);\n+\n+\t/* Read a CSR to ensure that the FLUSH operation is complete */\n+\terr.u = plt_read64(lf->rbase + CPT_LF_CTX_ERR);\n+\n+\tif (err.s.busy_sw_flush && inval) {\n+\t\tplt_err(\"CTX entry could not be invalidated due to active usage.\");\n+\t\treturn -EAGAIN;\n+\t}\n+\n+\tif (err.s.flush_st_flt) {\n+\t\tplt_err(\"CTX flush could not complete due to store fault\");\n+\t\tabort();\n+\t}\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\nindex f03646fe1a..67bd7e3243 100644\n--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\n+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c\n@@ -737,8 +737,6 @@ sym_session_clear(struct rte_cryptodev_sym_session *sess, bool is_session_less)\n \t/* Trigger CTX flush + invalidate to remove from CTX_CACHE */\n \troc_cpt_lf_ctx_flush(sess_priv->lf, &sess_priv->roc_se_ctx.se_ctx, true);\n \n-\tplt_delay_ms(1);\n-\n \tif (sess_priv->roc_se_ctx.auth_key != NULL)\n \t\tplt_free(sess_priv->roc_se_ctx.auth_key);\n \n@@ -767,8 +765,6 @@ cnxk_ae_session_clear(struct rte_cryptodev *dev, struct rte_cryptodev_asym_sessi\n \t/* Trigger CTX flush + invalidate to remove from CTX_CACHE */\n \troc_cpt_lf_ctx_flush(priv->lf, &priv->hw_ctx, true);\n \n-\tplt_delay_ms(1);\n-\n \t/* Free resources allocated in session_cfg */\n \tcnxk_ae_free_session_parameters(priv);\n \n", "prefixes": [ "v2", "06/11" ] }{ "id": 124512, "url": "