From patchwork Mon Nov 28 09:54:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 120204 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 87B2FA00C3; Mon, 28 Nov 2022 10:55:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B33B342D24; Mon, 28 Nov 2022 10:55:14 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2C81242D24 for ; Mon, 28 Nov 2022 10:55:13 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AS5j8I0025921 for ; Mon, 28 Nov 2022 01:55:12 -0800 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=kbwopKTSnerPo6gkiwDtp4TV0/NU0qhmdwzx7gvjr24=; b=gQ1c9kPitbaGhw2C28DKrpxSAK87yVhxvHie8lJYTY2SM/aBl1rIsLrN2ASGdteYZIpj M6UpL5olS0UctohUdA+BM6Z6BLswrbfa3ft6HImIwl4PNHQqxmFB6yB3aqj+ZcEecmn3 0FClsRnG66lOil1TkLycT8PcjLZyrUDhdckiI2TAC+EUR+fErFYNVCQNR/sT3ekYfi2y aEW29uMBJBnAmJSlYFQ/kGZp3/xtXISnYQ+oDWjEHEdiyymRvE3GhDpy6R5DC+FR0Y+2 gSxQALUHh4lX0g+dVMaVhMBWXvY18VA9j4umQnnNYtGeYYMJ4QuGr8OZrS4r03GGGqS5 ug== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3m4q3srsg4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 28 Nov 2022 01:55:12 -0800 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; Mon, 28 Nov 2022 01:55:10 -0800 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; Mon, 28 Nov 2022 01:55:10 -0800 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 8D8783F7064; Mon, 28 Nov 2022 01:55:08 -0800 (PST) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH 08/11] common/cnxk: use lcore LMT line for CPT context write Date: Mon, 28 Nov 2022 15:24:39 +0530 Message-ID: <20221128095442.3185112-8-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221128095442.3185112-1-ndabilpuram@marvell.com> References: <20221128095442.3185112-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: TDGQMe8AYhrVmtbRCd1YPR5SSa2yy_ty X-Proofpoint-GUID: TDGQMe8AYhrVmtbRCd1YPR5SSa2yy_ty X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_07,2022-11-25_01,2022-06-22_01 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 Use lcore LMT line for CPT context write as no one else is using it. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_cpt.c | 3 ++- drivers/common/cnxk/roc_io.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c index 9a90d4d853..e336edb77e 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -1020,7 +1020,8 @@ roc_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa_dptr, void *sa_cptr, uint64_t *dptr; int i; - ROC_LMT_CPT_BASE_ID_GET(lmt_base, lmt_id); + /* Use this lcore's LMT line as no one else is using it */ + ROC_LMT_BASE_ID_GET(lmt_base, lmt_id); inst = (struct cpt_inst_s *)lmt_base; memset(inst, 0, sizeof(struct cpt_inst_s)); diff --git a/drivers/common/cnxk/roc_io.h b/drivers/common/cnxk/roc_io.h index 13f98ed549..1e5c1f8c04 100644 --- a/drivers/common/cnxk/roc_io.h +++ b/drivers/common/cnxk/roc_io.h @@ -7,6 +7,7 @@ #include "roc_platform.h" /* for __plt_always_inline macro */ +#ifndef ROC_LMT_BASE_ID_GET #define ROC_LMT_BASE_ID_GET(lmt_addr, lmt_id) \ do { \ /* 32 Lines per core */ \ @@ -14,7 +15,10 @@ /* Each line is of 128B */ \ (lmt_addr) += ((uint64_t)lmt_id << ROC_LMT_LINE_SIZE_LOG2); \ } while (0) +#endif +/* Define it if not defined in roc_platform.h */ +#ifndef ROC_LMT_CPT_BASE_ID_GET #define ROC_LMT_CPT_BASE_ID_GET(lmt_addr, lmt_id) \ do { \ /* 16 Lines per core */ \ @@ -23,6 +27,7 @@ /* Each line is of 128B */ \ (lmt_addr) += ((uint64_t)lmt_id << ROC_LMT_LINE_SIZE_LOG2); \ } while (0) +#endif #define roc_load_pair(val0, val1, addr) \ ({ \