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 94C33A0C40; Fri, 25 Jun 2021 07:38:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26CFF40E0F; Fri, 25 Jun 2021 07:37:53 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 9BC8040698 for ; Fri, 25 Jun 2021 07:37:51 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15P5ab9Y018611; Thu, 24 Jun 2021 22:37:50 -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=w0TmYeD6aQgDv/ZZQXAQG4aOHtaVMhp0e5la6BrW3nY=; b=ZV1kMNYx6gT81AGnwnncpubRw4j6bq9AxzMXT3lDsrbaZL7YlwpAQ6kXVWS0bcgnZ177 wmTkK2OhSSzyMU2PghQlDPKd9n//CauxMvQfU9k+lh1o6nhwBXS4Nl5Xvvbs5+UfUYdZ 1Ku+hxfHVxwjZO8cYcjPOCXUCGdj1+Ata0ZLdxJQ5epi5ERURCZehm9nG/qjs+Jp27KT DF554efnw0kT71GqHwkmPkJO/xIpOAmYUt3vcZVdFpVnj3jKgn+3DCjPECdqTF3rVKYM rxN1RdyW6+I8/aKQJ2I/hpJ2acVNaivunMHvCuHk0kIUn5Cjdv5Z/DApuf0UlMYhDYb/ FQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 39d24dhh4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 24 Jun 2021 22:37:50 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 24 Jun 2021 22:37:49 -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.18 via Frontend Transport; Thu, 24 Jun 2021 22:37:49 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 0B2F93F706F; Thu, 24 Jun 2021 22:37:45 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Thomas Monjalon CC: Aakash Sasidharan , Jerin Jacob , Ankur Dwivedi , Tejasree Kondoj , , Vidya Sagar Velumuri Date: Fri, 25 Jun 2021 11:06:40 +0530 Message-ID: <1624599410-29689-9-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1624599410-29689-1-git-send-email-anoobj@marvell.com> References: <1624599410-29689-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 3aORCyoRnsONvFvFVXoyufzmGluD5Nwl X-Proofpoint-ORIG-GUID: 3aORCyoRnsONvFvFVXoyufzmGluD5Nwl X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-25_01:2021-06-24, 2021-06-25 signatures=0 Subject: [dpdk-dev] [PATCH v2 08/17] 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 21c7704..fd92de3 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -599,6 +599,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 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 73ecb4e..022c8ad 100644 --- a/drivers/common/cnxk/roc_cpt.h +++ b/drivers/common/cnxk/roc_cpt.h @@ -63,6 +63,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 87130df..0827b77 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