RVU NIX AF driver fixes
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
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.
--- 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
@@ -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
Re: [net PATCH 1/2] octeontx2-af: fixed resource availability check
Quoted 10 lines · Naveen Mamindlapalli
From: Satha Rao <[email protected]>
txschq_allocresponse 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 <[email protected]>Signed-off-by Sunil Kovvuri Goutham <[email protected]>Signed-off-by Naveen Mamindlapalli <[email protected]>
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@@ -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 */
PATCH 2/2 octeontx2-af: fix lbk link credits on cn10k
In reply to Naveen MamindlapalliFrom: 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.
--- 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
@@ -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
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_RATEinstead 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 <[email protected]>Signed-off-by Naveen Mamindlapalli <[email protected]>
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@@ -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 */ }
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