summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMonendra Singh Kushwaha <kmonendra@marvell.com>2025-01-14 07:19:38 +0530
committerDamjan Marion <dmarion@0xa5.net>2025-01-15 13:22:24 +0000
commita46c723b2ea0b94d1b1fac8a34b520603da0a129 (patch)
tree3cc5d3721b94cf576bd6770adae39c6f206f466a /src
parentd023a7e2625a79770b9888292c56be085e69efbf (diff)
octeon: add compatibility check
This patch adds compatibility check for OCTEON model in plugin. Type: refactor Change-Id: Id583a2f42b8f66f7e045f6cf9176125680e9a16f Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dev_octeon/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/dev_octeon/init.c b/src/plugins/dev_octeon/init.c
index 4f39b227bd3..561cbe94fed 100644
--- a/src/plugins/dev_octeon/init.c
+++ b/src/plugins/dev_octeon/init.c
@@ -411,6 +411,15 @@ oct_plugin_init (vlib_main_t *vm)
rv = roc_model_init (&oct_model);
if (rv)
return clib_error_return (0, "roc_model_init failed");
+
+#ifdef PLATFORM_OCTEON9
+ if (!roc_model_is_cn9k ())
+ return clib_error_return (0, "OCTEON model is not OCTEON9");
+#else
+ if (!roc_model_is_cn10k ())
+ return clib_error_return (0, "OCTEON model is not OCTEON10");
+#endif
+
return 0;
}