From: Satheesh Paul <psathe...@marvell.com>

CN96xx and CN98xx have 4096 and 16384 MCAM entries respectively.
Aligning the code with the same numbers.

Fixes: a07f7ced436d ("common/cnxk: add NPC init and fini")

Signed-off-by: Satheesh Paul <psathe...@marvell.com>
---
 drivers/common/cnxk/roc_model.h | 6 ++++++
 drivers/common/cnxk/roc_npc.c   | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_model.h b/drivers/common/cnxk/roc_model.h
index fb774ac..d6ef459 100644
--- a/drivers/common/cnxk/roc_model.h
+++ b/drivers/common/cnxk/roc_model.h
@@ -88,6 +88,12 @@ roc_model_is_cn10k(void)
 }
 
 static inline uint64_t
+roc_model_is_cn98xx(void)
+{
+       return (roc_model->flag & ROC_MODEL_CN98xx_A0);
+}
+
+static inline uint64_t
 roc_model_is_cn96_A0(void)
 {
        return roc_model->flag & ROC_MODEL_CN96xx_A0;
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index e6a5036..a69be4f 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -101,7 +101,7 @@ npc_mcam_tot_entries(void)
        /* FIXME: change to reading in AF from NPC_AF_CONST1/2
         * MCAM_BANK_DEPTH(_EXT) * MCAM_BANKS
         */
-       if (roc_model_is_cn10k())
+       if (roc_model_is_cn10k() || roc_model_is_cn98xx())
                return 16 * 1024; /* MCAM_BANKS = 4, BANK_DEPTH_EXT = 4096 */
        else
                return 4 * 1024; /* MCAM_BANKS = 4, BANK_DEPTH_EXT = 1024 */
-- 
2.8.4

Reply via email to