/* Macros for printing using RTE_LOG */
#define RTE_LOGTYPE_REORDERAPP RTE_LOGTYPE_USER1
+enum {
+#define OPT_DISABLE_REORDER "disable-reorder"
+ OPT_DISABLE_REORDER_NUM = 256,
+#define OPT_INSIGHT_WORKER "insight-worker"
+ OPT_INSIGHT_WORKER_NUM,
+};
+
unsigned int portmask;
unsigned int disable_reorder;
unsigned int insight_worker;
char **argvopt;
char *prgname = argv[0];
static struct option lgopts[] = {
- {"disable-reorder", 0, 0, 0},
- {"insight-worker", 0, 0, 0},
- {NULL, 0, 0, 0}
+ {OPT_DISABLE_REORDER, 0, NULL, OPT_DISABLE_REORDER_NUM},
+ {OPT_INSIGHT_WORKER, 0, NULL, OPT_INSIGHT_WORKER_NUM },
+ {NULL, 0, 0, 0 }
};
argvopt = argv;
return -1;
}
break;
+
/* long options */
- case 0:
- if (!strcmp(lgopts[option_index].name, "disable-reorder")) {
- printf("reorder disabled\n");
- disable_reorder = 1;
- }
- if (!strcmp(lgopts[option_index].name,
- "insight-worker")) {
- printf("print all worker statistics\n");
- insight_worker = 1;
- }
+ case OPT_DISABLE_REORDER_NUM:
+ printf("reorder disabled\n");
+ disable_reorder = 1;
+ break;
+
+ case OPT_INSIGHT_WORKER_NUM:
+ printf("print all worker statistics\n");
+ insight_worker = 1;
break;
+
default:
print_usage(prgname);
return -1;