Skip to contentSkip to conversation

RVU NIX AF driver fixes

PATCH Applied Naveen Mamindlapalli 3 participants 6 messages Jun 8, 2023 – Jun 10, 2023

Subsystems (3)

v1 of 2 Applied 2/2 Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover RVU NIX AF driver fixes

This patch series contains few fixes to the RVU NIX AF driver.

The first patch modifies the driver check to validate whether the req count for contiguous and non-contiguous arrays is less than the maximum limit.

The second patch fixes HW lbk interface link credit programming.

Nithin Dabilpuram (1):
octeontx2-af: fix lbk link credits on cn10k

Satha Rao (1):
octeontx2-af: fixed resource availability check

 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.0.198.ga38d39a4c5
#1 lore raw

PATCH 1/2 octeontx2-af: fixed resource availability check

From: Satha Rao <[email protected]>

txschq_alloc response have two different arrays to store continuous and non-continuous schedulers of each level. Requested count should be checked for each array separately.

Fixes 5d9b976d4480 ("octeontx2-af: Support fixed transmit scheduler topology")
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +2 -1
index 26e639e57dae..967370c0a649 100644
@@ -1864,7 +1864,8 @@ static int nix_check_txschq_alloc_req(struct rvu *rvu, int lvl, u16 pcifunc,
 		free_cnt = rvu_rsrc_free_count(&txsch->schq);
 	}
 
-	if (free_cnt < req_schq || req_schq > MAX_TXSCHQ_PER_FUNC)
+	if (free_cnt < req_schq || req->schq[lvl] > MAX_TXSCHQ_PER_FUNC ||
+	    req->schq_contig[lvl] > MAX_TXSCHQ_PER_FUNC)
 		return NIX_AF_ERR_TLX_ALLOC_FAIL;
 
 	/* If contiguous queues are needed, check for availability */
Signature · 1 line
2.39.0.198.ga38d39a4c5
Reviewed-by on v1 1/2
#2 lore raw

Re: [net PATCH 1/2] octeontx2-af: fixed resource availability check

Quoted 10 lines · Naveen Mamindlapalli

From: Satha Rao <[email protected]>

txschq_alloc response have two different arrays to store continuous and non-continuous schedulers of each level. Requested count should be checked for each array separately.

Fixes 5d9b976d4480 ("octeontx2-af: Support fixed transmit scheduler topology")
Quoted 18 lines
---
  drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +2 -1
index 26e639e57dae..967370c0a649 100644
@@ -1864,7 +1864,8 @@ static int nix_check_txschq_alloc_req(struct rvu *rvu, int lvl, u16 pcifunc,
  		free_cnt = rvu_rsrc_free_count(&txsch->schq);
  	}
 
-	if (free_cnt < req_schq || req_schq > MAX_TXSCHQ_PER_FUNC)
+	if (free_cnt < req_schq || req->schq[lvl] > MAX_TXSCHQ_PER_FUNC ||
+	    req->schq_contig[lvl] > MAX_TXSCHQ_PER_FUNC)
  		return NIX_AF_ERR_TLX_ALLOC_FAIL;
 
  	/* If contiguous queues are needed, check for availability */
#3 lore raw

PATCH 2/2 octeontx2-af: fix lbk link credits on cn10k

In reply to Naveen Mamindlapalli

From: Nithin Dabilpuram <[email protected]>

Fix LBK link credits on CN10K to be same as CN9K i.e 16 * MAX_LBK_DATA_RATE instead of current scheme of calculation based on LBK buf length / FIFO size.

Fixes 6e54e1c5399a ("octeontx2-af: cn10K: Add MTU configuration")
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +0 -4
index 967370c0a649..cbb6d7e62d90 100644
@@ -4067,10 +4067,6 @@ int rvu_mbox_handler_nix_set_rx_cfg(struct rvu *rvu, struct nix_rx_cfg *req,
 
 static u64 rvu_get_lbk_link_credits(struct rvu *rvu, u16 lbk_max_frs)
 {
-	/* CN10k supports 72KB FIFO size and max packet size of 64k */
-	if (rvu->hw->lbk_bufsize == 0x12000)
-		return (rvu->hw->lbk_bufsize - lbk_max_frs) / 16;
-
 	return 1600; /* 16 * max LBK datarate = 16 * 100Gbps */
 }
 
Signature · 1 line
2.39.0.198.ga38d39a4c5
Reviewed-by on v1 2/2
#4 lore raw

Re: [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k

Quoted 9 lines · Naveen Mamindlapalli

From: Nithin Dabilpuram <[email protected]>

Fix LBK link credits on CN10K to be same as CN9K i.e 16 * MAX_LBK_DATA_RATE instead of current scheme of calculation based on LBK buf length / FIFO size.

Fixes 6e54e1c5399a ("octeontx2-af: cn10K: Add MTU configuration")
Quoted 19 lines
---
  drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ----
  1 file changed, 4 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +0 -4
index 967370c0a649..cbb6d7e62d90 100644
@@ -4067,10 +4067,6 @@ int rvu_mbox_handler_nix_set_rx_cfg(struct rvu *rvu, struct nix_rx_cfg *req,
 
  static u64 rvu_get_lbk_link_credits(struct rvu *rvu, u16 lbk_max_frs)
  {
-	/* CN10k supports 72KB FIFO size and max packet size of 64k */
-	if (rvu->hw->lbk_bufsize == 0x12000)
-		return (rvu->hw->lbk_bufsize - lbk_max_frs) / 16;
-
  	return 1600; /* 16 * max LBK datarate = 16 * 100Gbps */
  }
 
#5 lore raw
In reply to Naveen Mamindlapalli
This series was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Thu, 8 Jun 2023 17:11:59 +0530 you wrote:

This patch series contains few fixes to the RVU NIX AF driver.

The first patch modifies the driver check to validate whether the req count for contiguous and non-contiguous arrays is less than the maximum limit.

The second patch fixes HW lbk interface link credit programming.

[...]

Here is the summary with links:
- [net,1/2] octeontx2-af: fixed resource availability check

    https://git.kernel.org/netdev/net/c/4e635f9d8616
  - [net,2/2] octeontx2-af: fix lbk link credits on cn10k
    https://git.kernel.org/netdev/net/c/87e12a17eef4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html