printf(" --noisy-lkup-num-writes=N: do N random writes per packet\n");
printf(" --noisy-lkup-num-reads=N: do N random reads per packet\n");
printf(" --noisy-lkup-num-writes=N: do N random reads and writes per packet\n");
+ printf(" --no-iova-contig: mempool memory can be IOVA non contiguous. "
+ "valid only with --mp-alloc=anon\n");
}
#ifdef RTE_LIBRTE_CMDLINE
{ "noisy-lkup-num-writes", 1, 0, 0 },
{ "noisy-lkup-num-reads", 1, 0, 0 },
{ "noisy-lkup-num-reads-writes", 1, 0, 0 },
+ { "no-iova-contig", 0, 0, 0 },
{ 0, 0, 0, 0 },
};
rte_exit(EXIT_FAILURE,
"noisy-lkup-num-reads-writes must be >= 0\n");
}
+ if (!strcmp(lgopts[opt_idx].name, "no-iova-contig"))
+ mempool_flags = MEMPOOL_F_NO_IOVA_CONTIG;
break;
case 'h':
usage(argv[0]);
/* Set offload configuration from command line parameters. */
rx_mode.offloads = rx_offloads;
tx_mode.offloads = tx_offloads;
+
+ if (mempool_flags & MEMPOOL_F_NO_IOVA_CONTIG &&
+ mp_alloc_type != MP_ALLOC_ANON) {
+ TESTPMD_LOG(WARNING, "cannot use no-iova-contig without "
+ "mp-alloc=anon. mempool no-iova-contig is "
+ "ignored\n");
+ mempool_flags = 0;
+ }
}
};
struct rte_mempool *mempools[RTE_MAX_NUMA_NODES];
+uint16_t mempool_flags;
struct fwd_config cur_fwd_config;
struct fwd_engine *cur_fwd_eng = &io_fwd_engine; /**< IO mode by default. */
rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
mb_size, (unsigned int) mb_mempool_cache,
sizeof(struct rte_pktmbuf_pool_private),
- socket_id, 0);
+ socket_id, mempool_flags);
if (rte_mp == NULL)
goto err;