octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry
authorSuman Ghosh <sumang@marvell.com>
Mon, 1 Jan 2024 14:50:42 +0000 (20:20 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jan 2024 01:52:51 +0000 (17:52 -0800)
commit4ebb1f95e0c3c3e0eec5bb21aa43097580c4b6e4
tree93a69b65c33ce6f383b5e08dd222e5ecf9663cbc
parent05d92cb0e919239c29b3a26da1f76f1e18fed7d3
octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry

As of today, the last MCAM entry was not getting allocated because of
a <= check with the max_bmap count. This patch modifies that and if the
requested entry is greater than the available entries then set it to the
max value.

Signed-off-by: Suman Ghosh <sumang@marvell.com>
Link: https://lore.kernel.org/r/20240101145042.419697-1-sumang@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c