From patchwork Tue Dec 5 05:52:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 173717 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3232029vqy; Mon, 4 Dec 2023 21:53:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEr7KzvJC4PoUO68v6BbDIVJWAkjUhtfK0I4sgFlIFMlPEJi+XJuMjPmp3s5C9yEbuYEbVd X-Received: by 2002:a05:6870:2b1c:b0:1fb:75a:6d2d with SMTP id ld28-20020a0568702b1c00b001fb075a6d2dmr6947507oab.84.1701755590319; Mon, 04 Dec 2023 21:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701755590; cv=none; d=google.com; s=arc-20160816; b=e+y3LiyCE0kmNmGOEp0QDsJiMqmxvxBv0AGv2DUF/ZxFEaWEpBStOt1GqmrT8TbwoG WVCV8VqdBhJJMrboKzbcz1wHPMgmYTtNBdJb1swdj+xX4SZIxrmdOTUpkj3dqkcDyepE uK9/N0iAZ1ykf5xRimdTvuzzVNcoL/gFT1YK/0WvCg7Mq8IGWElBrqWLmpHT21LikOYa iESQZBEcynZTkZXk0vgdtdqeKG8XL4q7Uqe1BgggqfN2ZK6ZhUyXzlS6+Z+ifKSryHD+ vVxeDp8GLyhhbeKQqaxqaOxNk8GTzDUiBaYSTpYuN5We3SJJ/WpAh20lopAda0xApD/L obaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=gz+tVJfqr9b4cJ1PIAhfd0qQhpx4IETkTf+nnLO9rVE=; fh=HY0X0m8t22/vAHj95xREoxWh6Roau2zCUUWQKPKPfT8=; b=AhrJqYewqPpOiYTIYgi1qFwjl4/AeggfWy+Mjkx3fdPzsQCsy+akCd+a3X+/oFF4lz PgMX78RabRs+Bufqg5lZCwL7oyuHej4lKnI9bG292Ku7V1JlnT/Y8m1YLLWJMjjsOW+d TfFFNiSsRaYBDNy7ojUohp7Csn2ITTY3bmcV0TIGbPqz65utgLINTD4PwL57JRPuqU0G Wye1Ml2W8SfLdpn6K1uVHv7Kx1a+yrb4Zz3RoYuHRUaYb7kMIZhmxtvGaDWqWtYyuWLE LwFgzdbrndmYMRI22NnqeOxaRnI2KNEmg56Y+tjqYZM1ibmXIBGHWoph70KkY0HB0w2H Ucig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=JncF3LfU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v13-20020a655c4d000000b005be264316d6si8785915pgr.598.2023.12.04.21.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 21:53:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=JncF3LfU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E667C80A7F10; Mon, 4 Dec 2023 21:53:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231447AbjLEFwt (ORCPT + 99 others); Tue, 5 Dec 2023 00:52:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjLEFwr (ORCPT ); Tue, 5 Dec 2023 00:52:47 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97B45111; Mon, 4 Dec 2023 21:52:53 -0800 (PST) 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 3B4NxDbq021864; Mon, 4 Dec 2023 21:52:47 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=gz+tVJfqr9b4cJ1PIAhfd0qQhpx4IETkTf+nnLO9rVE=; b=JncF3LfUPAOwZii74e1W4YDfiNEWzsbYXxqOHKPBKIcNKgSnSMLCQM5PlJ6NBNpT+odW oHNIac6mQ3O+pe1oOJt+LoXMNq4qdcsB/nwb8VA6Y4FZ6/HgtAYDa+Ew7fqIOl2BG3Io efJmA6I/2EbGmpXf4J0ayNke+tq/R4SCb3B/M4wLTN37saf3luJCNSE8MZ/DZbev8stm l8u633EmUWSIiJ6TFLWFdM01mjTIxTOr+6fMJpGx2ixH2kIpsbXgmdw+2X7WckFJnXlk yaKujh9ms2oj2RojPz2fofLkOJV8+G4hdaUyyxJ8yd/iAKrdZHf1tsho/+OPMQvombI/ Rg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3usrx3gv2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 21:52:47 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 4 Dec 2023 21:52:45 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 4 Dec 2023 21:52:46 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 5338C3F708E; Mon, 4 Dec 2023 21:52:42 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , , , Subject: [net-next v2 PATCH] octeontx2-af: cn10k: Increase outstanding LMTST transactions Date: Tue, 5 Dec 2023 11:22:41 +0530 Message-ID: <20231205055241.26355-1-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-GUID: hhgGwmqkIge8U7rlBUQwGEd6qemZecI8 X-Proofpoint-ORIG-GUID: hhgGwmqkIge8U7rlBUQwGEd6qemZecI8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-05_03,2023-12-04_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 04 Dec 2023 21:53:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784420070119727690 X-GMAIL-MSGID: 1784420070119727690 From: Pavan Nikhilesh Currently the number of outstanding store transactions issued by AP as a part of LMTST operation is set to 1 i.e default value. This patch set to max supported value to increase the performance. Signed-off-by: Pavan Nikhilesh Signed-off-by: Geetha sowjanya --- v1-v2: used FIELD_PREP marco. drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 +++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 + drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 9 +++++++++ drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h | 2 ++ 4 files changed, 15 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index 22c395c7d040..14bb91b98f97 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -935,6 +935,9 @@ static int rvu_setup_hw_resources(struct rvu *rvu) hw->total_vfs = (cfg >> 20) & 0xFFF; hw->max_vfs_per_pf = (cfg >> 40) & 0xFF; + if (!is_rvu_otx2(rvu)) + rvu_apr_block_cn10k_init(rvu); + /* Init NPA LF's bitmap */ block = &hw->block[BLKADDR_NPA]; if (!block->implemented) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h index c4d999ef5ab4..6546cc489d7e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h @@ -940,6 +940,7 @@ void rvu_nix_block_cn10k_init(struct rvu *rvu, struct nix_hw *nix_hw); /* CN10K RVU - LMT*/ void rvu_reset_lmt_map_tbl(struct rvu *rvu, u16 pcifunc); +void rvu_apr_block_cn10k_init(struct rvu *rvu); #ifdef CONFIG_DEBUG_FS void rvu_dbg_init(struct rvu *rvu); diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c index 0e74c5a2231e..7fa98aeb3663 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c @@ -559,3 +559,12 @@ void rvu_nix_block_cn10k_init(struct rvu *rvu, struct nix_hw *nix_hw) cfg |= BIT_ULL(1) | BIT_ULL(2); rvu_write64(rvu, blkaddr, NIX_AF_CFG, cfg); } + +void rvu_apr_block_cn10k_init(struct rvu *rvu) +{ + u64 reg; + + reg = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG); + reg |= FIELD_PREP(LMTST_THROTTLE_MASK, LMTST_WR_PEND_MAX); + rvu_write64(rvu, BLKADDR_APR, APR_AF_LMT_CFG, reg); +} diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h index b42e631e52d0..189f0eafd5ff 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h @@ -733,5 +733,7 @@ #define APR_LMT_MAP_ENT_DIS_SCH_CMP_SHIFT 23 #define APR_LMT_MAP_ENT_SCH_ENA_SHIFT 22 #define APR_LMT_MAP_ENT_DIS_LINE_PREF_SHIFT 21 +#define LMTST_THROTTLE_MASK GENMASK_ULL(38, 35) +#define LMTST_WR_PEND_MAX 15 #endif /* RVU_REG_H */