Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/124483/?format=api
http://patchwork.dpdk.org/api/patches/124483/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230224054813.2855914-7-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": "<20230224054813.2855914-7-ktejasree@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230224054813.2855914-7-ktejasree@marvell.com", "date": "2023-02-24T05:48:08", "name": "[06/11] common/cnxk: ensure flush inval completion with CSR read", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "14ffc17c1bc8756b11bdeffa25935a00bb4b7dea", "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/20230224054813.2855914-7-ktejasree@marvell.com/mbox/", "series": [ { "id": 27165, "url": "http://patchwork.dpdk.org/api/series/27165/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27165", "date": "2023-02-24T05:48:02", "name": "fixes and improvements to cnxk crypto PMD", "version": 1, "mbox": "http://patchwork.dpdk.org/series/27165/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/124483/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/124483/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 DBC8441D5B;\n\tFri, 24 Feb 2023 06:48:57 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C7EB442C4D;\n\tFri, 24 Feb 2023 06:48:32 +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 1D3AB41143\n for <dev@dpdk.org>; Fri, 24 Feb 2023 06:48: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 31O3LIBH005076 for <dev@dpdk.org>; Thu, 23 Feb 2023 21:48:30 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nxfkwa3bw-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 23 Feb 2023 21:48:30 -0800", "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.42;\n Thu, 23 Feb 2023 21:48: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; Thu, 23 Feb 2023 21:48:28 -0800", "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id CD2E73F7070;\n Thu, 23 Feb 2023 21:48:26 -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=LuaS8kqHvAYf79lxIdW6HOc4vSSNAZm+hqq88oGlnllMqILXiEG+Hb4wzMeCQm/Q5H88\n toZKaTp66X0iqXx4uAXbcthBFnfYJbg3qnOKNDzrYOa9bhF7gRgWRrcGbQhq6hBNV4Xz\n hxuJhAuGPWsmOnJq64xlYMyY6f+4Ii3NAJCmJBmT43oA4bZo0byse30UNi53yt6Wy2gO\n okEkiRGrssybv2+zYEa4habqsNoI6fgUxkjNIWqEr0lLf86swJnLe6EHfGQgiFXOvdOg\n 3N2H6Tm3+qfAfL5GvuUbctt1gLm3XQwMTTXkYKFao0zMNeb/KF8gW1lzUmx2OiQahEv8 wA==", "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 06/11] common/cnxk: ensure flush inval completion with CSR\n read", "Date": "Fri, 24 Feb 2023 11:18:08 +0530", "Message-ID": "<20230224054813.2855914-7-ktejasree@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230224054813.2855914-1-ktejasree@marvell.com>", "References": "<20230224054813.2855914-1-ktejasree@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "ERvms1ocyD5VV8opp7mM8xM7SEzH1jW4", "X-Proofpoint-ORIG-GUID": "ERvms1ocyD5VV8opp7mM8xM7SEzH1jW4", "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_02,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": [ "06/11" ] }{ "id": 124483, "url": "