#include <inttypes.h>
#include <sys/types.h>
#include <sys/queue.h>
-#include <netinet/in.h>
#include <setjmp.h>
#include <stdarg.h>
#include <ctype.h>
printf("%s%s", what, buf);
}
-static void
+static int
main_loop(void)
{
struct rte_mbuf *mbufs[32];
uint16_t nb_rx;
uint16_t i;
uint16_t j;
+ int ret;
while (!force_quit) {
for (i = 0; i < nr_queues; i++) {
/* closing and releasing resources */
rte_flow_flush(port_id, &error);
- rte_eth_dev_stop(port_id);
+ ret = rte_eth_dev_stop(port_id);
+ if (ret < 0)
+ printf("Failed to stop port %u: %s",
+ port_id, rte_strerror(-ret));
rte_eth_dev_close(port_id);
+ return ret;
}
#define CHECK_INTERVAL 1000 /* 100ms */
rte_exit(EXIT_FAILURE, "error in creating flow");
}
- main_loop();
+ ret = main_loop();
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
- return 0;
+ return ret;
}