summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-05-03 16:35:58 +0200
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-05-03 16:35:58 +0200
commit48a3059a71e3573011cc124d954fdcbf4829a93f (patch)
tree20a384900aba9edfa2b060e0a953a11d2832880b
parent9122b3b8d4fb63efce944da77ec9fbca3cb3166a (diff)
downloaddpdk-burst-replay-48a3059a71e3573011cc124d954fdcbf4829a93f.zip
dpdk-burst-replay-48a3059a71e3573011cc124d954fdcbf4829a93f.tar.gz
dpdk-burst-replay-48a3059a71e3573011cc124d954fdcbf4829a93f.tar.xz
Simplify the mempool/mbuf allocation. Removing the unneeded "--socket-mem" arg from EAL cmdline.
Tested with DPDK 16.11.9/17.11.5/18.11.1.
-rw-r--r--src/dpdk.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/dpdk.c b/src/dpdk.c
index 530a27b..5cbc0fd 100644
--- a/src/dpdk.c
+++ b/src/dpdk.c
@@ -65,34 +65,18 @@ char** fill_eal_args(const struct cmd_opts* opts, const struct cpus_bindings* cp
char buf_coremask[30];
char** eal_args;
int i, cpt;
-#if API_OLDEST_THAN(18, 05)
- char socket_mem_arg[32];
- int mempool;
-#endif /* API_OLDEST_THAN(18, 05) */
if (!opts || !cpus || !dpdk)
return (NULL);
/* Set EAL init parameters */
snprintf(buf_coremask, 20, "0x%lx", cpus->coremask);
-#if API_OLDEST_THAN(18, 05)
- mempool = dpdk->pool_sz * 1024;
- if (cpus->numacores == 1)
- snprintf(socket_mem_arg, sizeof(socket_mem_arg), "--socket-mem=%i", mempool);
- else if (cpus->numacore == 0)
- snprintf(socket_mem_arg, sizeof(socket_mem_arg), "--socket-mem=%i,0", mempool);
- else
- snprintf(socket_mem_arg, sizeof(socket_mem_arg), "--socket-mem=0,%i", mempool);
-#endif /* API_OLDEST_THAN(18, 05) */
char *pre_eal_args[] = {
"./dpdk-replay",
"-c", strdup(buf_coremask),
"-n", "1", /* NUM MEM CHANNELS */
"--proc-type", "auto",
"--file-prefix", "dpdkreplay_",
-#if API_OLDEST_THAN(18, 11)
- strdup(socket_mem_arg),
-#endif /* API_OLDEST_THAN(18, 11) */
NULL
};
/* fill pci whitelist args */