This patch adds compatibility check for OCTEON model in plugin.
Type: refactor
Change-Id: Id583a2f42b8f66f7e045f6cf9176125680e9a16f
Signed-off-by: Monendra Singh Kushwaha <[email protected]>
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;
}