#include <unistd.h>
#include <string.h>
+#include <rte_mempool.h>
#include <rte_cycles.h>
+#include <rte_common.h>
+#include <rte_mbuf.h>
#include <rte_distributor.h>
#define ITER_POWER 20 /* log 2 of how many iterations we do when timing. */
worker_idx = 0;
}
-#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
-
static int
test_distributor_perf(void)
{
const unsigned nb_bufs = (511 * rte_lcore_count()) < BIG_BATCH ?
(BIG_BATCH * 2) - 1 : (511 * rte_lcore_count());
if (p == NULL) {
- p = rte_mempool_create("DPT_MBUF_POOL", nb_bufs,
- MBUF_SIZE, BURST,
- sizeof(struct rte_pktmbuf_pool_private),
- rte_pktmbuf_pool_init, NULL,
- rte_pktmbuf_init, NULL,
- rte_socket_id(), 0);
+ p = rte_pktmbuf_pool_create("DPT_MBUF_POOL", nb_bufs, BURST,
+ 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
if (p == NULL) {
printf("Error creating mempool\n");
return -1;