summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
401b744)
providing a command line parameter to set the mempool flags accordingly.
This mode is relevant only when creating an empty mempool and then
populating with memory.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
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(" --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
}
#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 },
{ "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 },
rte_exit(EXIT_FAILURE,
"noisy-lkup-num-reads-writes must be >= 0\n");
}
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]);
break;
case 'h':
usage(argv[0]);
/* Set offload configuration from command line parameters. */
rx_mode.offloads = rx_offloads;
tx_mode.offloads = tx_offloads;
/* 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];
};
struct rte_mempool *mempools[RTE_MAX_NUMA_NODES];
struct fwd_config cur_fwd_config;
struct fwd_engine *cur_fwd_eng = &io_fwd_engine; /**< IO mode by default. */
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),
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, mempool_flags);
if (rte_mp == NULL)
goto err;
if (rte_mp == NULL)
goto err;
extern struct fwd_engine * fwd_engines[]; /**< NULL terminated array. */
extern struct fwd_engine * fwd_engines[]; /**< NULL terminated array. */
+extern uint16_t mempool_flags;
+
/**
* Forwarding Configuration
*
/**
* Forwarding Configuration
*
Set the number of r/w accesses to be done in noisy neighbour simulation memory buffer to N.
Only available with the noisy forwarding mode. The default value is 0.
Set the number of r/w accesses to be done in noisy neighbour simulation memory buffer to N.
Only available with the noisy forwarding mode. The default value is 0.
+
+* ``--no-iova-contig``
+
+ Enable to create mempool which is not IOVA contiguous. Valid only with --mp-alloc=anon.
+ The default value is 0.