+static int
+check_core_list(int *lcores, unsigned int count)
+{
+ char lcorestr[RTE_MAX_LCORE * 10];
+ bool overflow = false;
+ int len = 0, ret;
+ unsigned int i;
+
+ for (i = 0; i < count; i++) {
+ if (lcores[i] < RTE_MAX_LCORE)
+ continue;
+
+ RTE_LOG(ERR, EAL, "lcore %d >= RTE_MAX_LCORE (%d)\n",
+ lcores[i], RTE_MAX_LCORE);
+ overflow = true;
+ }
+ if (!overflow)
+ return 0;
+
+ /*
+ * We've encountered a core that's greater than RTE_MAX_LCORE,
+ * suggest using --lcores option to map lcores onto physical cores
+ * greater than RTE_MAX_LCORE.
+ */
+ for (i = 0; i < count; i++) {
+ ret = snprintf(&lcorestr[len], sizeof(lcorestr) - len,
+ "%d@%d,", i, lcores[i]);
+ if (ret > 0)
+ len = len + ret;
+ }
+ if (len > 0)
+ lcorestr[len - 1] = 0;
+ RTE_LOG(ERR, EAL, "To use high physical core ids, "
+ "please use --lcores to map them to lcore ids below RTE_MAX_LCORE, "
+ "e.g. --lcores %s\n", lcorestr);
+ return -1;
+}
+