summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-06-10 21:53:02 +0300
committerDavid S. Miller <davem@davemloft.net>2023-06-10 21:53:02 +0300
commit14df9526046d2a6d2b3e002e952714ce04fc9bd7 (patch)
treec7c46924d1fb52569c5ff529c86b64fb6b9619e7
parent1b8975f30abffc4f74f1ba049f9042e7d8f646cc (diff)
parent87e12a17eef476bbf768dc3a74419ad461f36fbc (diff)
downloadlinux-14df9526046d2a6d2b3e002e952714ce04fc9bd7.tar.xz
Merge branch 'octeontx2-af-fixes'
Naveen Mamindlapalli says: ==================== 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. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 4ad707e758b9..f01d057ad025 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -1878,7 +1878,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 */
@@ -4080,10 +4081,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 */
}