/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define APP_WT_MODE 2
#define APP_TX_MODE 4
+uint8_t interactive = APP_INTERACTIVE_DEFAULT;
+uint32_t qavg_period = APP_QAVG_PERIOD;
+uint32_t qavg_ntimes = APP_QAVG_NTIMES;
/* main processing loop */
static int
return 0;
}
-static void
+void
app_stat(void)
{
uint32_t i;
}
}
-
-
int
MAIN(int argc, char **argv)
{
if (ret < 0)
return -1;
-
/* launch per-lcore init on every lcore */
rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_MASTER);
-
- /* print statistics every second */
- while(1) {
+
+ if (interactive) {
sleep(1);
- app_stat();
+ prompt();
+ }
+ else {
+ /* print statistics every second */
+ while(1) {
+ sleep(1);
+ app_stat();
+ }
}
-}
-
+ return 0;
+}