diff mbox series

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

Message ID 20230608114201.31112-3-naveenm@marvell.com (mailing list archive)
State Accepted
Commit 87e12a17eef476bbf768dc3a74419ad461f36fbc
Delegated to: Netdev Maintainers
Headers show
Series RVU NIX AF driver fixes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers fail 2 blamed authors not CCed: gakula@marvell.com hkelam@marvell.com; 5 maintainers not CCed: lcherian@marvell.com jerinj@marvell.com sbhatta@marvell.com gakula@marvell.com hkelam@marvell.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Naveen Mamindlapalli June 8, 2023, 11:42 a.m. UTC
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(-)

Comments

Samudrala, Sridhar June 8, 2023, 11:48 p.m. UTC | #1
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 */
>   }
>
diff mbox series

Patch

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 */
 }