Skip to contentSkip to conversation

octeontx2-af: cn10k: Increase outstanding LMTST transactions

PATCH Superseded Geetha sowjanya 2 participants 3 messages Nov 29, 2023 – Dec 4, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Geetha sowjanya

author maintainer
#0 lore raw

PATCH 1/1 octeontx2-af: cn10k: Increase outstanding LMTST transactions

From: Pavan Nikhilesh <[email protected]>

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.

---
 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 +++++++++
 3 files changed, 13 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu.c +3 -0
index 22c395c7d040..14bb91b98f97 100644
@@ -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)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 -0
index c4d999ef5ab4..6546cc489d7e 100644
@@ -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);
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +9 -0
index 0e74c5a2231e..93fedabfe31e 100644
@@ -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 |= 0xFULL << 35;
+	rvu_write64(rvu, BLKADDR_APR, APR_AF_LMT_CFG, reg);
+}
Signature · 1 line
2.25.1
reviewer
#1 lore raw
Quoted 8 lines · Geetha sowjanya

From: Pavan Nikhilesh <[email protected]>

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.

...

Quoted 5 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +0 -0
index 0e74c5a2231e..93fedabfe31e 100644

drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c void rvu_nix_block_cn10k_init(struct rvu *rvu, struct nix_hw *nix_hw) · line 568

Quoted 10 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +7 -0
@@ -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 |= 0xFULL << 35;

Hi Pavan and Geetha,

I think it would be best to avoid the magic value 35 here.

Best would probably be to use GENMASK_ULL and FIELD_PREP. Else defining something similar to APR_LMT_MAP_ENT_SCH_ENA_SHIFT.

It might also be nice to avoid the magic value 0xFULL using a #define.

Quoted 5 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +2 -0
+	rvu_write64(rvu, BLKADDR_APR, APR_AF_LMT_CFG, reg);
+}
Signature · 1 line
2.25.1
author maintainer
#2 lore raw
Quoted 49 lines

-----Original Message-----
From: Simon Horman <[email protected]>
Sent: Friday, December 1, 2023 5:05 PM
To: Geethasowjanya Akula <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Sunil Kovvuri Goutham <[email protected]>; Linu Cherian <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Pavan Nikhilesh Bhagavatula <[email protected]>; Subbaraya Sundeep Bhatta <[email protected]>; Hariprasad Kelam <[email protected]>
Subject: [EXT] Re: [net-next PATCH] octeontx2-af: cn10k: Increase outstanding LMTST transactions

External Email

----------------------------------------------------------------------

Quoted 8 lines · Geetha sowjanya

From: Pavan Nikhilesh <[email protected]>

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.

...

drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c void rvu_nix_block_cn10k_init(struct rvu *rvu,

Quoted 6 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +0 -0
index 0e74c5a2231e..93fedabfe31e 100644
@@ -559,3 +559,12 @@ void rvu_nix_block_cn10k_init(struct rvu *rvu,

struct nix_hw *nix_hw)

drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c void rvu_nix_block_cn10k_init(struct rvu *rvu, struct nix_hw *nix_hw) · line 568

Quoted 8 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +6 -0
 	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 |= 0xFULL << 35;

Hi Pavan and Geetha,

Quoted 6 lines

I think it would be best to avoid the magic value 35 here.

Best would probably be to use GENMASK_ULL and FIELD_PREP. Else defining something similar to APR_LMT_MAP_ENT_SCH_ENA_SHIFT.

It might also be nice to avoid the magic value 0xFULL using a #define.

Ack. Will submit next version.

Quoted 5 lines
Quoted 5 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +1 -1
+	rvu_write64(rvu, BLKADDR_APR, APR_AF_LMT_CFG, reg); }
--

2.25.1