From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B8D4A0524; Wed, 2 Jun 2021 17:57:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03E7841100; Wed, 2 Jun 2021 17:57:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7C1F3410DF for ; Wed, 2 Jun 2021 17:57:16 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 152FpJOQ019770; Wed, 2 Jun 2021 08:57:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=GV1vFq+iOP2RuH2egBsUldkNRkMwt12csHia3QZWFJw=; b=Z48i7Wo5VotH5hhTmWhUzx/94+6ESq4Oe1nV6vF73Qv7s1OoPm+9XnWBK/XCcBPM0syd MQWaXS5lMzeEUx1rjfrLb/N20GvxJzMFImJJN5bXEBa7DQE6Pk8MDE6r9xcQ+Ege5IUR KZXiPefxRXlnv34FcuT1xpT+cq7ucGcZrjdzd+J2iV1XX1yIctSYWDvzRlg0wKeFR/IK ptkvKS7YZ7nEv8mIveJ5hFhjyfDh5ard/0Or7X7UXNOHo9kHeZCbWvTAx7pcTNK2vLD5 IEshLuYDG2XSzkP9zps0Gx50nNzCe/k4ttT51JbjZb+Pp1H8xj7BrYTIx9DfRPm3iXXZ Tg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 38wufguhds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 02 Jun 2021 08:57:15 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Jun 2021 08:57:13 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 2 Jun 2021 08:57:14 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.1]) by maili.marvell.com (Postfix) with ESMTP id B45EA3F7041; Wed, 2 Jun 2021 08:57:10 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Thomas Monjalon CC: Aakash Sasidharan , Jerin Jacob , Ankur Dwivedi , Tejasree Kondoj , , Vidya Sagar Velumuri Date: Wed, 2 Jun 2021 21:26:20 +0530 Message-ID: <1622649385-22652-7-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1622649385-22652-1-git-send-email-anoobj@marvell.com> References: <1622649385-22652-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 4DPpDXtCZ4MiXh05LTMl51OG5U41E2wx X-Proofpoint-GUID: 4DPpDXtCZ4MiXh05LTMl51OG5U41E2wx X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-02_08:2021-06-02, 2021-06-02 signatures=0 Subject: [dpdk-dev] [PATCH 06/11] common/cnxk: add CPT LF flush X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Aakash Sasidharan Add routine to flush context from CPT context processor cache. Signed-off-by: Aakash Sasidharan Signed-off-by: Vidya Sagar Velumuri --- drivers/common/cnxk/roc_cpt.c | 18 ++++++++++++++++++ drivers/common/cnxk/roc_cpt.h | 1 + drivers/common/cnxk/version.map | 1 + 3 files changed, 20 insertions(+) diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c index a23e4bb..d95b94c 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -477,6 +477,24 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt) return rc; } +int +roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, uint64_t cptr) +{ + union cpt_lf_ctx_flush reg; + + if (lf == NULL) + return -ENOTSUP; + + reg.u = 0; + reg.s.pf_func = lf->pf_func; + reg.s.inval = 1; + reg.s.cptr = cptr; + + plt_write64(reg.u, lf->rbase + CPT_LF_CTX_FLUSH); + + return 0; +} + void roc_cpt_lf_fini(struct roc_cpt_lf *lf) { diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h index 692fa79..2b43a5a 100644 --- a/drivers/common/cnxk/roc_cpt.h +++ b/drivers/common/cnxk/roc_cpt.h @@ -58,6 +58,7 @@ int __roc_api roc_cpt_dev_configure(struct roc_cpt *roc_cpt, int nb_lf); void __roc_api roc_cpt_dev_clear(struct roc_cpt *roc_cpt); int __roc_api roc_cpt_lf_init(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf); void __roc_api roc_cpt_lf_fini(struct roc_cpt_lf *lf); +int __roc_api roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, uint64_t cptr); int __roc_api roc_cpt_afs_print(struct roc_cpt *roc_cpt); int __roc_api roc_cpt_lfs_print(struct roc_cpt *roc_cpt); void __roc_api roc_cpt_iq_disable(struct roc_cpt_lf *lf); diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index 4f28f64..ad559a4 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -18,6 +18,7 @@ INTERNAL { roc_cpt_dev_init; roc_cpt_eng_grp_add; roc_cpt_iq_disable; + roc_cpt_lf_ctx_flush; roc_cpt_lf_init; roc_cpt_lf_fini; roc_cpt_lfs_print; -- 2.7.4