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
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")
Signed-off-by: Nithin Dabilpuram <[email protected]>
Signed-off-by: Naveen Mamindlapalli <[email protected]>
---
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
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")
Signed-off-by: Satha Rao <[email protected]>
Signed-off-by: Sunil Kovvuri Goutham <[email protected]>
Signed-off-by: Naveen Mamindlapalli <[email protected]>
---
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
On 6/8/2023 4:42 AM, Naveen Mamindlapalli wrote:
> 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")
> Signed-off-by: Satha Rao <[email protected]>
> Signed-off-by: Sunil Kovvuri Goutham <[email protected]>
> Signed-off-by: Naveen Mamindlapalli <[email protected]>
Reviewed-by: Sridhar Samudrala <[email protected]>
> ---
> 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 */
On 6/8/2023 4:42 AM, Naveen Mamindlapalli wrote:
> 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")
> Signed-off-by: Nithin Dabilpuram <[email protected]>
> Signed-off-by: Naveen Mamindlapalli <[email protected]>
Reviewed-by: Sridhar Samudrala <[email protected]>
> ---
> 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 */
> }
>
Hello:
This series was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
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