netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH 0/2] RVU NIX AF driver fixes
@ 2023-06-08 11:41 Naveen Mamindlapalli
  2023-06-08 11:42 ` [net PATCH 1/2] octeontx2-af: fixed resource availability check Naveen Mamindlapalli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Naveen Mamindlapalli @ 2023-06-08 11:41 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham
  Cc: Naveen Mamindlapalli

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(-)

-- 
2.39.0.198.ga38d39a4c5


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [net PATCH 1/2] octeontx2-af: fixed resource availability check
  2023-06-08 11:41 [net PATCH 0/2] RVU NIX AF driver fixes Naveen Mamindlapalli
@ 2023-06-08 11:42 ` Naveen Mamindlapalli
  2023-06-08 23:47   ` Samudrala, Sridhar
  2023-06-08 11:42 ` [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k Naveen Mamindlapalli
  2023-06-10 19:02 ` [net PATCH 0/2] RVU NIX AF driver fixes patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Naveen Mamindlapalli @ 2023-06-08 11:42 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham
  Cc: Satha Rao, Naveen Mamindlapalli

From: Satha Rao <skoteshwar@marvell.com>

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")
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 26e639e57dae..967370c0a649 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -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 */
-- 
2.39.0.198.ga38d39a4c5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k
  2023-06-08 11:41 [net PATCH 0/2] RVU NIX AF driver fixes Naveen Mamindlapalli
  2023-06-08 11:42 ` [net PATCH 1/2] octeontx2-af: fixed resource availability check Naveen Mamindlapalli
@ 2023-06-08 11:42 ` Naveen Mamindlapalli
  2023-06-08 23:48   ` Samudrala, Sridhar
  2023-06-10 19:02 ` [net PATCH 0/2] RVU NIX AF driver fixes patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Naveen Mamindlapalli @ 2023-06-08 11:42 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham
  Cc: Nithin Dabilpuram, Naveen Mamindlapalli

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

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")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 967370c0a649..cbb6d7e62d90 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -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 */
 }
 
-- 
2.39.0.198.ga38d39a4c5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [net PATCH 1/2] octeontx2-af: fixed resource availability check
  2023-06-08 11:42 ` [net PATCH 1/2] octeontx2-af: fixed resource availability check Naveen Mamindlapalli
@ 2023-06-08 23:47   ` Samudrala, Sridhar
  0 siblings, 0 replies; 6+ messages in thread
From: Samudrala, Sridhar @ 2023-06-08 23:47 UTC (permalink / raw)
  To: Naveen Mamindlapalli, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, sgoutham
  Cc: Satha Rao



On 6/8/2023 4:42 AM, Naveen Mamindlapalli wrote:
> From: Satha Rao <skoteshwar@marvell.com>
> 
> 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")
> Signed-off-by: Satha Rao <skoteshwar@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>

Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

> ---
>   drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index 26e639e57dae..967370c0a649 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -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 */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k
  2023-06-08 11:42 ` [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k Naveen Mamindlapalli
@ 2023-06-08 23:48   ` Samudrala, Sridhar
  0 siblings, 0 replies; 6+ messages in thread
From: Samudrala, Sridhar @ 2023-06-08 23:48 UTC (permalink / raw)
  To: Naveen Mamindlapalli, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, sgoutham
  Cc: Nithin Dabilpuram



On 6/8/2023 4:42 AM, Naveen Mamindlapalli wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> 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")
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>

Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

> ---
>   drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index 967370c0a649..cbb6d7e62d90 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -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 */
>   }
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [net PATCH 0/2] RVU NIX AF driver fixes
  2023-06-08 11:41 [net PATCH 0/2] RVU NIX AF driver fixes Naveen Mamindlapalli
  2023-06-08 11:42 ` [net PATCH 1/2] octeontx2-af: fixed resource availability check Naveen Mamindlapalli
  2023-06-08 11:42 ` [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k Naveen Mamindlapalli
@ 2023-06-10 19:02 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-10 19:02 UTC (permalink / raw)
  To: Naveen Mamindlapalli
  Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham

Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-10 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 11:41 [net PATCH 0/2] RVU NIX AF driver fixes Naveen Mamindlapalli
2023-06-08 11:42 ` [net PATCH 1/2] octeontx2-af: fixed resource availability check Naveen Mamindlapalli
2023-06-08 23:47   ` Samudrala, Sridhar
2023-06-08 11:42 ` [net PATCH 2/2] octeontx2-af: fix lbk link credits on cn10k Naveen Mamindlapalli
2023-06-08 23:48   ` Samudrala, Sridhar
2023-06-10 19:02 ` [net PATCH 0/2] RVU NIX AF driver fixes patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).